sandcastle: ts-gate.sh install line carries CI=true so the pre-push TS gate stops failing closed (#168) #182

Open
matou-build-agent wants to merge 1 commit from agent/issue-168 into main

closes #168

What this lands

.sandcastle/ts-gate.sh (the per-repo TS pre-push gate added by #152 — a
drift-safe layer file, not in FACTORY_MANIFEST) ran its install line
without CI=true:

pnpm install --frozen-lockfile --prefer-offline   # no CI=true
CI=true pnpm -r typecheck                          # had CI=true

In the swarm sandbox pnpm 11.6.0 sometimes decides node_modules needs a purge
and, with no TTY, aborts the install
(ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY, exit 1) instead of prompting — so
every TypeScript-touching push was refused at the gate (hit while landing #166;
worked around with GATE_TS_CMD). Only the typecheck line carried CI=true.

Fix: prefix the install line with CI=true too, matching the typecheck line
and GOTCHAS 4's rule for any non-interactive pnpm install. The explanatory
comment is extended to say why both lines carry it.

Why this is a session change, not a worker one

.sandcastle/ is a protected path for swarm workers, so a worker could not make
this edit in-run — it needs the standing session. ts-gate.sh is not
vendored (absent from FACTORY_MANIFEST), so this is not an edit to a
factory-pinned file: check-harness-drift.sh stays green.

Proof

Run under no TTY (the gate's real condition):

  • ./.sandcastle/ts-gate.sh from an empty node_modules → install + all 6
    projects typecheck → exit 0.
  • Through the real pre-push entrypoint gate_ts_stage "$PWD" (which resolves to
    ts-gate.sh as precedence #2) → exit 0.
  • check-harness-drift.sh → OK (ts-gate.sh is not a vendored file).

Note on the red: the exact abort is a sandbox store-state condition. On this
standing-session host pnpm 11.6.0 reconciled a matching store cleanly in every
synthetic case I tried (foreign node_modules, missing .pnpm, flipped
nodeLinker, fresh store-dir), so I could not re-trigger the abort here. The
red is the field capture on #166 (quoted in the ticket) plus the documented
hazard GOTCHAS 4/24; the fix is proven GREEN above and matches the already-stated
rule. GOTCHAS 23 is extended with this follow-on.

Screenshots: none — harness shell-gate fix with no visible/UI surface; proof is the gate exiting 0 under no TTY (above).

closes #168 ## What this lands `.sandcastle/ts-gate.sh` (the per-repo TS pre-push gate added by #152 — a drift-safe layer file, **not** in `FACTORY_MANIFEST`) ran its install line without `CI=true`: ```sh pnpm install --frozen-lockfile --prefer-offline # no CI=true CI=true pnpm -r typecheck # had CI=true ``` In the swarm sandbox pnpm 11.6.0 sometimes decides `node_modules` needs a purge and, with no TTY, **aborts** the install (`ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY`, exit 1) instead of prompting — so every TypeScript-touching push was refused at the gate (hit while landing #166; worked around with `GATE_TS_CMD`). Only the typecheck line carried `CI=true`. **Fix:** prefix the install line with `CI=true` too, matching the typecheck line and GOTCHAS 4's rule for any non-interactive `pnpm install`. The explanatory comment is extended to say why both lines carry it. ## Why this is a session change, not a worker one `.sandcastle/` is a protected path for swarm workers, so a worker could not make this edit in-run — it needs the standing session. `ts-gate.sh` is **not** vendored (absent from `FACTORY_MANIFEST`), so this is not an edit to a factory-pinned file: `check-harness-drift.sh` stays green. ## Proof Run under no TTY (the gate's real condition): - `./.sandcastle/ts-gate.sh` from an empty `node_modules` → install + all 6 projects typecheck → **exit 0**. - Through the real pre-push entrypoint `gate_ts_stage "$PWD"` (which resolves to `ts-gate.sh` as precedence #2) → **exit 0**. - `check-harness-drift.sh` → **OK** (`ts-gate.sh` is not a vendored file). Note on the red: the exact abort is a sandbox store-state condition. On this standing-session host pnpm 11.6.0 reconciled a matching store cleanly in every synthetic case I tried (foreign `node_modules`, missing `.pnpm`, flipped `nodeLinker`, fresh store-dir), so I could not re-trigger the abort here. The red is the field capture on #166 (quoted in the ticket) plus the documented hazard GOTCHAS 4/24; the fix is proven GREEN above and matches the already-stated rule. GOTCHAS 23 is extended with this follow-on. **Screenshots:** none — harness shell-gate fix with no visible/UI surface; proof is the gate exiting 0 under no TTY (above).
sandcastle: ts-gate.sh install line carries CI=true (#168)
All checks were successful
ci / seam (pull_request) Successful in 40s
939e399711
The per-repo TS pre-push gate (#152, .sandcastle/ts-gate.sh — drift-safe,
not in FACTORY_MANIFEST) ran `pnpm install --frozen-lockfile --prefer-offline`
WITHOUT CI=true; only the following `CI=true pnpm -r typecheck` line had it.

In the swarm sandbox pnpm 11.6.0 sometimes decides node_modules needs a purge
and, with no TTY, aborts the install (ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY,
exit 1) instead of prompting, so every TS-touching push was refused at the gate
(hit while landing #166; worked around with GATE_TS_CMD). Prefix the install
line with CI=true to match the typecheck line and GOTCHAS 4's rule; extend the
comment to say why.

Proven GREEN under no TTY both directly (./.sandcastle/ts-gate.sh, exit 0 from
an empty node_modules) and via the real pre-push entrypoint (gate_ts_stage,
exit 0, all 6 projects typecheck). check-harness-drift.sh OK (file not vendored).

STATUS.md header + log and GOTCHAS 23 updated in the same commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Factory-Account: d631bd58e1e9
All checks were successful
ci / seam (pull_request) Successful in 40s
This pull request has changes conflicting with the target branch.
  • STATUS.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin agent/issue-168:agent/issue-168
git switch agent/issue-168

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff agent/issue-168
git switch agent/issue-168
git rebase main
git switch main
git merge --ff-only agent/issue-168
git switch agent/issue-168
git rebase main
git switch main
git merge --no-ff agent/issue-168
git switch main
git merge --squash agent/issue-168
git switch main
git merge --ff-only agent/issue-168
git switch main
git merge agent/issue-168
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/coa!182
No description provided.