PASS: SHiREVault is mounted and writable. Checkpoint: /SHiREVault/Backup/OSBackups/SHIRE-MINI-MARKETING-PUBLIC-RELAY-AUDIT-20260731T073735Z === NETWORK-MOUNT IDENTITY === /mnt/shirevault-network autofs systemd-1 rw,relatime,fd=46,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=6235 /mnt/shirevault-network cifs //192.168.1.1/volume(sda2) rw,relatime,vers=1.0,sec=none,cache=strict,upcall_target=app,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.1.1,iocharset=utf8,soft,unix,posixpaths,mapposix,acl,reparse=nfs,nativesocket,symlink=native,rsize=1048576,wsize=65536,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1 === RELEVANT SYSTEMD SERVICES === shire-marketing-boss-tailnet.service loaded active running Private Tailnet proxy for SHiRE Marketing Boss shire-marketing-boss.service loaded active running SHiRE Marketing Boss Drafting Workspace shire-marketing-cloudflare-tunnel.service loaded active running SHiRE Marketing OAuth Cloudflare Tunnel shire-marketing-oauth-callback.service loaded active running SHiRE Marketing OAuth Callback-Only Gate shire-marketing-pipeline.service loaded active running SHiRE Marketing Boss Instagram Production Pipeline shire-marketing-token-backup.service loaded inactive dead Back up Marketing Boss encrypted OAuth token to SHiREVault shire-marketing-token-lifecycle.service loaded inactive dead SHiRE Marketing Boss Instagram Token Lifecycle shire-marketing-token-reload.service loaded inactive dead Reload SHiRE Marketing Boss after protected Instagram token rotation === SAFE SERVICE PROPERTIES === --- shire-marketing-boss.service --- MainPID=1741 User=ray Group=ray Id=shire-marketing-boss.service LoadState=loaded ActiveState=active SubState=running FragmentPath=/etc/systemd/system/shire-marketing-boss.service --- shire-marketing-boss-tailnet.service --- MainPID=33609 User= Group= Id=shire-marketing-boss-tailnet.service LoadState=loaded ActiveState=active SubState=running FragmentPath=/etc/systemd/system/shire-marketing-boss-tailnet.service --- shire-marketing-boss-worker.service --- MainPID=0 User=ray Group=ray Id=shire-marketing-boss-worker.service LoadState=loaded ActiveState=inactive SubState=dead FragmentPath=/etc/systemd/system/shire-marketing-boss-worker.service --- shire-marketing-cloudflare-tunnel.service --- MainPID=1743 User= Group= Id=shire-marketing-cloudflare-tunnel.service LoadState=loaded ActiveState=active SubState=running FragmentPath=/etc/systemd/system/shire-marketing-cloudflare-tunnel.service --- shire-marketing-oauth-callback.service --- MainPID=1742 User=ray Group=ray Id=shire-marketing-oauth-callback.service LoadState=loaded ActiveState=active SubState=running FragmentPath=/etc/systemd/system/shire-marketing-oauth-callback.service --- shire-marketing-pipeline.service --- MainPID=94292 User=ray Group=ray Id=shire-marketing-pipeline.service LoadState=loaded ActiveState=active SubState=running FragmentPath=/etc/systemd/system/shire-marketing-pipeline.service --- shire-marketing-token-backup.service --- MainPID=0 User= Group= Id=shire-marketing-token-backup.service LoadState=loaded ActiveState=inactive SubState=dead FragmentPath=/etc/systemd/system/shire-marketing-token-backup.service --- shire-marketing-token-lifecycle.service --- MainPID=0 User=ray Group=ray Id=shire-marketing-token-lifecycle.service LoadState=loaded ActiveState=inactive SubState=dead FragmentPath=/etc/systemd/system/shire-marketing-token-lifecycle.service --- shire-marketing-token-reload.service --- MainPID=0 User= Group= Id=shire-marketing-token-reload.service LoadState=loaded ActiveState=inactive SubState=dead FragmentPath=/etc/systemd/system/shire-marketing-token-reload.service === CLOUDFLARED SAFE ROUTING CONFIGURATION === No readable standard cloudflared configuration file was found. === CLOUDFLARED INGRESS VALIDATION === No configuration file was found. Please create one, or use the --config flag to specify its filepath. You can use the help command to learn more about configuration files === PRIVATE LISTENERS === State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess LISTEN 0 511 127.0.0.1:4174 0.0.0.0:* users:(("node",pid=,fd=24)) LISTEN 0 511 127.0.0.1:4173 0.0.0.0:* users:(("node",pid=,fd=24)) LISTEN 0 4096 100.116.93.90:4173 0.0.0.0:* users:(("systemd-socket-",pid=,fd=3),("systemd",pid=,fd=301)) LISTEN 0 511 100.116.93.90:4174 0.0.0.0:* users:(("node",pid=,fd=24)) LISTEN 0 4096 127.0.0.1:20241 0.0.0.0:* users:(("cloudflared",pid=,fd=10)) === INSTALLED PUBLIC-RELAY REFERENCES === /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/server.js:15: if(req.method==='GET'&&u.pathname==='/api/status'){const cat=readJson(P.CATALOG,{products:[],sources:[]});const acct=await accountCheck();return json(res,200,{ok:true,version:'0.5.8',mode:process.env.LIVE_PUBLISHING_ENABLED==='1'?'live-capable':'private-dry-run',global_pause:process.env.GLOBAL_PUBLISHING_PAUSE!=='0',api_version:API_VERSION,catalogue_products:cat.products.length,catalogue_quality:cat.quality||null,catalogue_sources:cat.sources,account:acct,token_lifecycle:safeLifecycleStatus(),public_media_configured:/^https:\/\//.test(process.env.PUBLIC_MEDIA_BASE_URL||''),token_file_write_access:false});} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/public/app.js:11:async function load(){const [s,c,ss]=await Promise.all([api('/api/status'),api('/api/catalog'),api('/api/suites')]);const life=s.token_lifecycle||{},q=s.catalogue_quality||{};catalog=c.products||[];suites=ss.suites||[];$('#statusline').textContent=`${s.mode} • ${q.promotion_ready||0} campaign candidates • ${suites.length} frozen suites • ${s.account.ok?'@'+s.account.username:'Instagram blocked'}`;$('#readiness').innerHTML=[card('Instagram account',s.account.ok?`@${s.account.username}`:s.account.reason,s.account.ok),card('Token lifecycle',lifecycleText(life),life.status==='healthy'||life.status==='healthy_waiting_refresh_age'),card('Campaign candidates',String(q.promotion_ready||0),(q.promotion_ready||0)>0),card('Products with real images',String(q.with_images||0),(q.with_images||0)>0),card('Automatic API posting',s.public_media_configured?'Media relay configured':'Still safely locked',s.public_media_configured,'Manual export and review still work'),card('Global pause',s.global_pause?'ON — safe':'OFF',s.global_pause)].join('');renderSuites();renderProducts();} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/public/app.js:15:function readinessTable(c,errors){const r=c.readiness||{};const rows=[['Exact account',c.account?.username?`@${c.account.username}`:c.account?.verification_reason,!!c.account?.username],['Media checksum',errors.length?errors.join('; '):'PASS',!errors.length],['Product assets','Real source media',r.source_media_ready],['Product copy','Prepared and frozen',r.source_copy_ready],['Listing checked',r.source_freshness_ready?'Current':'Needs Ray to check current listing',r.source_freshness_ready],['Publishing permission',r.permission_recorded?'Confirmed':'Not confirmed',r.permission_recorded],['Public media relay',r.public_media_ready?'Configured':'Not configured — API posting locked',r.public_media_ready]];return `
${rows.map(x=>`
${esc(x[0])}${esc(x[1])}
`).join('')}
`;} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/public/app.js:18:async function reviewSuite(id){const d=await api('/api/suites/'+encodeURIComponent(id));const s=d.suite;$('#review-title').textContent=s.product_title;const campaigns=[...(d.campaigns||[])].sort((a,b)=>['FEED','CAROUSEL','REEL'].indexOf(a.post_type)-['FEED','CAROUSEL','REEL'].indexOf(b.post_type));const allManual=campaigns.length===3&&campaigns.every(c=>c.readiness?.media_valid&&c.readiness?.source_product_ready&&c.readiness?.source_promotion_ready&&c.readiness?.source_freshness_ready);const allApi=allManual&&campaigns.every(c=>c.readiness?.public_media_ready&&c.readiness?.permission_recorded);const salesLayout=campaigns.length===3&&campaigns.every(c=>c.creative_version==='0.5.8-sales-layout');$('#reviewbody').innerHTML=`
${card('Exact Instagram account',campaigns[0]?.account?.username?`@${campaigns[0].account.username}`:'Unverified',!!campaigns[0]?.account?.username)}${card('Manual posting package',allManual?'READY':'Needs current listing check',allManual)}${card('Creative layout',salesLayout?'SALES-READY V0.5.8':'OLDER LAYOUT',salesLayout,'Long headlines are wrapped and Reels use one clean title treatment')}${card('Automatic API publishing',allApi?'READY':'LOCKED',allApi,'Public media relay is a separate milestone')}${card('Suite status',s.status,true)}

