Repository navigation
fix(dev): pnpm dev stop works while the broker source doesn't compile - #363
Conversation
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. The change moves compilation into the existing startup path and follows the runner's subprocess and structured-error patterns. No future-facing machinery was added. SpecNo merge-blocking intent findings. Issue #330 asks to move broker generation into startup and keep Verification
The affected contract is the dev runner and its development documentation. No API, seed, migration, rendered-page, package-layout, or product-model change requires a corresponding update. Summary: Standards 0 blockers, no method or YAGNI blocker; Spec 0 blockers, no intent blocker. |
StandardsNo hard violations. Judgement, dev-loop surface. The new sentence is glued to the Playwright paragraph. The subcommand table, and the file header in Judgement, failure order. No baseline smell that the local pattern overrides. The error class is the house style for this file. SpecIssue #330 asked for the smallest change. Move broker generation off the left-hand side of That change is in place. The root
Findings against the written requirements: none. The diff is that move. Standards has 2 judgement calls and 0 hard violations. The worst is that The spec axis treats that wipe as reset's existing contract. The method review treats the new failure order as a change from the old MethodBuilding inside Skipping the rebuild on a healthy confirm is correct.
Call stderr inherit and stdout ignore are right. esbuild writes the diagnostic to stderr. The build script's root is the directory above the script file, from YAGNIKeep the
The fake worktree is the minimum that proves the bug. Keep the stop test's
Move the new TestsBoth tests prove what they claim, read against the runner.
The The start test fails in esbuild on that syntax error, before Prettier, and stderr contains I did not re-run the file. The root Vitest setup starts embedded Postgres and rebuilds the real broker. |
|
Review follow-up in 758edc8. Fixed
Kept as is
Astra's review found no blockers. |
699574a to
379c813
Compare
The root dev script bundled the shell broker before dispatching any subcommand, so a syntax error in the broker source made `pnpm dev stop` (and status, logs, --dry-run) exit 1 without stopping anything. The runner's start path now builds the broker before recording a plan; every other command dispatches without it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ance reset stopped the instance and removed .local/dev before start built the broker, so a syntax error cost the dev database. Start and reset now build the broker before they record, stop or wipe anything. The operational note moves next to the subcommand table and the patchy-dev-loop skill mirrors it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
758edc8 to
bce61da
Compare
…patch's own rows (#364) Stacked on #363 (branch fix/330-dev-stop). Before a patch's first publish, editing a shared fixture (even a single row or a comment) wiped the patch's own local rows on the next `patchy dev` start. Only owned schema changes are supposed to reset local data. The full-reset check compared the whole local stamp, and that stamp includes the hashes of the shared fixtures. It now compares only the owned-schema part. A fixture edit goes through the existing per-source refresh, which reseeds only the changed shared source. Identity changes, missing storage and real owned-schema changes still reset everything. Closes #322 Test evidence: - New case in `packages/patchy/src/devResources.test.ts`, built from the issue's reproduction with real PGlite state in a temp dir. It failed before the fix (`notes: []`) and passes after it. The same case checks that an owned column retype still recreates local data. - `pnpm typecheck` and `pnpm lint` pass. - `pnpm test`: 953/954 passed. The one failure was a 5s timeout in `packages/integrations/src/postgres/Runtime.test.ts` while the full suite ran under load. That file passes on its own. Implemented by Claude Opus 5.5 via Claude Code (foreman run orchestrated by Claude Fable 5.1).
Stacked on #362 (branch fix/339-stale-confirmation).
Closes #330.
The root
devscript bundled the shell broker before handing off to the runner, so every subcommand depended on it. If you were halfway through a broker edit and it had a syntax error,pnpm dev stopexited 1 and left the instance running.status,logsand--dry-runhad the same problem.Now
package.jsonruns the runner directly.pnpm dev(when it actually starts) andpnpm dev resetbuild the broker first, before they record, stop or wipe anything. A failed build prints esbuild's errors to stderr, then oneBrokerBuildFailedline, and exits 1 with the instance and.local/devuntouched. Management commands and confirming a healthy instance never compile it.docs/DEVELOPMENT.md(under the subcommand table) and thepatchy-dev-loopskill say so.Tests.
scripts/dev/src/main.test.tsruns the rootdevscript, as pnpm does, in a throwaway worktree whose broker doesn't compile:stopwith a recorded idle process as the supervisor: on the old code it exited 1 and the process stayed alive; now it exits 0 and stops the process.resetwith the same recorded process: exits 1, the process stays alive, andplan.jsonis still there. On the first version of this PR it stopped the process and wiped the state.broker.ts, and noplan.jsonis written.pnpm typecheckandpnpm lintare clean, and thescripts/devtests pass (15/15). On the first commit,pnpm testpassed 952 of 953. The one failure waspackages/integrations/src/postgres/Runtime.test.tstiming out at 5s under machine load; on its own it passes.Implemented by Claude Opus 5.5 via Claude Code (foreman run orchestrated by Claude Fable 5.1).