Skip to content

chore(errors): drop the dead STORAGE_* file-processing lifecycle codes - #1850

Merged
pyramation merged 1 commit into
mainfrom
feat/errors-drop-dead-storage-lifecycle-codes
Sep 19, 2026
Merged

pyramation merged 1 commit into
mainfrom
feat/errors-drop-dead-storage-lifecycle-codes

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1849, which re-audited constructive-db and noticed seven STORAGE_* file-processing lifecycle codes (STORAGE_ACCESS_CLAIM_MISMATCH, STORAGE_FILE_NOT_FOUND, STORAGE_SOURCE_HASH_REQUIRED, STORAGE_SOURCE_HASH_MISMATCH, STORAGE_INVALID_COMPLETION_RESULT, STORAGE_PROCESSING_CONFLICT, STORAGE_INVALID_UPLOAD_DOCUMENT) that constructive-db no longer raises anywhere, but kept them in the inventory only because storage-lifecycle.test.ts pinned them.

This PR makes the registry match reality:

  • scripts/db-error-inventory.json / src/generated/registry.generated.ts — fresh audit-db-errors.py + generate-registry.py run against constructive-db main (post constructive-db#3834). The diff to the inventory is exactly those seven removals; no other code changed.
  • src/registry.ts — removed the curated overrides for those seven, plus the two "runtime-only" companions STORAGE_BUCKET_DATABASE_MISMATCH / STORAGE_FILE_TARGET_UNAVAILABLE and the StorageFileContext type. Neither runtime code has a caller in constructive, constructive-db, constructive-hub, dashboard or any other checked-out repo; they existed only to accompany the lifecycle set.
  • __tests__/storage-lifecycle.test.ts — deleted; it only exercised the nine removed codes.

STORAGE_BUCKET_NOT_RECONCILED and every other STORAGE_* code that constructive-db actually raises are untouched.

Verified: pnpm lint, tsc --noEmit, and pnpm test (41 tests) in packages/errors.

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

Re-audited constructive-db main (post #3834): the seven SQL-side lifecycle
codes are raised nowhere, and the two runtime-only companions have no caller
in any repo. Regenerated the inventory/registry and removed the curated
entries plus the test that pinned them.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Sep 19, 2026

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


The change prunes 9 no-longer-raised STORAGE_* error codes (e.g. STORAGE_FILE_NOT_FOUND, STORAGE_PROCESSING_CONFLICT, STORAGE_BUCKET_DATABASE_MISMATCH) from the curated registry in packages/errors/src/registry.ts, removes their rows from packages/errors/scripts/db-error-inventory.json, and deletes the corresponding storage-lifecycle.test.ts coverage.

Files Change
packages/errors/src/registry.ts Removes the dead STORAGE_* curated error definitions and any HTTP/class mappings tied to them.
packages/errors/scripts/db-error-inventory.json Drops the inventory entries for the removed codes so the audit artifact stays in sync with the registry.
packages/errors/__tests__/storage-lifecycle.test.ts Deletes the test file that asserted the now-removed storage lifecycle codes.

All STORAGE_* removal candidates were verified against the repository: the codes have no remaining in-repo raisers or consumers, and the bundled SQL/inventory artifact confirms they were already dead, so no breaking downstream reference exists. No verified findings were produced.

Reviewed commit: 78caa07

@pyramation
pyramation merged commit 6552bd7 into main Sep 19, 2026
21 checks passed
@pyramation
pyramation deleted the feat/errors-drop-dead-storage-lifecycle-codes branch September 19, 2026 06:08
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