Home / Ops / More in this area
Updated Jul 18, 2026 · Affirmology_LostChat_Recovery_VideoMissionPDF_v1.md
Paste the fenced block below into a fresh chat to bring it fully up to speed. It reconstructs a lost Cowork session that handled the Mission video files (encoding, serving on Cloudflare R2, results-page wiring, and adaptive streaming). Reconstructed 2026-07-18 from two on-disk transcripts: session 861b91b9 (7/11) and session 1c758d99 (7/14).
CATCH-UP: AFFIRMOLOGY MISSION VIDEO + RESULTS-PAGE VIDEO WIRING (recovered chat)
1. CONTEXT
This chat handled the MISSION / experience video assets for Affirmology: taking Jeff's raw
video exports out of the /Users/jeffreyparker/CLAUDE/AFFIRMOLOGY folder, web-optimizing them
with ffmpeg, uploading ("encrypting" in Jeff's shorthand = putting on the server) to Cloudflare
R2, and wiring them into the live demo results flow. "Encrypt it on server" always meant
"upload to R2," not real encryption. There is NO per-video encryption layer in this project;
every video is served as a plain mp4 (or HLS ladder) from Cloudflare R2 at media.affirmology.ai.
The work spanned two sessions: 7/11 (replacing the single investor "mission video" with newer
cuts) and 7/14 (introducing Video 1 + Video 2 as distinct films, restructuring the results page,
and building adaptive multi-quality streaming with branded share links). Note: the 7/11 session
also ran a large parallel thread building "The Mirror" reading audios for ~32 people, which is
a SEPARATE workstream, not video (see the OTHER-CONTEXT note at the end).
2. WHERE IT WAS LEFT (current state as of end of 7/14 session, the most recent)
DONE and live on demo.affirmology.ai:
- Video 2 Mission (the investor/"where this is going" film) is the live mission film everywhere.
Final source was "Video 2 Mission Best.mp4" (542MB master, clean 6:17 cut, no trailing black).
Encoded HIGH QUALITY (CRF 18, up to ~9 Mbps, faststart) -> ~293-308MB, replacing R2 key
experience/mission-video.mp4. Cover label reads "about 5 min".
- Video 1 Mission is the PRE-song opening film. Lives at R2 key experience/video-1-mission.mp4,
re-encoded high quality (~172MB). primer.html (what a new customer watches while their Origin
Soul Song renders) points at Video 1.
- Results page (result.html) layout: Video 1 sits ABOVE the Origin Soul Song for up-scroll
discovery (moved, not duplicated), Video 2 is the "Watch this next" mission film after the
song, and the "Affirmology, in real life" playful-cartoon (the old experience-video) sits at
the very bottom.
- Adaptive multi-bitrate HLS is built and live for BOTH videos: 3-rung ladder (1080p @ 6 Mbps,
720p @ 3 Mbps, 480p @ 1.2 Mbps), vendored hls.js (local, no CDN), CORS set on the R2 bucket.
- Branded standalone share/player pages are live:
demo.affirmology.ai/watch?v=video-2-mission (Mission film / Video 2)
demo.affirmology.ai/watch?v=video-1-mission (Opening film / Video 1)
These are adaptive, full-bleed, tap-to-play, with cover screens. These are the direct-send links.
- The old "New Sophia" mission cut is preserved on R2 at experience/mission-video-newsophia.mp4.
- Local storage was cleaned up: deleted 6 dead mission-video variations (~2.0GB) plus stale
masters and a bad untrimmed 14-min Video 2 export. Kept the current masters.
CAUTION / KNOWN CROSS-CHAT CONFLICT:
- On 7/11 this chat had the mission-video.mp4 key holding the 6:51 investor film (the
"Affirmology Sol Update" cut, then briefly a "New Sophia Mission" cut). A bad Sophia upload
"broke" something, so it was reverted to the Sol Update cut. Then ANOTHER chat (CODE) re-uploaded
the Sophia cut and owns that fix. THEN on 7/14 this chat overwrote mission-video.mp4 again with
Video 2 Mission Best. So the same R2 key changed hands/meaning several times across chats.
Before touching experience/mission-video.mp4, VERIFY what is currently live and coordinate in
_CHAT_SYNC.md so two chats do not clobber each other on that one key.
3. KEY DECISIONS / SETTINGS
- "Encrypt on server" = upload to Cloudflare R2. No real encryption anywhere.
- R2 bucket: affirmology-media. Public domain: media.affirmology.ai. Credentials live in
affirmology-agent/.env (do NOT print them). Uploads done via boto3 or wrangler.
- Two encode profiles were used, deliberately:
* Web-light (7/11 investor mission cut): H.264 CRF 22, preset slow, ~1.6-2 Mbps cap,
AAC 128k, +faststart -> ~105MB from a ~600MB source.
* Quality-first (7/14): CRF 18, up to ~9 Mbps, faststart, for capable devices. Plus the
3-rung HLS ladder for true adaptive delivery.
Decision: move away from the tiny single-bitrate encode toward HLS adaptive so fast devices
get crisp 1080p and slow connections step down instead of buffering.
- Video roles: Video 1 = opening/pre-song film (primer.html + above the song on results).
Video 2 = the mission / "where this is going" investor film (after the song, the direct-send piece).
- Results-page anchor links: result?j=<job_id> takes optional &at= to auto-scroll on load:
at=song (default) | at=mission | at=mirror | at=top.
- CORS: media.affirmology.ai R2 bucket now sends access-control-allow-origin: * (read-only),
set via `wrangler r2 bucket cors set` (Cloudflare rules schema, not S3). Required for hls.js
segment fetches to work in Chrome/Firefox/Edge; Safari/iOS play HLS natively.
- Deploy path for the site: manual `wrangler deploy` from the affirmology-site repo (only
primer.html and result.html were changed).
- Copy/label decisions on results page: heading swapped so "Watch this next" is prominent and
"See where this is going" is the small eyebrow; removed a doubled spacer star before the
gratitude text; bottom experience-video heading changed from "Want to feel it again?" to
"Affirmology, in real life" (playful cartoon on real-world use cases); Video 1 got a gold
cover/play overlay; play-button scroll now centers the player after the opening film.
4. OPEN / NEXT
- The R2 key experience/mission-video.mp4 is contested across chats (see CAUTION). Confirm the
current live cut is the intended one (Video 2 Mission Best HQ) and that no other chat has since
re-reverted it to the Sophia or Sol Update cut.
- Infra fragility flagged at end of 7/11: the Studio is ONE Render instance running the live
Oracle chat + all heavy jobs on one process with SQLite on one disk, so heavy work (renders,
big R2 uploads) starves the live site and it goes 7-30s slow. Recommended fixes handed to the
CODE chat: split the Oracle/chat API into its own service, move DB to Postgres, queue heavy
jobs off-peak. Not this chat's to fix, but it gates customer sends (a slow result page is the
worst first impression).
- Credit/spend question was open at the end of 7/14: Jeff saw small $10-$16 overnight API charges.
Verified NOT the backend (self-heal ran $0.00, growth cron capped ~$2, no voice renders). Most
likely Claude Code (Fable) usage over limit, backend Anthropic key second. No Anthropic Admin
API key is configured, so exact spend cannot be pulled programmatically. If Jeff wants exact
numbers, an Anthropic Admin API key would need to be set.
5. FILES, ASSETS, LINKS
- Project docs to read: Affirmology_PROJECT_STATE.md (source of truth), _CHAT_SYNC.md (cross-chat
deploy coordination, read the latest date block), _SHARED_CONTEXT.md.
- Site repo (deploys to demo.affirmology.ai via wrangler): affirmology-site/ - edited files were
primer.html and result.html; hls.js is vendored locally in that repo.
- R2 keys (bucket affirmology-media, served at media.affirmology.ai/...):
experience/mission-video.mp4 -> current mission film (Video 2 Mission Best, HQ)
experience/video-1-mission.mp4 -> opening film (Video 1)
experience/mission-video-newsophia.mp4-> archived old New Sophia mission cut
experience/experience-video.mp4 -> the "Affirmology in real life" cartoon
plus HLS ladders (m3u8 playlists + segments) for video-1-mission and video-2-mission
- Live/share URLs:
https://media.affirmology.ai/experience/mission-video.mp4
https://media.affirmology.ai/experience/video-1-mission.mp4
https://demo.affirmology.ai/watch?v=video-2-mission
https://demo.affirmology.ai/watch?v=video-1-mission
- Local source masters were in /Users/jeffreyparker/CLAUDE/AFFIRMOLOGY (files named "Video 1
Mission.mp4", "Video 2 Mission Best.mp4", "New Sophia Mission Video.mp4", "Affirmology Sol
Update.mp4"). Several stale variants were deleted; the current masters were kept.
- Credentials referenced (values NOT printed): R2 keys in affirmology-agent/.env; RESEND email
key and ANTHROPIC key in affirmology-studio/.env; DEMO_AUTH_TOKEN / STUDIO_AUTH_TOKEN for the
admin/status endpoints. wrangler is authenticated to the Cloudflare account.
6. OTHER CONTEXT WORTH KNOWING (was interleaved, not video)
- The 7/11 session spent most of its length on a NON-video thread: building "The Mirror"
Recognition reading audios for ~32 people (rendered locally via Fish at 0.91 pace, normalized,
QC'd, pushed to R2 under mirror/gift/, attached to each person's result page via
POST /api/attach-mirror). That batch ended with 28-of-32 rendered, a review email sent to Jeff
+ Sol, NOTHING sent to customers, and the send GATED on the demo site being fast again. If you
need the Mirror state, that is a separate recovery, not this video one.
- A "mission PDF / mission doc" WIP existed in the demo-site repo, being edited by ANOTHER chat
(this chat deliberately did NOT commit it when pushing a demo_render.py fix). The results page
references a "mission doc" section. The PDF itself was not produced in these two sessions;
look to the CODE / DATA chats for the mission-PDF deliverable.