================================================================================
MOST_DANGEROUS_IMPLEMENTATION_FAILURES_5_12_26.txt
CollabORhythm / Collabtunes — Implementation Simulation + Failure Prevention Phase
Generated: 5.12.26
PURPOSE: Document every catastrophic risk scenario before first production run
================================================================================

SEVERITY CODES:
  🔴 CATASTROPHIC = immediate public harm, legal risk, or data loss
  🟠 SEVERE       = live site broken, content integrity failure
  🟡 SIGNIFICANT  = multiple pages affected, rollback required
  🟢 MANAGEABLE   = fixable without rollback, staging-only impact

================================================================================
FAILURE 1 — X-RATED CONTENT SURFACES WITHOUT GATE
Severity: 🔴 CATASTROPHIC
================================================================================

SCENARIO: NC-17 or X-rated content becomes accessible to all visitors
          without a rating selection gate.

HOW IT HAPPENS:
  A. Gating JS has a bug — condition check inverted or missing
  B. Rating key not set in localStorage — gate defaults to open
  C. New page deployed without gating JS included
  D. Bouncer default state still ratings[4] — all visitors start at X

INDICATORS:
  - G/PG visitor can navigate to /1-to-34-quick-guide-x/
  - HOW I GOT HERE dirty version accessible from nav
  - Bouncer shows "BAD MUTHA FUCKA" on page load

PREVENTION:
  Fix Bouncer default state FIRST (Day One, Hour 2)
  Test gate logic on all 5 rating levels before deploying any gated page
  Every generated page must include gating JS before deployment

RECOVERY:
  IMMEDIATE: Revert gating JS to last known good version
  If bouncer default: Revert to ratings[0] fix
  Check all pages affected in that batch — revert all

================================================================================
FAILURE 2 — NAV CORRUPTION AFTER PARTIAL CHAPTER DRIFT FIX
Severity: 🔴 CATASTROPHIC (affects ALL 121+ pages)
================================================================================

SCENARIO: Chapter drift fix applied to some chapters but not others,
          creating mixed/inconsistent nav across the entire site.

HOW IT HAPPENS:
  A. Fixing chapters 18B–25 in one session but session times out before finishing
  B. Option A (labels) applied to some chapters while Option B (URLs) applied to others
  C. Chapter 18 duplicate issue not resolved before drift fix — creates three conflicting entries

INDICATORS:
  - Nav shows "19 of 35" linking to /18-of-35/ for some chapters
  - Nav shows "19 of 35" linking to /19-of-35/ for others
  - Visitor can't predict which chapter number is which

PREVENTION:
  Fix ALL 17 drifted chapters in ONE atomic operation — no partial
  Resolve ch.18 duplicate BEFORE touching drift
  Create rollback ZIP of entire nav before starting
  If session might time out: don't start drift fix in that session

RECOVERY:
  Revert Yola nav to pre-fix snapshot immediately
  Do not attempt partial fix recovery — revert and restart from scratch

================================================================================
FAILURE 3 — DEFAMATION-FLAGGED CONTENT PUBLISHED PUBLICLY
Severity: 🔴 CATASTROPHIC (legal exposure)
================================================================================

SCENARIO: Content identified in DEFAMATION_RISK_REGISTRY_VOL1 is included
          in a generated page and deployed to the public site.

HOW IT HAPPENS:
  A. Generator pulls content from source file without checking defamation registry
  B. Tom hasn't reviewed the registry — Claude doesn't know what's flagged
  C. Bulk generation runs before defamation clearance is complete

INDICATORS:
  - Tom reviews generated page and identifies flagged content
  - Third party contacts site about defamatory content

PREVENTION:
  Tom reviews DEFAMATION_RISK_REGISTRY_VOL1 before ANY generation begins
  Generator must check each collection against cleared list before generating
  No bulk generation until Tom provides clearance

RECOVERY:
  IMMEDIATE: Remove page from public access
  Preserve backup of flagged content for legal reference
  Do not regenerate until Tom clears the specific item

