Skip to content

fix(boringstack): gate runs generate:api/db:push for the model + surface failed db:push#146

Merged
agjs merged 1 commit into
mainfrom
fix/gate-autoregen-guidance
Jul 20, 2026
Merged

fix(boringstack): gate runs generate:api/db:push for the model + surface failed db:push#146
agjs merged 1 commit into
mainfrom
fix/gate-autoregen-guidance

Conversation

@agjs

@agjs agjs commented Jul 19, 2026

Copy link
Copy Markdown
Owner

What

Two coupled fixes so the data-fetching convention guide is both useful and safe.

1. Guidance (the original intent)

The guide told the model to manually run bun run generate:api. The gate already runs it (+ db:push) as part of each gate cycle (gate.ts FAST_GATE apps/ui leg + boringstackCommandStage). Reworded to: the gate runs them for the model (never by hand); a passing gate means client + DB are in sync with the schema; a rename is one gate pass, not a per-file type chase.

Why (the 'ask deepseek' directive): asked the builder model what a fresh CRUD build still wastes turns on. Its #1 was a Drizzle→OpenAPI→client type-drift cascade needing a 'single-command schema-sync tool' — verified against the code that this already exists as the auto-gate step, so the ask was confabulated. The real gap was the misleading guidance.

2. Bugfix (surfaced by the panel while reviewing #1)

boringstackCommandStage discarded db:push's exit code (gate-stages.ts) — a schema that wouldn't sync left the DB stale while the gate still passed, and the guide says never run db:push by hand, so the model had no signal and no recourse. Now a nonzero db:push is a red gate with a model-visible, stably-keyed, actionable error (fix the schema; distinguishes the infra-unreachable case). This makes the guide's on-green claim actually true.

Tests

  • Guide-content anchors (client+DB in-sync claim; no overclaim; no manual-regen instruction).
  • a failed db:push is a RED gate — proves the exit is no longer swallowed.
  • Gate-chain composition guard (db:push issued; generate:api ordered before the ui check).

Reviews

Local 4-model panel gated every revision (PASS 4/4); each round's finding addressed — the db:push bug was itself a panel finding, now fixed. No gate relaxation.

@agjs
agjs force-pushed the fix/gate-autoregen-guidance branch 2 times, most recently from 01f1d6e to 6ef53b5 Compare July 19, 2026 19:59
@agjs agjs changed the title fix(conventions): the gate runs generate:api/db:push for the model (kill manual-regen + phantom stale-client waste) fix(boringstack): gate runs generate:api/db:push for the model + surface failed db:push Jul 19, 2026
@agjs
agjs force-pushed the fix/gate-autoregen-guidance branch 9 times, most recently from 3d8650f to ce6e71c Compare July 19, 2026 21:33
…(no manual generate:api)

The data-fetching guide told the model to manually run `bun run generate:api`, but
regenerating the typed client with generate:api is part of the gate (gate.ts FAST_GATE
apps/ui leg). That cost the model turns running it by hand and could send it chasing a
phantom stale-client cascade. Reworded to only true, gated claims: generate:api is part
of the gate (so don't run it by hand or chase client types file-by-file); no 'every
cycle' or 'passing gate proves' guarantee (the api-leg && short-circuit + differential
suppression make those false in edge cases). Makes NO db:push claim — db:push's exit is
currently swallowed (task #60 fixes that), so a green gate can't prove the DB synced.
Guidance-only; no gate change.
@agjs
agjs force-pushed the fix/gate-autoregen-guidance branch from ce6e71c to e63b957 Compare July 19, 2026 21:44
@agjs
agjs merged commit 6aa18ca into main Jul 20, 2026
8 checks passed
@agjs
agjs deleted the fix/gate-autoregen-guidance branch July 20, 2026 20:29
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