Review every image, video and word. These files are frozen and nothing here publishes them. Use only the latest v0.5.8 suite for manual posting.

${campaigns.map(c=>{const errs=d.verification_errors?.[c.id]||[];return `

${esc(c.post_type)}

${esc(c.product.title)}

${esc(c.frozen_hash.slice(0,12))}…
${readinessTable(c,errs)}

Exact caption and hashtags

${esc(c.full_caption)}

Every media asset

${mediaHtml(c)}
Frozen campaign hash

${esc(c.frozen_hash)}

`;}).join('')}`;$('#review').showModal();document.querySelectorAll('.copy-caption').forEach(b=>{const c=campaigns.find(x=>x.id===b.dataset.caption);b.onclick=()=>copyText(c.full_caption,b);});} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/campaign.js:22: const campaign={schema_version:3,id,suite_id:opts.suiteId||null,status:'DRAFT',created_at:nowIso(),publish_time:opts.publishTime||null,creative_version:'0.5.8-sales-layout',copy_mode:copy.copy_mode,account:{account_id:account.ok?account.account_id:null,username:account.ok?account.username:null,account_type:account.ok?account.account_type:null,verification_status:account.ok?'verified':'unverified',verification_reason:account.ok?null:account.reason},post_type:postType,product,caption:copy.caption,hashtags:copy.hashtags,full_caption:boundedMultilineText(`${copy.caption}\n\n${copy.hashtags.join(' ')}`,2200),assets,readiness:{dry_run:true,live_publishing_enabled:process.env.LIVE_PUBLISHING_ENABLED==='1',global_pause:process.env.GLOBAL_PUBLISHING_PAUSE!=='0',public_media_ready:assets.every(a=>/^https:\/\//.test(a.public_url||'')),media_valid:assets.every(a=>!a.validation_errors.length),account_verified:account.ok,permission_recorded:account.permission_recorded===true,source_media_ready:product.quality?.media_ready===true,source_copy_ready:product.quality?.copy_ready===true,source_product_ready:product.quality?.production_ready===true,source_freshness_ready:product.quality?.freshness_ready===true,source_promotion_ready:product.quality?.promotion_ready===true,source_risk_flags:product.quality?.risk_flags||[]},approval:null}; /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/campaign.js:27:function approveCampaign(id,confirmation){const c=loadCampaign(id);if(!c)throw new Error('campaign not found');if(!c.readiness?.media_valid)throw new Error('media validation has not passed');if(!c.readiness?.source_product_ready)throw new Error('source product is not production-ready: a complete title, description, price and real product image are required');if(!c.readiness?.source_promotion_ready)throw new Error('source product requires rights or safety review before approval');if(!c.readiness?.source_freshness_ready)throw new Error('source availability verification is stale; resync before approval');if(!c.readiness?.account_verified)throw new Error('exact Instagram account is not verified');if(!c.readiness?.permission_recorded)throw new Error('instagram_business_content_publish permission is not confirmed');if(!c.readiness?.public_media_ready)throw new Error('approved public HTTPS media delivery is not configured');const current=rehash(c);if(current!==c.frozen_hash){c.status='NEEDS_REAPPROVAL';c.approval=null;writeJsonAtomic(campaignPath(id),c);throw new Error('campaign changed after freezing');}if(confirmation!==`APPROVE ${c.frozen_hash}`)throw new Error('approval phrase does not match exact frozen campaign hash');c.approval={approver:'Ray Morrison',approved_hash:c.frozen_hash,approved_at:nowIso(),method:'explicit-dashboard-confirmation'};c.status='APPROVED';writeJsonAtomic(campaignPath(id),c,0o640);return c;} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/campaign.js:30:function suiteSummary(s){const campaigns=(s.campaign_ids||[]).map(loadCampaign).filter(Boolean);return {...s,campaign_count:campaigns.length,post_types:campaigns.map(c=>c.post_type),account_username:campaigns.find(c=>c.account?.username)?.account?.username||null,manual_post_ready:campaigns.length===3&&campaigns.every(c=>c.readiness?.media_valid&&c.readiness?.account_verified&&c.readiness?.source_product_ready&&c.readiness?.source_promotion_ready&&c.readiness?.source_freshness_ready),api_publish_ready:campaigns.length===3&&campaigns.every(c=>c.readiness?.media_valid&&c.readiness?.account_verified&&c.readiness?.permission_recorded&&c.readiness?.source_product_ready&&c.readiness?.source_promotion_ready&&c.readiness?.source_freshness_ready&&c.readiness?.public_media_ready)};} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/instagram.js:10:async function createContainer(accountId,asset,caption,token,kind,isCarouselItem=false){const p={};if(kind==='REEL'){p.media_type='REELS';p.video_url=asset.public_url;p.caption=caption;p.share_to_feed='true';}else{p.image_url=asset.public_url;if(isCarouselItem)p.is_carousel_item='true';else p.caption=caption;}const r=await formPost(`${BASE}/${accountId}/media`,p,token);if(r.status<200||r.status>=300||!r.data?.id)throw new Error(`create container failed HTTP ${r.status}: ${r.data?.error?.message||'no id'}`);return String(r.data.id);} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/instagram.js:11:async function pollContainer(id,token){for(let i=0;i<30;i++){const r=await fetchJson(`${BASE}/${id}?fields=status_code,status`,{headers:{Authorization:`Bearer ${token}`},timeout:25000});if(r.status>=400)throw new Error(`container status HTTP ${r.status}: ${r.data?.error?.message||''}`);const code=r.data?.status_code;if(code==='FINISHED')return r.data;if(['ERROR','EXPIRED'].includes(code))throw new Error(`container ${code}: ${r.data?.status||''}`);await sleep(Math.min(15000,2000+i*500));}throw new Error('container processing timed out');} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/instagram.js:12:async function publishContainer(accountId,creationId,token){const r=await formPost(`${BASE}/${accountId}/media_publish`,{creation_id:creationId},token);if(r.status<200||r.status>=300||!r.data?.id)throw new Error(`media_publish failed HTTP ${r.status}: ${r.data?.error?.message||'no media id'}`);return r;} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/instagram.js:22: const started=nowIso();const receipt={schema_version:1,campaign_id:campaign.id,approved_campaign_hash:campaign.frozen_hash,account:acct,started_at:started,containers:[],status:'publishing'};writeJsonAtomic(receiptFile,receipt,0o600); /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/instagram.js:26: const children=[];for(const a of campaign.assets){const id=await createContainer(acct.account_id,a,'',session.accessToken,'FEED',true);children.push(id);receipt.containers.push({id,type:'child'});}const r=await formPost(`${BASE}/${acct.account_id}/media`,{media_type:'CAROUSEL',children:children.join(','),caption:campaign.full_caption},session.accessToken);if(r.status>=300||!r.data?.id)throw new Error(`carousel container failed HTTP ${r.status}: ${r.data?.error?.message||''}`);creationId=String(r.data.id);receipt.containers.push({id:creationId,type:'carousel'}); /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/lib/instagram.js:27: } else {creationId=await createContainer(acct.account_id,campaign.assets[0],campaign.full_caption,session.accessToken,campaign.post_type, false);receipt.containers.push({id:creationId,type:campaign.post_type});} /home/shire3d/ARMOR/agents/apps/marketing-boss/production-pipeline/tests/run-tests.js:38: const fixture={schema_version:1,id:'approval-fixture',status:'FROZEN',created_at:new Date().toISOString(),account:{account_id:'123',username:'shire3d'},post_type:'FEED',product:{title:'Fixture'},caption:'Fixture',hashtags:['#Shire3D'],full_caption:'Fixture #Shire3D',assets:[],readiness:{dry_run:true,media_valid:true,source_product_ready:true,source_promotion_ready:true,source_freshness_ready:true,account_verified:true,permission_recorded:true,public_media_ready:true},approval:null};fixture.frozen_hash=rehash(fixture);writeJsonAtomic(campaignPath(fixture.id),fixture);assert.throws(()=>approveCampaign(fixture.id,'APPROVE wrong'),/does not match/);const approved=approveCampaign(fixture.id,`APPROVE ${fixture.frozen_hash}`);assert.equal(approved.status,'APPROVED'); /home/shire3d/ARMOR/agents/apps/marketing-boss/VERIFICATION.md:74:The visual checks used the packaged CSS and JavaScript in an isolated browser fixture because the build environment blocks browser navigation to localhost. A complete external OAuth login cannot be performed in the build container because it would require Ray's private developer applications, secrets, account consent and—in some cases—platform review. The implementation was therefore tested for provider construction, callbacks, state/PKCE safeguards, redaction, local status, safe failure and token-storage boundaries. /home/shire3d/ARMOR/agents/apps/marketing-boss/callback-gate.js:10:const PUBLIC_HOST = String(process.env.PUBLIC_CALLBACK_HOST || 'marketing-auth.shire3d.com').toLowerCase(); /home/shire3d/ARMOR/agents/apps/marketing-boss/tests/separate-meta.test.js:9: 'https://marketing-auth.shire3d.com/api/oauth/callback/facebook'; /home/shire3d/ARMOR/agents/apps/marketing-boss/tests/separate-meta.test.js:11: 'https://marketing-auth.shire3d.com/api/oauth/callback/instagram'; /home/shire3d/ARMOR/agents/apps/marketing-boss/tests/separate-meta.test.js:26: 'https://marketing-auth.shire3d.com/api/oauth/callback/instagram' /home/shire3d/ARMOR/agents/apps/marketing-boss/tests/callback-gate.test.js:49: publicHost: 'marketing-auth.shire3d.com', /home/shire3d/ARMOR/agents/apps/marketing-boss/tests/callback-gate.test.js:67: host: 'marketing-auth.shire3d.com' === PUBLIC DOMAIN DNS === 54.253.94.210 DGRAM 54.253.94.210 RAW 54.253.94.210 STREAM === PUBLIC HTTPS RESPONSE === HTTP/2 200 accept-ranges: bytes age: 2 cache-control: no-store,max-age=0 cache-status: "Netlify Edge"; fwd=miss; fwd-status=200; stored content-security-policy: default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; frame-ancestors 'none'; form-action 'none' content-type: text/html; charset=UTF-8 date: Fri, 31 Jul 2026 07:37:44 GMT etag: "87f0a0800aa4f8d16f31020d81fcba00-ssl" permissions-policy: camera=(), microphone=(), geolocation=() referrer-policy: no-referrer server: Netlify strict-transport-security: max-age=31536000 x-content-type-options: nosniff x-frame-options: DENY x-nf-request-id: 01KYVHQ2CPXFECZPWVGP8R6T2S content-length: 947 === OAUTH CALLBACK ROUTE RESPONSE === HTTP/2 302 age: 0 cache-control: public,max-age=0,must-revalidate cache-status: "Netlify Edge"; fwd=miss; fwd-status=302; stored content-type: text/plain date: Fri, 31 Jul 2026 07:37:44 GMT location: http://100.116.93.90:4173/api/oauth/callback/instagram netlify-vary: query server: Netlify strict-transport-security: max-age=31536000 x-nf-request-id: 01KYVHQ3HNACY3M6XWW8WM2XTW === CURRENT SAFETY LOCKS === File "", line 9 print(f"Pipeline version: {data.get(\"version\")}") ^ SyntaxError: unexpected character after line continuation character