mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-05 00:03:15 +01:00
fix(regen): report missing dependencies as REGEN_DEPS_MISSING, not REGEN_STALE
When package.json declares dependencies and node_modules is missing, the scratch worktree runs the generator without them. A generator that degrades and still exits 0 then looked stale, and the fix line sent people to rerun the generator. gstack-regen check and the pregate regen check now report "dependencies missing; run <install>" with its own result code and troubleshooting anchor; the install command follows the lockfile. The fixture reproduces the shape GSTA-31 saw in gbrain. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
9b6e23fd31
commit
c90e39c19a
9 files changed
+117
-8
No files matched your search
+3
-1
@@ -41,7 +41,9 @@ paths, at most 64 per list); commands are one line under 512 bytes.
|
||||
<paths>` for entries whose inputs or outputs intersect) in a scratch
|
||||
`git worktree` seeded from the working tree, with `node_modules` linked rather
|
||||
than copied, and reports stale outputs (`REGEN_STALE`, exit 1) without touching
|
||||
the tree. An entry with no `command` is tracked only (goldens regenerated by
|
||||
the tree. When outputs differ but `package.json` declares dependencies and
|
||||
`node_modules` is missing, the entry is `REGEN_DEPS_MISSING` (install, then
|
||||
rerun) instead of stale. An entry with no `command` is tracked only (goldens regenerated by
|
||||
another entry).
|
||||
- `gstack-regen write` regenerates in place: what `gstack-restamp` and the
|
||||
Step 3 conflict rule use. On a conflict in a registered output, take either
|
||||
|
||||
@@ -2717,6 +2717,18 @@ take either side, then regenerate.
|
||||
worktree has no `node_modules` of its own, so a command that needs them must
|
||||
reference the repository's (gstack's entries do through `bun run`).
|
||||
|
||||
<a id="regen-deps-missing"></a>
|
||||
### `REGEN_DEPS_MISSING`
|
||||
|
||||
**Meaning.** A registered command exited 0 and its outputs differ from the
|
||||
committed ones, but `package.json` declares dependencies and the repository has
|
||||
no `node_modules`, so the scratch worktree ran the generator without them. The
|
||||
difference may come from the missing dependencies rather than stale files, so
|
||||
the entry is reported as unverified, not `REGEN_STALE`.
|
||||
|
||||
**Fix.** Run the printed install command (`bun install`, or the one matching the
|
||||
repository's lockfile), then rerun `gstack-regen check` or the pre-gate.
|
||||
|
||||
<a id="pregate-config-invalid"></a>
|
||||
### `PREGATE_CONFIG_INVALID`
|
||||
|
||||
|
||||
Reference in new issue
Block a user