================================================================================
FAILURE 4 — WRONG CANON TITLE IN DEPLOYED PAGES
Severity: 🟠 SEVERE
================================================================================

SCENARIO: A collection page is generated with a wrong title — either invented
          or carried over from another collection.

HOW IT HAPPENS:
  A. Generator pulls title from session memory instead of CANON_AUTHORITY_REGISTRY
  B. Template variable not updated between collection generations
  C. SL1 title bleeds into SL2 page during rapid batch generation

INDICATORS:
  - "The Last Man Singing" appears in a Set List page
  - Collection title doesn't match the URL slug

PREVENTION:
  Every generated page title must be verified against CANON_AUTHORITY_REGISTRY
  Template variables must be explicitly reset between collection generations
  Cross-contamination check: search generated HTML for any other collection's title

RECOVERY:
  Regenerate affected pages from scratch using correct data
  Do not patch — full regeneration is safer than manual correction

================================================================================
FAILURE 5 — RAIN DESCRIBED AS A COMPLETE TRACK
Severity: 🟠 SEVERE (canon violation — locked rule)
================================================================================

SCENARIO: Song List 1 Track 8 "Rain" is described or presented as a
          complete track when it is only two stanzas.

HOW IT HAPPENS:
  A. Source pull finds more Rain content and generator includes it without verification
  B. Template block 7 populates Track 8 without the "partial" flag
  C. Editorial generation for Block 6 describes Rain as a full song

INDICATORS:
  - Track 8 listed without "(partial — two stanzas only)" notation
  - Block 6 review discusses Rain as a complete composition

PREVENTION:
  Hard-code the partial flag on Track 8 in the template — never removable
  Block 6 editorial generation must be checked for Rain description
  CANON ALERT in Canon Notes block: "Track 8 Rain: partial only — two stanzas"

RECOVERY:
  Update deployed SL1 page to add partial notation
  Review any editorial content about SL1 for Rain description

================================================================================
FAILURE 6 — GENERATOR TEMPLATE VERSION DRIFT
Severity: 🟠 SEVERE
================================================================================

SCENARIO: Different AIO pages are generated from different template versions,
          creating structural inconsistency across the catalog.

HOW IT HAPPENS:
  A. Template edited after some pages generated but before others
  B. Two sessions use different template files without checking version
  C. "Quick fix" applied directly to a generated page rather than the template

INDICATORS:
  - SL1 page has different block order than SL5 page
  - Some pages have Block 11 warning system, others don't
  - Structural inconsistency visible when browsing between collections

PREVENTION:
  Lock template ONCE — never edit after locking
  Version number in every template file name: V1, V2 etc.
  If fix needed: create V2, document changes, regenerate ALL prior pages
  Never patch individual generated pages — patch the template

RECOVERY:
  Identify which pages were generated from wrong template version
  Regenerate those pages from the correct locked template

================================================================================
FAILURE 7 — PLACEHOLDER LEAK IN DEPLOYED PAGE
Severity: 🟡 SIGNIFICANT
================================================================================

SCENARIO: Raw [SOURCE_PULL_REQUIRED] text or empty blocks appear in a
          deployed public-facing page.

HOW IT HAPPENS:
  A. CSS class .pending-badge not included in template
  B. STAGING page deployed without removing STAGING designation
  C. Empty block div included with no content and no badge

INDICATORS:
  - Raw bracket text visible: [SOURCE_PULL_REQUIRED]
  - Empty sections visible to public
  - "STAGING" appears in page title or filename

PREVENTION:
  CSS class must be in every template — verify before generating
  STAGING pages must never be deployed — naming convention enforces this
  Every block must have content OR a styled badge — no empty blocks allowed

RECOVERY:
  Apply badge CSS if missing
  Remove or hide any empty blocks
  Rename/remove STAGING pages from public access

================================================================================
FAILURE 8 — CROSSLINK CASCADE FROM WRONG URL
Severity: 🟡 SIGNIFICANT
================================================================================

