docs(production-readiness): P1 — Authoritative Database Baseline verification#279
Merged
Merged
Conversation
…fication Evidence-based verification of the P1 baseline chain on a throwaway local PostgreSQL 16 cluster (created and destroyed in-session; production never touched): - PR #250's drift finding independently corroborated: PR #248's initDatabase()-derived candidate re-materialized and counted with the operator's exact catalog queries — 125 tables / 1595 columns / 400 indexes / 275 non-PK / 267 FKs, matching the drift table exactly and confirming the ~54-column shortfall vs production (1649). - Guard checks on main: db:migrate inert (no meta/_journal.json — migrate.ts skips), no prod-baseline directory merged, baseline-preview quarantined, initDatabase() still the runtime schema source (the drift engine). - New finding feeding back into PR #250's runbook: the Step 2 artifact fix (grep int4_ops) is too narrow — 149 wrong-opclass tokens exist in at least three forms, including text_ops-on-timestamptz which hard-fails on apply (reproduced); amendment: normalize ALL explicit opclass tokens. - Hard gates documented: the Gate 1 production snapshot is operator-held (no dump in-tree) and PG18 requires Docker (no daemon here) — so the final authoritative baseline is operator-executed per the amended runbook; fabricating it from in-repo sources is explicitly not done. - Verdict + exact remaining path: merge PR #250, close PR #248 as superseded, operator runs the amended runbook, commit the 1649-column authoritative baseline; then P2. Docs only — no code changes, no migrations, no schema changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMnfvQvtgNQwiUvPJ4ff8Z
✅ Deploy Preview for zonforge-customer-operations canceled.
|
✅ Deploy Preview for ai-powered-cyber ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMnfvQvtgNQwiUvPJ4ff8Z
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMnfvQvtgNQwiUvPJ4ff8Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Production Readiness · P1 — Authoritative Database Baseline. Evidence-based verification of the whole baseline chain (PR #248 → PR #250), executed on a throwaway local PostgreSQL 16 cluster created and destroyed in-session. Production was never touched. Docs-only — one report file.
What was verified (measured, not asserted):
initDatabase()-derived candidate baseline was re-materialized and counted with the operator's exact catalog queries: 125 tables / 1595 columns / 400 indexes / 275 non-PK / 267 FKs — every candidate-side number in the drift table reproduces exactly, re-confirming the ~54-column shortfall vs production's measured 1649 and the roadmap rule: never use the initDatabase baseline.main:db:migrateis inert (nometa/_journal.jsonin the live migrations dir —migrate.tsskips), noprod-baselinedirectory is merged, the 39-tablebaseline-previewstays quarantined, and mark-as-applied has not occurred anywhere. Also documented:initDatabase()remains the runtime schema source (index.ts:7451→db.ts:122, 132 CREATE TABLEs) — the drift engine itself.int4_ops") is too narrow. The candidate contains 149 wrong-opclass tokens in at least three forms, includingtext_opsontimestamptz(line 2302), which a grep forint4_opsmisses and which hard-fails on apply — reproduced in-session (ERROR: operator class "text_ops" does not accept data type timestamp with time zone). Amendment: normalize all explicit<type>_opstokens; the fully-normalized DDL applied cleanly withON_ERROR_STOP=1.Verdict + exact remaining path (in the report): merge PR #250 as plan of record (pending approval) → close PR #248 as superseded → operator executes the amended replacement runbook on PG18 with the real snapshot → commit the 1649-column authoritative baseline + journal + drift inventory → P2 picks up from there.
Type of Change
Scope
(Docs-only — verification report; no code, no migrations, no schema changes.)
Validation
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01MMnfvQvtgNQwiUvPJ4ff8Z
Generated by Claude Code