FORGE-89: clear D1-lane and parity failures on schema drift; update known failures #746

Closed
gmackie wants to merge 1 commit from FORGE-89-drift-messages into main
Owner

FORGE-89 follow-up. Makes schema drift explain itself, and brings the D1 known-failures list up to date with main.

Why

After #721 landed, FORGE-85 and FORGE-88 changed the Postgres schema (resource_locks, deployment_events.seq) in PRs whose CI ran on bases from before #721, so their CI never ran the parity test. Main then failed unit-web on the stale schema-sqlite, which #744 regenerates. On the D1 lane, a stale schema turns into dozens of confusing failures (missing exports, unknown columns); that is what made database-d1 red on #743.

What

  • D1 lane checks freshness first: database-test-config.ts runs generate-sqlite-schema.ts --check and stops with one message: "packages/db/src/schema-sqlite is out of date … Fix: pnpm --filter @forgegraph/db db:sqlite:generate, then commit packages/db/src/schema-sqlite".
  • Parity test: the freshness assertion now prints the same command and the stale file names.
  • CI step: a failure in database-d1 adds an ::error:: saying a test outside d1-known-failures.txt failed (the FAIL lines name it), and how to fix it or list it with a cause.
  • d1-known-failures.txt: adds 4 Postgres-only test files merged since the lane landed (db-error-classification, deployment-events-seq-index, json-helpers, registry-stale-cutoff, each tagged with its cause). Removes kanbanger-notify, which now passes on D1. 26 entries.

The lane stays non-required (branch protection requires only CI / ci and CI / gitleaks). I did not add a separate "schema changed without schema-sqlite" job. The parity test already fails on the offending PR when that PR's base includes schema-sqlite, and an extra job would hit the same base skew. The real fix for skew is merging through the queue (FORGE-87) or requiring up-to-date branches.

