Skip to content

feat(errors): register GUARD_STEP_UP_MIN_AGE_ANCHOR condition codes - #1836

Merged
pyramation merged 1 commit into
mainfrom
feat/errors-guard-step-up-anchor-codes
Sep 16, 2026
Merged

pyramation merged 1 commit into
mainfrom
feat/errors-guard-step-up-anchor-codes

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Registers the two codes raised by the new anchor_conditions form of the step-up guard (constructive-io/constructive-db#3765, follow-up noted on constructive-io/constructive-planning#2055):

  • GUARD_STEP_UP_MIN_AGE_ANCHOR_FK_FIELD_CONDITIONS_CONFLICT (403) — min_age_anchor given both fk_col and anchor_conditions
  • GUARD_STEP_UP_MIN_AGE_ANCHOR_CONDITION_FIELD_NOT_FOUND (404) — an anchor condition references a column the anchor table lacks

Both entries are what audit-db-errors.py produces against current constructive-db main; registry.generated.ts is regenerated from the inventory (799 → 801).

Deliberately not a full inventory regen. A full audit-db-errors.py run also drops the seven STORAGE_* lifecycle codes added in ecf19ca — those have no source in constructive-db yet (pre-registered ahead of the storage lifecycle SQL) and storage-lifecycle.test.ts asserts they stay in the inventory. Only the two new entries were merged in so that work is left intact.

Link to Devin session: https://app.devin.ai/sessions/161aafecdcac47119f0a61dc759bb3eb
Open in Devin Desktop: https://app.devin.ai/desktop/session/161aafecdcac47119f0a61dc759bb3eb?variant=devin
Requested by: @pyramation

Adds GUARD_STEP_UP_MIN_AGE_ANCHOR_FK_FIELD_CONDITIONS_CONFLICT and
GUARD_STEP_UP_MIN_AGE_ANCHOR_CONDITION_FIELD_NOT_FOUND, raised by the
anchor_conditions form of the step-up guard introduced in
constructive-io/constructive-db#3765.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This PR updates the database-error inventory registry with two newly encountered PG error codes from constructive-db, plus a trailing-newline cleanup. The change is entirely data: no source logic, generated registry, or scripts are modified.

Files Change
packages/errors/scripts/db-error-inventory.json Adds two guard_step_up_min_age_anchor error entries with class: "public" metadata and fixes the missing trailing newline.

All scanned lenses (api-data, holistic, sweep) found no defects; the entries are consistent with the existing registry structure and the generated registry.generated.ts.

Reviewed commit: 1bc15c2

@pyramation
pyramation merged commit b70cd9a into main Sep 16, 2026
21 checks passed
@pyramation
pyramation deleted the feat/errors-guard-step-up-anchor-codes branch September 16, 2026 08:18
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.

1 participant