================================================================================
SAFE_STAGING_TO_LIVE_TRANSITION_RULES_5_12_26.txt
CollabORhythm / Collabtunes — Verified Staging Production Mode
Generated: 5.12.26 | Production Claude
PURPOSE: Define exactly when a staging page becomes live-safe, what QA minimums
         are required, what Tom approvals are required, where rollback checkpoints
         go, and what propagation safety checks apply.
================================================================================

RULE: A page is not live-safe until ALL gates in its tier are cleared.
      Clearing some gates does not make a page partially live-safe.
      Pass all gates or stay in staging.

================================================================================
SECTION 1 — WHEN STAGING BECOMES LIVE-SAFE
================================================================================

A staging page is live-safe when ALL of the following are true:

  GATE 1 — STAGING BANNER REMOVED
    The red staging banner div is removed from the HTML.
    Filename has _STAGING removed and _APPROVED added.
    Example: SONG_LIST_1_..._AIO_STAGING_... → SONG_LIST_1_..._AIO_APPROVED_...

  GATE 2 — TOM HAS APPROVED THE PAGE
    Tom has reviewed the page and given explicit approval.
    Approval covers: structure, visual style, placeholder display, canon accuracy.
    Approval is not assumed — it must be documented.

  GATE 3 — TEMPLATE IS LOCKED (AIO pages only)
    The AIO template V1 must be approved by Tom (via SL1 approval).
    No AIO page is live-safe until the template is locked.
    All AIO pages must use the same locked template version.

  GATE 4 — ALL SOURCE_PULL BADGES ARE RESOLVED OR ACCEPTED
    Either: all SOURCE_PULL badges replaced with confirmed data, OR
    Tom has explicitly accepted that specific badges will remain visible
    in the deployed version (e.g. accepting a summary placeholder at launch).
    Raw bracket text [SOURCE_PULL_REQUIRED] must never appear in live page body.

  GATE 5 — RATING GATE TESTED IN BROWSER
    For any gated page (PG-13, R, NC-17, X):
    Gate tested in Chrome, Firefox, and mobile at all 5 rating levels.
    G/PG visitor cannot reach PG-13+ content.
    R visitor cannot reach NC-17/X content.
    Results documented — not assumed from code review alone.

  GATE 6 — ALL INTERNAL LINKS VERIFIED
    Every internal link checked against MASTER_URL_AUTHORITY_REGISTRY.
    No links point to conflict URLs (ch.18 dup, LadyWeaver dup).
    No links return 404. Tested in browser — not just code review.
    Crosslinks blocked by URL conflicts must remain as SOURCE_PULL badges
    until conflicts are resolved — do not inject unresolved URLs.

  GATE 7 — DEFAMATION REGISTRY CLEARED FOR THIS COLLECTION
    Tom has reviewed DEFAMATION_RISK_REGISTRY_VOL1.
    The specific collection being deployed is confirmed clear.
    This is a global hard block — nothing deploys until Tom completes review.

  GATE 8 — NO PROFANITY VISIBLE WITHOUT APPROPRIATE GATE
    Confirmed in browser: G/PG visitor sees no profanity anywhere on the page.
    Bouncer V2 is live and functioning before this check is meaningful.

  GATE 9 — ROLLBACK ZIP CREATED AND VERIFIED
    A rollback ZIP of the current Yola state exists before upload.
    ZIP has been confirmed downloadable and opens correctly.
    Named: ROLLBACK_[PAGE_OR_SYSTEM]_PRE_DEPLOY_[DATE].zip

  GATE 10 — PAGE ADDED TO DEPLOYMENT MANIFEST
    Page is documented in the session deployment manifest before uploading.
    Manifest records: filename, URL slug, gate used, Tom approval date.

ADDITIONAL GATES FOR R-RATED PAGES:
  GATE R-1 — Block 11 trigger warning block populated from source
             Do not deploy an R page with SOURCE_PULL badge in Block 11.
  GATE R-2 — R gate specifically confirmed: G/PG/PG-13 visitors redirected
             Test this explicitly — do not assume from PG-13 gate test.

ADDITIONAL GATES FOR ESTIMATED-RATING PAGES (e.g. SetList3–6):
  GATE E-1 — mood_settings file processed and rating confirmed
             Rating badge must show confirmed rating, not "Estimated."
             A page with an estimated rating badge is not live-safe.

================================================================================
SECTION 2 — REQUIRED QA MINIMUMS
================================================================================