Verification (locally, on main@forgejo 824da2c plus a regenerated schema, i.e. the state after #744)

  • test:d1: 25 files passed, 0 failed (151 tests). The full run with the list ignored: the only failures outside the list were these 4 new files.
  • Without the regeneration, the D1 lane stops with the freshness error above.
  • Parity test 151 passed; api typecheck clean; workflow YAML parses.

Expect unit-web (and database-d1) to stay red on this PR until #744 merges, since main itself is stale. This PR does not touch the generated files, to avoid conflicting with #744.

🤖 Generated with Claude Code

FORGE-89 follow-up. Makes schema drift explain itself, and brings the D1 known-failures list up to date with main. ## Why After #721 landed, FORGE-85 and FORGE-88 changed the Postgres schema (resource_locks, deployment_events.seq) in PRs whose CI ran on bases from before #721, so their CI never ran the parity test. Main then failed unit-web on the stale `schema-sqlite`, which #744 regenerates. On the D1 lane, a stale schema turns into dozens of confusing failures (missing exports, unknown columns); that is what made `database-d1` red on #743. ## What - **D1 lane checks freshness first**: `database-test-config.ts` runs `generate-sqlite-schema.ts --check` and stops with one message: "packages/db/src/schema-sqlite is out of date … Fix: pnpm --filter @forgegraph/db db:sqlite:generate, then commit packages/db/src/schema-sqlite". - **Parity test**: the freshness assertion now prints the same command and the stale file names. - **CI step**: a failure in `database-d1` adds an `::error::` saying a test outside `d1-known-failures.txt` failed (the FAIL lines name it), and how to fix it or list it with a cause. - **d1-known-failures.txt**: adds 4 Postgres-only test files merged since the lane landed (`db-error-classification`, `deployment-events-seq-index`, `json-helpers`, `registry-stale-cutoff`, each tagged with its cause). Removes `kanbanger-notify`, which now passes on D1. 26 entries. The lane stays non-required (branch protection requires only `CI / ci` and `CI / gitleaks`). I did not add a separate "schema changed without schema-sqlite" job. The parity test already fails on the offending PR when that PR's base includes schema-sqlite, and an extra job would hit the same base skew. The real fix for skew is merging through the queue (FORGE-87) or requiring up-to-date branches. ## Verification (locally, on main@forgejo 824da2c plus a regenerated schema, i.e. the state after #744) - `test:d1`: 25 files passed, 0 failed (151 tests). The full run with the list ignored: the only failures outside the list were these 4 new files. - Without the regeneration, the D1 lane stops with the freshness error above. - Parity test 151 passed; api typecheck clean; workflow YAML parses. Expect `unit-web` (and `database-d1`) to stay red on this PR until #744 merges, since main itself is stale. This PR does not touch the generated files, to avoid conflicting with #744. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
FORGE-89: clear D1-lane and parity failures on schema drift; update known failures
Some checks failed
CI / superseded (pull_request) Successful in 1s
CI / storybook (pull_request) Successful in 1m17s
CI / go (pull_request) Successful in 1m21s
CI / checks (pull_request) Successful in 1m46s
CI / gitleaks (pull_request) Successful in 10s
CI / web-build (pull_request) Successful in 2m2s
CI / database (pull_request) Successful in 2m30s
CI / database-d1 (pull_request) Failing after 3m52s
CI / unit-api (pull_request) Successful in 2m55s
CI / unit-web (pull_request) Failing after 1m19s
forgegraph/ci CI failed
CI / ci (pull_request) Failing after 34s
82c1495cf9
- The D1 lane now checks schema-sqlite freshness first and stops with one
  message naming the fix (pnpm --filter @forgegraph/db db:sqlite:generate)
  instead of dozens of confusing failures from missing exports.
- The parity test's freshness assertion prints the same command.
- The CI step explains a failure outside d1-known-failures.txt.
- d1-known-failures.txt: add four Postgres-only test files merged since the
  lane landed (db-error-classification, deployment-events-seq-index,
  json-helpers, registry-stale-cutoff); remove kanbanger-notify, which now
  passes on D1.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Author
Owner

Preview environment is live: https://pr-746-forgegraph.forgegraf.com

Deployed 82c1495c with the beta stage's environment. It redeploys on every push and is destroyed when this PR closes.

Preview environment is live: https://pr-746-forgegraph.forgegraf.com Deployed `82c1495c` with the beta stage's environment. It redeploys on every push and is destroyed when this PR closes.
Author
Owner

Preview environment is live: https://pr-746-forgegraph.forgegraf.com

Deployed 82c1495c with the beta stage's environment. It redeploys on every push and is destroyed when this PR closes.

Preview environment is live: https://pr-746-forgegraph.forgegraf.com Deployed `82c1495c` with the beta stage's environment. It redeploys on every push and is destroyed when this PR closes.
Author
Owner

Closing as obsolete: this tightens the D1/SQLite parity lane, which is now informational, and the drizzle-sqlite twin rule was dropped (FORGE-141). Backlog cleanup under FORGE-271.

Closing as obsolete: this tightens the D1/SQLite parity lane, which is now informational, and the drizzle-sqlite twin rule was dropped (FORGE-141). Backlog cleanup under FORGE-271.
gmackie closed this pull request 2026-10-30 07:48:11 +00:00
Some checks failed
CI / superseded (pull_request) Successful in 1s
CI / storybook (pull_request) Successful in 1m17s
CI / go (pull_request) Successful in 1m21s
CI / checks (pull_request) Successful in 1m46s
CI / gitleaks (pull_request) Successful in 10s
Required
Details
CI / web-build (pull_request) Successful in 2m2s
CI / database (pull_request) Successful in 2m30s
CI / database-d1 (pull_request) Failing after 3m52s
CI / unit-api (pull_request) Successful in 2m55s
CI / unit-web (pull_request) Failing after 1m19s
forgegraph/ci CI failed
CI / ci (pull_request) Failing after 34s
Required
Details

Pull request closed

Sign in to join this conversation.
No description provided.