coa sandbox: pre-push TS lint gate (#1252) fails closed — no lint script / ts-gate.sh / nix #152
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#152
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?
The vendored pre-push TypeScript lint gate (
.sandcastle/gate-lib.shgate_ts_stage, factory #1252) fails closed for every TS-touching push in theMatou/coasandbox, blocking landing.Symptom (hit on #151, a schema/server/templates change):
Cause.
gate_ts_stageresolves a linter by first-match:GATE_TS_CMDenv → executable.sandcastle/ts-gate.sh→ nix dev-shell default (pnpm run lint). In this sandbox none resolve:GATE_TS_CMDis unset, there is no.sandcastle/ts-gate.sh,nixis not on PATH, and this repo has no eslint at all — nolintscript in anypackage.json, no eslint config, no eslint devDependency. So even the nix defaultpnpm run lintwould fail. The gate was introduced by a recent FACTORY_REF bump; this repo was never wired for it.Proposed fix (pick one; all are two-way-door, human/session territory because they touch protected
.sandcastle/or infra):.sandcastle/ts-gate.sh(per-repo layer, not in FACTORY_MANIFEST — drift-safe) running this repo's real static seam, e.g.CI=true pnpm -r typecheck; orGATE_TS_CMDin the sandbox Dockerfile to the same; orlintscript to the workspace and let the nix default run it.Workaround used on #151: pushed with
GATE_TS_CMD='CI=true pnpm -r typecheck'(the repo's only static analysis) so the ticket could land; this is not durable — every future TS ticket hits the same wall until one of the above is in place.Filed from ticket #151 (community downloads page appVersion).
Close report — landed on
main(940d461)Ruled by agent under ADR 0002 (two-way-door doctrine) — veto anytime. Revertible
(a single new per-repo file + docs) and provable (the gate itself runs green). No
one-way door touched: no vendored file edited, no secret, no security-posture change.
What landed
Chose fix option 1 — an executable per-repo
.sandcastle/ts-gate.sh(theprecedence-#2 override in
gate_ts_stage). It is not in.sandcastle/FACTORY_MANIFEST,so
check-harness-drift.shtreats it as a repo-local layer and never compares it to thefactory (drift-safe — the same shape the factory documents for
go-gate.sh). It runs thisrepo's real static seam:
i.e.
tsc --noEmitacross all six workspace projects — the same checkmake typecheck/CI's
seamjob run. The#151workaroundGATE_TS_CMD='CI=true pnpm -r typecheck'isretired. No vendored
.sandcastle/file was edited.Not chosen: option 2 (
GATE_TS_CMDin the Dockerfile — only covers the sandbox, not thehost push path where
#151was blocked) and option 3 (adopt eslint — a much larger, opinionatedchange; this repo's only static analysis today is typecheck, so the gate should reflect that).
Root cause (recorded as GOTCHAS 23)
gate_ts_stage(.sandcastle/gate-lib.sh, factory #1252) resolves a linter first-match:GATE_TS_CMD→ executable.sandcastle/ts-gate.sh→ nix default (pnpm run lint). Thisrepo has no eslint (no
lintscript / config / devDependency) and no flake, so noneresolved → fail-closed for every TS-touching push.
Proof
gate_ts_stage <root>→ resolves to.sandcastle/ts-gate.sh, exit 0 (6/6 projects green).gate_run <root> "" gofmt(host push profile) on a syntheticserver/src/app.tschange →gate: TypeScript change detected — running the pinned eslint lint gate→ exit 0.(Before this fix the same path exited 3 with
refusing to push un-linted TypeScript (#1252).)940d461tomainpassed the pre-push hook (gate: no gated language touched— thiscommit carries no
.ts/.go, andts-gate.shis not a manifest path so the drift gate is silent too).Commits
940d461sandcastle: #152 — per-repo TS pre-push gate (ts-gate.sh) so #1252 stops failing closed(adds
.sandcastle/ts-gate.sh,STATUS.mdheader+log,docs/GOTCHAS.md#23 — all in one commit).Advances #152. Closing.