The following checks are the minimum required before any page is submitted
for Tom review. These must all pass before a page leaves STAGING COMPLETE
and moves to TOM REVIEW PENDING.

AUTOMATED QA (production Claude runs these):
  [ ] Profanity scan: no profanity in visible text content
  [ ] Palette scan: no #ffffff text, no #00ff00, no lava/gamer colors
  [ ] Naming standard: filename follows [COLLECTION]_[TITLE]_AIO_[STATUS]_[DATE] format
  [ ] Gate logic present: rating gate JS at bottom of body
  [ ] Gate logic correct: allowed array matches page rating level
  [ ] Canon accuracy: title matches FINAL_CANON_AUTHORITY_REGISTRY exactly
  [ ] Staging banner present: red banner div in HTML
  [ ] All SOURCE_PULL badges use CSS class, not raw bracket text
  [ ] No empty blocks: every block has content or a styled badge
  [ ] Footer present and correct: standard footer text

MANUAL QA (human runs these — use MANUAL_QA_VERIFICATION_WORKFLOW_5_12_26.txt):
  [ ] Page renders correctly in Chrome (layout, fonts, colors)
  [ ] Page renders correctly in Firefox
  [ ] Mobile portrait: "turn phone sideways" message appears
  [ ] Mobile landscape: content readable, no horizontal scroll
  [ ] Fast scroll buttons functional — all anchors reachable
  [ ] Back to Switchboard button present and functional
  [ ] All internal nav links functional (no 404s)
  [ ] Rating gate tested at all 5 levels in actual browser
  [ ] SOURCE_PULL badges render as styled gold badges (not raw text)
  [ ] Canon notes block (Block 14) populated — not empty
  [ ] Reconstruction status block (Block 15) populated — not empty

MINIMUM PASS THRESHOLD:
  All automated checks: PASS (zero failures acceptable)
  Manual checks: minimum 40 of 48 items PASS, with no FAIL on:
    — Gate logic, profanity, palette, canon title accuracy, staging banner

================================================================================
SECTION 3 — REQUIRED TOM APPROVALS BY PAGE TYPE
================================================================================

G-RATED UTILITY PAGES (Mission Statement, PDF Landing):
  [ ] Tom reviews page in browser
  [ ] Tom confirms content is accurate and acceptable
  [ ] Tom provides any missing copy (placeholder sections)
  [ ] Tom confirms URL slug before Yola upload

BOUNCER / GATE SYSTEM PAGES:
  [ ] Tom reviews bouncer in browser at all 5 rating levels
  [ ] Tom confirms subtitle copy is acceptable
  [ ] Tom confirms default state (G/PG) looks correct
  [ ] Tom approves deploy

AIO ALBUM PAGES (all 34):
  [ ] Tom approves SL1 staging page first — this locks the template
  [ ] Template lock is documented before any AIO is deployed
  [ ] Tom reviews the specific collection page
  [ ] Tom confirms canon accuracy (title, rating, any confirmed track data)
  [ ] Tom confirms placeholder badges are acceptable for launch OR
      requests source pull before launch
  [ ] Tom approves deploy for that specific page

R-RATED PAGES (SetList7, SetList8, SetList9, SetList17):
  All of the above, PLUS:
  [ ] Tom reviews Block 11 trigger warning content specifically
  [ ] Tom confirms R gate is working correctly in browser
  [ ] Tom approves R-rated content display

GLOBAL APPROVALS (apply to all pages, can be given once):
  [ ] Tom reviews DEFAMATION_RISK_REGISTRY_VOL1 (one-time — unblocks all)
  [ ] Tom confirms chapter drift fix option (Decision 06) — unblocks crosslinks
  [ ] Tom confirms Lady Weaver canonical URL (Decision 09) — unblocks LW crosslinks

================================================================================
SECTION 4 — ROLLBACK CHECKPOINTS
================================================================================