SCENARIO: All 34 AIO pages have crosslinks that point to a wrong or
          conflicted URL (ch.18 duplicate, LadyWeaver conflict, etc.)

HOW IT HAPPENS:
  A. Crosslinks generated before URL conflicts resolved
  B. Generator pulls from memory instead of MASTER_URL_AUTHORITY_REGISTRY
  C. Both LadyWeaver URLs used inconsistently across different pages

INDICATORS:
  - LadyWeaver crosslinks on some pages go to /20-35/ and others to /36-35/
  - Ch.18 crosslinks go to the wrong chapter page
  - User reports clicking a crosslink and landing on wrong content

PREVENTION:
  Resolve ALL URL conflicts before any crosslink generation
  Generator must only use MASTER_URL_AUTHORITY_REGISTRY — never memory
  After generation: test 5 random crosslinks from each batch

RECOVERY:
  Update crosslinks in affected pages using correct URL from registry
  If this affects all 34 pages: global find/replace of wrong URL

================================================================================
FAILURE 9 — JS RATING GATE WORKS IN CODE REVIEW BUT FAILS IN BROWSER
Severity: 🟠 SEVERE
================================================================================

SCENARIO: Rating gate logic appears correct in the HTML file but fails
          when rendered in an actual browser.

HOW IT HAPPENS:
  A. localStorage key not available in iframe/embedded context
  B. Gate script loads after page content is already visible
  C. Mobile browser handles localStorage differently
  D. Script error in unrelated code breaks gate execution silently

INDICATORS:
  - G/PG visitor can see R-rated content
  - Console shows JavaScript errors
  - Gate works in Chrome but not Firefox (or vice versa)

PREVENTION:
  Always test gate in actual browser — never trust code review alone
  Test on both desktop and mobile
  Test in Chrome, Firefox, and Safari (minimum)
  Gate script must load before any content — not at bottom of body

RECOVERY:
  Immediately revert gating JS to prior working version
  Remove page from public access until gate is confirmed working
  Debug in isolated test environment before redeploying

================================================================================
FAILURE 10 — ROLLBACK ZIP MISSING OR CORRUPT
Severity: 🟡 SIGNIFICANT
================================================================================

SCENARIO: A catastrophic edit occurs but the rollback ZIP either doesn't
          exist or can't be restored.

HOW IT HAPPENS:
  A. Claude session timed out before ZIP was created
  B. ZIP was named incorrectly and can't be found
  C. ZIP was created but only the current session's files — not the live site state
  D. ZIP is corrupt (rare but possible)

PREVENTION:
  Create rollback ZIP BEFORE every live site edit — non-negotiable
  Verify ZIP is downloadable immediately after creating it
  Follow naming standard so ZIPs can be found quickly under pressure
  Store ZIPs in multiple locations (local + cloud)

RECOVERY WITHOUT ROLLBACK:
  Use COLLABTUNES_LIVE_CAPTURE_FINAL_2026-05-12.zip as baseline reference
  Manually reconstruct nav from MASTER_URL_AUTHORITY_REGISTRY
  Reconstruct canon from FINAL_CANON_AUTHORITY_REGISTRY
  NOTE: This is painful — always create the rollback ZIP

================================================================================
FAILURE PREVENTION SUMMARY — TOP 5 RULES
================================================================================

1. FIX BOUNCER DEFAULT STATE FIRST — everything else depends on it
2. NEVER START CHAPTER DRIFT FIX WITHOUT DOING ALL 17 IN ONE SESSION
3. TOM MUST CLEAR DEFAMATION REGISTRY BEFORE ANY BULK GENERATION
4. ALWAYS TEST RATING GATES IN ACTUAL BROWSER — not just code
5. ALWAYS CREATE ROLLBACK ZIP BEFORE ANY LIVE SITE EDIT

================================================================================
END MOST_DANGEROUS_IMPLEMENTATION_FAILURES_5_12_26.txt
================================================================================
