{
  "abstract": "A first-person evidence case study about using AI as a reasoning layer over SQL, hashes, historical snapshots, Plex SQLite, Docker, and disposable database clones to diagnose a decade-old Plex defect, eliminate false positives, prove three duplicated library roots as the generator of 1,509 duplicate media representations, and validate a zero-media-loss root fix.",
  "author": {
    "email": "tony@malott.ai",
    "email_url": "mailto:tony@malott.ai",
    "id": "person:tony-malott",
    "name": "Tony Malott",
    "resume_url": "https://malott.ai/resume/",
    "url": "https://malott.ai/"
  },
  "card": {
    "kicker": "AI engineering · Database forensics · Legacy systems",
    "orientation": "A defect survived for more than a decade because understanding it cost more than living with it. AI changed that equation.",
    "visual_motif": "forensic-archaeology"
  },
  "claims": [
    {
      "caveat": "The claim applies to the strong duplicate population defined by the audit, not every possible Plex duplication symptom.",
      "id": "claim:plex-forensics:root-cause",
      "posture": "owner-primary-forensic-evidence",
      "support": [
        "source:issue-428-evidence-authority"
      ],
      "text": "The 1,509 strong duplicate media groups mapped exactly to three duplicated Plex library-root identities, establishing duplicate section locations as the generating condition for this defect population."
    },
    {
      "caveat": "Classification depends on the exact schema and historical snapshots audited.",
      "id": "claim:plex-forensics:false-positives",
      "posture": "owner-primary-forensic-evidence",
      "support": [
        "source:issue-428-evidence-authority",
        "source:sqlite-fts4"
      ],
      "text": "Initial anomaly counts materially overstated actual defects: 67,139 coarse duplicate tagging pairs became zero exact semantic duplicate groups after a stronger identity test, and 2,116 apparent orphan media records were classified as stable legacy Sync/transcode residue."
    },
    {
      "caveat": "The root fix removes the generator; it intentionally does not claim that all historical duplicate residue disappears automatically.",
      "id": "claim:plex-forensics:repair-proof",
      "posture": "owner-primary-forensic-evidence-and-offline-test",
      "support": [
        "source:issue-428-evidence-authority",
        "source:sqlite-pragma"
      ],
      "text": "A disposable-clone root normalization reduced section locations from 12 to 9 and duplicate root groups from 3 to 0 while preserving all 271,949 media_items, 272,011 media_parts, and 197,517 metadata_items, with integrity_check remaining ok and zero foreign-key violations."
    },
    {
      "caveat": "This is a field synthesis, not a controlled benchmark of human engineering hours.",
      "id": "claim:plex-forensics:ai-economics",
      "posture": "owner-field-thesis",
      "support": [
        "source:shareplane-platform-issue-428",
        "source:issue-428-evidence-authority"
      ],
      "text": "AI materially changed the economics of this neglected engineering problem by making iterative expert-style investigation, tooling, falsification, and validation practical without placing the model in control of the database."
    }
  ],
  "collections": [
    {
      "id": "collection:governed-ai-operations",
      "position": 10.6,
      "title": "Governed AI operations"
    }
  ],
  "dates": {
    "created": "2026-08-12",
    "published": "2026-08-12",
    "updated": "2026-08-12"
  },
  "evidence_authority": {
    "external_corroboration": true,
    "forensic_receipts": "V4-V8 hash-verified owner evidence",
    "path": "docs/publication/issue-428/EVIDENCE_AUTHORITY.json",
    "privacy_boundary": "structural-only-publication",
    "status": "complete"
  },
  "featured": true,
  "format": {
    "depth": "Forensic narrative with causal proof, false-positive elimination, and repair receipts",
    "interaction": "Canonical SharePlane reading with forensic evidence groups, snapshot timeline, causal ledgers, reasoning flow, Reader Trust Stack, graph relationships, and portable package",
    "label": "Evidence case study and personal engineering field report",
    "reading_time": "12 min"
  },
  "graph_order": 31,
  "id": "artifact:the-database-had-been-wrong-for-twelve-years",
  "lifecycle": {
    "merge_authority": "granted",
    "owner_review": "accepted",
    "production_authority": "granted",
    "state": "PUBLISHED"
  },
  "presentation": {
    "family": "canonical-forensic-field-report",
    "motif": "forensic-archaeology",
    "reader_trust_stack": "v1",
    "skin_policy": "Shared SharePlane shell and trust surfaces with content-driven forensic evidence primitives.",
    "visual_blocks": [
      {
        "accessible_label": "Initial anomaly population and the false positives eliminated by stronger semantic tests",
        "section_id": "the-database-looked-much-worse-than-it-was",
        "type": "evidence-group"
      },
      {
        "accessible_label": "Historical snapshot sequence proving that the strong duplicate population was still being generated",
        "section_id": "eventually-the-noise-started-collapsing",
        "type": "timeline"
      },
      {
        "accessible_label": "The three duplicated Plex library roots and the strong duplicate media groups mapped to each",
        "section_id": "we-finally-found-the-generator",
        "type": "responsive-ledger"
      },
      {
        "accessible_label": "Before and after repair invariants proving three duplicate roots were removed with zero media row loss",
        "section_id": "so-we-repaired-the-cause-first",
        "type": "responsive-ledger"
      },
      {
        "accessible_label": "AI-assisted forensic loop from probabilistic hypothesis through deterministic test and human verification",
        "section_id": "what-ai-actually-contributed",
        "type": "process-flow"
      },
      {
        "accessible_label": "Public privacy boundary excluding viewing history, identities, preferences, devices, and raw database evidence",
        "section_id": "what-we-deliberately-did-not-analyze",
        "type": "evidence-group"
      },
      {
        "accessible_label": "Closing thesis on AI making neglected complexity economically accessible",
        "section_id": "the-part-i-keep-coming-back-to",
        "type": "thesis-break"
      }
    ]
  },
  "presentation_status": "owner-locked-forensic-archaeology-v1",
  "provenance": {
    "ai_assistance": {
      "role": "Forensic hypothesis generation, deterministic audit-script construction, evidence interpretation, false-positive elimination, root-cause analysis, safe repair simulation, Tony Voice editing, visual architecture, evidence binding, and publication preparation.",
      "used": true
    },
    "boundary": "The public Work contains only structural engineering evidence. It excludes viewing history, library inventories, user identities, account data, content preferences, IP addresses, device identities, raw database files, and private forensic receipts.",
    "posture": "Owner-originated personal engineering case study grounded in hash-verified forensic database receipts and a successfully tested offline repair.",
    "research_gap": "The case study is a first-person engineering field report, not a controlled productivity benchmark. Human-effort comparisons are qualitative unless explicitly labeled as estimates.",
    "sources": [
      {
        "id": "source:shareplane-platform-issue-428",
        "locator": "https://github.com/pinklon/shareplane-platform/issues/428",
        "publiclyExposed": true,
        "role": "Governs semantics, privacy boundary, evidence facts, visual grammar, relationships, merge authority, and Production publication authority.",
        "title": "Issue #428 — Publish the Plex forensic AI case study",
        "type": "governing-publication-authority"
      },
      {
        "id": "source:issue-428-evidence-authority",
        "locator": "https://github.com/pinklon/shareplane-platform/blob/main/docs/publication/issue-428/EVIDENCE_AUTHORITY.json",
        "publiclyExposed": true,
        "role": "Records the public-safe structural findings distilled from the V4-V8 hash-verified forensic receipts.",
        "title": "Issue #428 sanitized forensic evidence authority",
        "type": "sanitized-primary-forensic-evidence"
      },
      {
        "id": "source:plex-corrupted-database",
        "locator": "https://support.plex.tv/articles/repair-a-corrupted-database/",
        "publiclyExposed": true,
        "role": "Corroborates the core Plex database path, Plex SQLite runtime, backup-before-repair guidance, and the distinction between structural integrity and other data problems.",
        "title": "Plex Support — Repair a Corrupted Database",
        "type": "primary-vendor-documentation"
      },
      {
        "id": "source:plex-scheduled-tasks",
        "locator": "https://support.plex.tv/articles/201553286-scheduled-tasks/",
        "publiclyExposed": true,
        "role": "Corroborates Plex's scheduled core-database backup behavior.",
        "title": "Plex Support — Scheduled Tasks",
        "type": "primary-vendor-documentation"
      },
      {
        "id": "source:sqlite-pragma",
        "locator": "https://www.sqlite.org/pragma.html",
        "publiclyExposed": true,
        "role": "Corroborates integrity_check, quick_check, and foreign_key_check semantics.",
        "title": "SQLite — PRAGMA statements",
        "type": "primary-software-documentation"
      },
      {
        "id": "source:sqlite-fts4",
        "locator": "https://www.sqlite.org/fts3.html",
        "publiclyExposed": true,
        "role": "Corroborates why full-text-search structures and tokenizer differences can look like duplication without being application-table corruption.",
        "title": "SQLite — FTS3 and FTS4 Extensions",
        "type": "primary-software-documentation"
      },
      {
        "id": "source:plex-pms-docker",
        "locator": "https://github.com/plexinc/pms-docker",
        "publiclyExposed": true,
        "role": "Corroborates the Plex runtime environment used to access Plex-specific SQLite behavior during the forensic audit.",
        "title": "Plex Media Server Docker image",
        "type": "primary-vendor-runtime"
      }
    ]
  },
  "public": true,
  "public_safe_status": "owner-authorized-public-production",
  "relationships": [
    {
      "label": "Authored by Tony Malott",
      "target_id": "person:tony-malott",
      "type": "authored_by"
    },
    {
      "label": "Governed by Issue #428",
      "target_id": "issue:shareplane-platform:428",
      "type": "governed_by"
    },
    {
      "explanation": "The investigation repeatedly used probabilistic reasoning to discover the next question, then converted stable knowledge into deterministic SQL, scripts, integrity gates, and a bounded repair transaction.",
      "label": "A field application of the Inference Retirement Thesis",
      "reader_group": "applications",
      "target_id": "artifact:the-best-ai-system-should-need-less-ai-tomorrow",
      "type": "application"
    },
    {
      "explanation": "The model operated where the diagnosis was uncertain; deterministic mechanisms collapsed uncertainty as evidence accumulated.",
      "label": "Inference at the ambiguity frontier, applied to database forensics",
      "reader_group": "applications",
      "target_id": "artifact:inference-at-the-ambiguity-frontier",
      "type": "application"
    },
    {
      "explanation": "Cheap code and tool construction made it practical to build one-off forensic machinery for a problem that could never justify a traditional bespoke engineering project.",
      "label": "Companion: the economics of implementation changed",
      "reader_group": "companions",
      "target_id": "artifact:the-code-is-no-longer-the-hard-part",
      "type": "companion"
    }
  ],
  "schema_version": "2.0.0",
  "semantic_status": "owner-locked",
  "slug": "the-database-had-been-wrong-for-twelve-years",
  "source": {
    "content_status": "canonical-full",
    "format": "markdown",
    "path": "content/artifacts/the-database-had-been-wrong-for-twelve-years/source.md",
    "public_projection_name": "forensic-archaeology-v1",
    "source_sha256": "fa5292c865266a0de2bebb1b0968a4cdc56be268c07e3f21122975d8c76d3073"
  },
  "subtitle": "A 17-year-old Plex database, 11.1 million aggregate rows, three duplicated roots, and what AI changed about the economics of neglected engineering problems",
  "thesis": "The breakthrough was not that AI knew the answer. It made a technically solvable but economically irrational investigation practical by turning probabilistic reasoning into a sequence of deterministic tests until one causal explanation survived.",
  "title": "The Database Had Been Wrong for Twelve Years. AI Made It Worth Fixing.",
  "topics": [
    "ai-architecture",
    "database-forensics",
    "plex",
    "sqlite",
    "deterministic-systems",
    "tool-using-ai",
    "legacy-systems",
    "engineering-economics",
    "evidence-driven-debugging"
  ],
  "type": "evidence-case-study-personal-engineering-field-report"
}