CHECKPOINT TIMING — create a rollback ZIP at these moments:

  BEFORE SESSION START:
    Name: ROLLBACK_COLLABTUNES_SESSION_START_[DATE].zip
    Contents: All current working HTML prototypes + any live page snapshots
    Verify: ZIP downloads and opens before touching anything

  BEFORE ANY LIVE YOLA EDIT:
    Name: ROLLBACK_[SYSTEM]_PRE_[OPERATION]_[DATE].zip
    Examples:
      ROLLBACK_NAV_PRE_DEV_PAGE_REMOVAL_5_12_26.zip
      ROLLBACK_BOUNCER_PRE_V2_DEPLOY_5_12_26.zip
      ROLLBACK_SL1_PRE_AIO_UPLOAD_5_12_26.zip
    Verify: ZIP downloads and opens before the edit begins

  AFTER EACH SUCCESSFUL DEPLOY:
    Name: CHECKPOINT_[SYSTEM]_POST_[OPERATION]_[DATE].zip
    Contents: The deployed file + verification notes
    Purpose: Record of what is now live

  AFTER EACH SESSION:
    Name: [N]_MIXED_COLLABTUNES_SESSION_END_[DATE].zip
    Contents: All files produced in the session
    Purpose: Full session archive before closing

ROLLBACK PROCEDURES BY SCENARIO:

  BOUNCER FAILURE (gate not working):
    → Immediately revert Yola to the pre-deploy rollback ZIP version
    → Do not attempt to patch the live bouncer under pressure
    → Fix in staging, re-QA, re-submit

  SINGLE AIO PAGE FAILURE:
    → Delete the page from Yola
    → Nothing else is affected — do not touch other pages
    → Regenerate from locked template, re-QA, re-deploy

  NAV CORRUPTION (partial drift fix, wrong removal):
    → Full revert from pre-edit rollback ZIP immediately
    → Do not attempt partial fix — always full revert
    → Re-plan the operation before attempting again

  RATING GATE FAILURE (explicit content surfacing):
    → Remove gate JS from affected page — page reverts to ungated
    → Flag to Tom immediately
    → Do not redeploy until gate is confirmed working in browser

  WRONG CANON IN DEPLOYED PAGE (wrong title, wrong rating):
    → Remove page from Yola immediately
    → Do not patch the live page — regenerate from source
    → Verify against FINAL_CANON_AUTHORITY_REGISTRY before redeploying

================================================================================
SECTION 5 — PROPAGATION SAFETY CHECKS
================================================================================

Before propagating any change across multiple pages (nav updates, footer
updates, header updates, gate JS updates):

  PRE-PROPAGATION CHECKS:
    [ ] Change tested on one page first — confirmed working in browser
    [ ] Rollback ZIP created before starting propagation
    [ ] Tom has approved the change (or it is confirmed safe default)
    [ ] Session has sufficient time to complete entire propagation
        (do not start a 17-chapter drift fix if session may time out)

  SAFE COMBINATIONS (can propagate in same session):
    Header + Footer changes (both additive, low risk)
    Fast scroll + Back button additions (both additive)
    Rating badges + Warning badges (after mood_settings processed)

  DO NOT COMBINE IN SAME SESSION:
    Rating gate propagation + Nav bar changes (different risk profiles)
    Chapter drift fix + Any other nav operation (compounded risk)
    AIO page generation + Live site edits (separate sessions)
    Any propagation + Bulk generation (stabilize first, then generate)

  BATCH SIZE LIMITS:
    AIO page generation: maximum 5 pages per session before QA pass
    Nav edits: one system at a time (nav labels OR URLs — never both)
    Gate additions: one gate level at a time, verified before next level

  AFTER PROPAGATION:
    [ ] Spot-check minimum 3 random pages to confirm change applied correctly
    [ ] Confirm no unintended side effects on spot-checked pages
    [ ] Create post-propagation checkpoint ZIP
    [ ] Document what was propagated and to how many pages

================================================================================
SECTION 6 — LIVE TRANSITION SIGN-OFF RECORD
================================================================================

For each page deployed, record the following before uploading to Yola:

  PAGE:                    _______________________________________________
  FILE DEPLOYED:           _______________________________________________
  YOLA URL:                _______________________________________________
  TEMPLATE VERSION:        _______________________________________________
  TOM APPROVAL DATE:       _______________________________________________
  GATE TESTED:             [ ] Chrome  [ ] Firefox  [ ] Mobile
  DEFAMATION CLEARED:      [ ] YES
  ROLLBACK ZIP:            _______________________________________________
  DEPLOYED BY:             _______________________________________________
  DEPLOY DATE:             _______________________________________________
  POST-DEPLOY VERIFIED:    [ ] Page loads at URL  [ ] Gate functions  [ ] No 404s

================================================================================
END SAFE_STAGING_TO_LIVE_TRANSITION_RULES_5_12_26.txt
================================================================================
