ts-gate.sh install step lacks CI=true — pre-push TS gate fails closed in the sandbox #168
Labels
No labels
agent-blocked
agent-working
bug
deferred
enhancement
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
product-decision
ready-for-agent
ready-for-human
ready-for-session
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/coa#168
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Every TypeScript-touching push in the sandbox is refused at the pre-push gate:
Hit while landing #166.
Cause
.sandcastle/ts-gate.sh(per-repo TS gate, #152) runspnpm install --frozen-lockfile --prefer-offlinewithoutCI=true, thenCI=true pnpm -r typecheck. In this sandbox pnpm 11.6.0 decides node_modules needs a purge and, with no TTY, aborts the install (exit 1) instead of prompting — so the gate fails closed on a legitimate push. Only the typecheck line carriesCI=true. (GOTCHAS 23/24; the #151GATE_TS_CMDworkaround still bypasses it.)Proposed fix
Prefix the install line in
.sandcastle/ts-gate.shwithCI=truetoo (matching the typecheck line), orexport CI=trueat the top of the script..sandcastle/is a protected path, so a worker cannot make this edit in-run — it needs a session/machinery change.Workaround (already used to land #166)
GATE_TS_CMD="'CI=true pnpm install --frozen-lockfile --prefer-offline; CI=true pnpm -r typecheck'"on the push.Filed while on #166.
Close-report (pr-mode) — advances #168. Ruled by agent under ADR 0002 — veto anytime.
Landed as PR #182 (
closes #168, a human merges). NOT pushed tomain.What it lands.
.sandcastle/ts-gate.sh(the per-repo TS pre-push gate from #152 — drift-safe, not inFACTORY_MANIFEST) now prefixes its install line withCI=true:Before, only the typecheck line carried
CI=true; the bare install let pnpm 11.6.0 abort on a no-TTYnode_modulespurge (ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY, exit 1), failing the gate closed on legitimate TS pushes (GOTCHAS 4/24). The comment is extended to explain why both lines carry it.Commit.
939e399—.sandcastle/ts-gate.sh, plusSTATUS.md(header + log) anddocs/GOTCHAS.md(GOTCHAS 23 follow-on) in the same commit.Proof (no TTY, this host).
./.sandcastle/ts-gate.shfrom an emptynode_modules→ install + all 6 projects typecheck → exit 0.gate_ts_stage "$PWD"(resolves tots-gate.sh, precedence #2) → exit 0.check-harness-drift.sh→ OK (ts-gate.shis not vendored).Honest note on the red. The exact abort is a sandbox store-state condition; on this standing checkout pnpm 11.6.0 reconciled a matching store cleanly in every synthetic case I tried (foreign
node_modules, missing.pnpm, flippednodeLinker, fresh store-dir), so I could not re-trigger the abort here. The red is the field capture on #166 (quoted in this ticket) plus the documented hazard GOTCHAS 4/24; the fix is proven GREEN above and matches the stated rule.Door. Two-way: a revertible one-line change to a non-vendored layer file, provable by the gate. The
.sandcastle/protection that blocks a worker is a session/standing matter, which this change is.Ruled by agent under ADR 0174 — veto anytime.
Ruling: state →
ready-for-session. The ticket carried onlybugand no state role, so it was untriaged on state. The worker's close-report above opened PR #182 and flagged this as a session/machinery change.Why it's a two-way door: a label change, fully revertible; no credentials, no security widening, no spend. Not on the one-way-door list.
What proves it:
docs/agents/issue-tracker.md— machinery changes under.sandcastle/are filedready-for-session. The fix is in.sandcastle/ts-gate.sh(a protected path) and PR #182 (closes #168) is open for a human session to merge.Ruled by agent under ADR 0174 — veto anytime.
Label applied:
ready-for-session(categorybugunchanged). The ADR-0174 ruling posted earlier today (15:08Z) already concludedready-for-session, but the state label was dropped before it landed, so the ticket re-surfaced as untriaged on state. Applying it now closes that drop. PR #182 (closes #168) — the one-lineCI=trueprefix on.sandcastle/ts-gate.sh's install line — is open for a human/session merge.Why it's a two-way door: a label change, fully revertible; no credentials, security widening, or spend. What proves it:
docs/agents/issue-tracker.md:50(machinery under.sandcastle/→ready-for-session, never a worker PR) and the open PR #182.Ruled by agent under ADR 0174 — veto anytime.
Ruling: state →
ready-for-human(categorybugunchanged), correcting the priorready-for-sessionruling on this ticket.Why the change.
ready-for-sessionis not terminal here and provably loops. The session's job is done — PR #182 (closes #168) is open and green. By design, a pr-mode ticket with an open agent PR is "handed to review": the session runner deletesready-for-sessionand adds nothing (.sandcastle/session-runner.sh:413-415/:660-663, "#302"), because a human merges the PR. Each triage run then re-reads the stateless ticket as untriaged and re-addsready-for-session, which the runner drops again. This issue's label timeline shows the churn (added 15:08Z, 15:39Z; dropped between). Re-adding it would only restart the loop.## Why human. The sole residue is a human's decision to merge PR #182 — a change to a protected machinery path (
.sandcastle/ts-gate.sh). The swarm worker lane cannot touch.sandcastle/, and the session drainer refuses the open PR by design, so only a human merge advances it. Proposed default: merge PR #182 as-is (the one-lineCI=trueprefix on the install line, so the pre-push TS gate stops failing closed on a no-TTYnode_modulespurge; proven green on this host, GOTCHAS 23/24). The same abort exists factory-side in thefactory onboardtemplate — carry it back on the next re-vendor.Why relabelling is itself a two-way door: a label change, fully revertible, touching no credential, posture, or spend. What proves it: this issue's label-churn timeline and
.sandcastle/session-runner.sh:413-415/:660-663.