Skip to content

docs(readme): name the missing-parent-row cause behind a 23503 filler exit - #187

Merged
robrigo merged 1 commit into
mainfrom
docs/orphan-base-row-troubleshooting
Aug 21, 2026
Merged

docs(readme): name the missing-parent-row cause behind a 23503 filler exit#187
robrigo merged 1 commit into
mainfrom
docs/orphan-base-row-troubleshooting

Conversation

@robrigo

@robrigo robrigo commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Why

An operator hit 23503 on atomicassets_assets_schemas_fkey at COMMIT and read it as a filler bug. It is not: the asset foreign keys ship DEFERRABLE INITIALLY DEFERRED NOT VALID, so a database seeded from an incomplete source carries orphaned asset rows that nothing ever validates. The violation surfaces only when a later block writes one of those assets, and it surfaces at COMMIT against a parent table the operator has no reason to suspect. Every restart replays the same block range and fails identically, so the failure reads as deterministic filler breakage rather than a data gap.

The Troubleshooting section had no entry for this shape of failure, and the two facts an operator needs are both non-obvious: that NOT VALID means the gap can predate the running version by years, and that the fix is a restore rather than the row copy that clears only the current block.

Validation

Documentation only, no code paths touched. Verified the entry against the code it describes: the five asset foreign keys carry DEFERRABLE INITIALLY DEFERRED NOT VALID in definitions/tables/atomicassets_tables.sql, and every writer transaction issues SET CONSTRAINTS ALL DEFERRED in src/filler/database.ts. Confirmed against a complete WAX database that the schema count is 80,416 and that reconcile seeds v2 state and template deletions without rebuilding base rows. Checked the added lines for em-dash and smart quotes, and the #restore-from-a-published-dump anchor resolves.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents how to diagnose and recover from deferred foreign-key failures caused by incomplete AtomicAssets data.

Changes:

  • Explains recurring 23503 failures at COMMIT.
  • Adds schema-gap diagnostic queries.
  • Recommends restoring a published dump.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@robrigo
robrigo force-pushed the docs/orphan-base-row-troubleshooting branch from f2cf7a5 to 092d855 Compare August 21, 2026 23:49
… exit

The three asset foreign keys that point at schemas, collections and templates
are added NOT VALID, so orphaned asset rows already present when a constraint
lands are never reported by the validation scan. They are also deferred, so the
check that eventually runs happens at COMMIT and takes the whole block group
with it. The result is a failure that surfaces years after the data gap opened,
names a parent table the operator has no reason to suspect, and repeats
identically on every restart, which reads as filler breakage rather than
missing history. The entry gives the block-bucket comparison that separates a
truncated history from a partial seed, and points at the dump restore rather
than the row copy that only clears the current block.

Signed-off-by: Rob Konsdorf <rob@facings.io>
@robrigo
robrigo force-pushed the docs/orphan-base-row-troubleshooting branch from 092d855 to 6223f2f Compare August 21, 2026 23:54
@robrigo
robrigo merged commit 43f2325 into main Aug 21, 2026
7 checks passed
@robrigo
robrigo deleted the docs/orphan-base-row-troubleshooting branch August 21, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants