fleet-tui/floor .vue/.js pushes blocked: the self-consumer has no TS pre-push gate (no nix, no root lint script, no GATE_TS_CMD/ts-gate.sh) #312

Closed
opened 2026-10-28 18:12:57 +00:00 by matou-build-agent · 1 comment

Symptom

The TypeScript pre-push gate (.sandcastle/gate-lib.sh gate_ts_stage, #1252) fails closed for any change touching fleet-tui/floor's .vue/.js files when pushed from a swarm sandbox:

gate: TypeScript change detected — running the pinned eslint lint gate
gate: TypeScript change detected but no supported TS gate resolved in this workdir.
gate: refusing to push un-linted TypeScript (#1252)...

This blocked landing #306 (the Office screen) from the sandbox — the only way past was the GATE_TS_CMD env seam (see the ADR-0174 ruling on #306).

Cause

For the dev-factory self-consumer, none of the three gate tiers resolve:

  1. GATE_TS_CMD — not set in .sandcastle/Dockerfile (stack is "none (harness repo)").
  2. .sandcastle/ts-gate.sh — does not exist.
  3. the nix default (gate_ts_default_cmd: nix develop … pnpm install && pnpm run lint) — the sandbox image has no nix, and even on a host with nix it would fail: the root package.json has no lint script (fleet-tui/floor is a separate package with its own package.json, no eslint config).

So the gate guards nothing CI enforces (.forgejo/workflows/ci.yml only runs the shell static-analysis + offline bash suite — it never lints or tests fleet-tui/floor's JS/Vue), yet it blocks every floor .vue push.

Proposed fix

Give the self-consumer .sandcastle layer a real TS gate for the floor — e.g. a .sandcastle/ts-gate.sh (per-repo layer, drift-safe, not in the manifest) that runs the floor's own gate:

#!/usr/bin/env bash
set -euo pipefail
cd fleet-tui/floor
npm ci --no-audit --no-fund
npm run build
npx vitest run

(or set GATE_TS_CMD to the same in .sandcastle/Dockerfile). This is a protected-path change, so it needs an interactive session's standing to land in the vendored self-copy + Dockerfile. Found while working #306 (Office slice 1/5), which had to use the GATE_TS_CMD env override to push its PR.

## Symptom The TypeScript pre-push gate (`.sandcastle/gate-lib.sh` `gate_ts_stage`, #1252) fails **closed** for any change touching `fleet-tui/floor`'s `.vue`/`.js` files when pushed from a swarm sandbox: ``` gate: TypeScript change detected — running the pinned eslint lint gate gate: TypeScript change detected but no supported TS gate resolved in this workdir. gate: refusing to push un-linted TypeScript (#1252)... ``` This blocked landing #306 (the Office screen) from the sandbox — the only way past was the `GATE_TS_CMD` env seam (see the ADR-0174 ruling on #306). ## Cause For the dev-factory **self-consumer**, none of the three gate tiers resolve: 1. **`GATE_TS_CMD`** — not set in `.sandcastle/Dockerfile` (stack is "none (harness repo)"). 2. **`.sandcastle/ts-gate.sh`** — does not exist. 3. **the nix default** (`gate_ts_default_cmd`: `nix develop … pnpm install && pnpm run lint`) — the sandbox image has **no `nix`**, and even on a host with nix it would fail: the root `package.json` has **no `lint` script** (`fleet-tui/floor` is a separate package with its own `package.json`, no eslint config). So the gate guards nothing CI enforces (`.forgejo/workflows/ci.yml` only runs the shell static-analysis + offline bash suite — it never lints or tests `fleet-tui/floor`'s JS/Vue), yet it blocks every floor `.vue` push. ## Proposed fix Give the self-consumer `.sandcastle` layer a real TS gate for the floor — e.g. a `.sandcastle/ts-gate.sh` (per-repo layer, drift-safe, not in the manifest) that runs the floor's own gate: ```sh #!/usr/bin/env bash set -euo pipefail cd fleet-tui/floor npm ci --no-audit --no-fund npm run build npx vitest run ``` (or set `GATE_TS_CMD` to the same in `.sandcastle/Dockerfile`). This is a protected-path change, so it needs an interactive session's standing to land in the vendored self-copy + Dockerfile. Found while working **#306** (Office slice 1/5), which had to use the `GATE_TS_CMD` env override to push its PR.
Author
Member

Close-report — landed on main (1272b56151, push-mode self-consumer).

What landed: a per-repo .sandcastle/ts-gate.sh — the self-consumer's real TypeScript pre-push gate for the floor. It is precedence tier 2 of gate_ts_stage (an executable .sandcastle/ts-gate.sh, auto-detected), not in FACTORY_MANIFEST, so it stays a per-repo layer file (drift-safe — no factory-core change, no re-vendor, GOTCHAS 4). The drift check iterates manifest entries only, so an extra non-manifest file never trips it.

Why it was needed: the harness repo's stack is "none" — no eslint config, root package.json has no lint script, and the swarm sandbox (node:22-bookworm) has no nix. All three tiers of gate_ts_stage (GATE_TS_CMD → .sandcastle/ts-gate.sh → the nix pnpm run lint default) missed, so the gate failed closed (exit 3) for ANY ts-token change — every fleet-tui/floor .vue/.js push from the sandbox AND every host reconcile/session push (the host has nix but pnpm run lint has no script). That forced #306 through the GATE_TS_CMD env seam. ts-gate.sh resolves BOTH push paths (the GATE_TS_CMD-in-Dockerfile alternative would have left the host push still blocked).

What it does: scopes to the one TS build/test harness this repo owns. A pushed range touching fleet-tui/floor/ runs npm ci && npm run build && npm test (the Vite build + the node --test server suite + the vitest component suite — none of which CI runs: the offline bash suite only runs the floor's node --test server tests, never the build or vitest). A range touching no floor file (root main.mts/branch-strategy.mts, the root package.json for the lone @ai-hero/sandcastle dep) passes with a loud note — this repo has no offline check for those; sandcastle type-checks them at run time.

Proof (on matou-workstation):

  • Reproduced the symptom: pre-fix gate_ts_stage on a ts-token change exits 3 with the #1252 refusal message (no nix / no override / no ts-gate.sh).
  • Floor-touching range → ts-gate.sh builds the floor (Vite, ~0.3 s) and runs green: 137 node --test pass, 35 vitest pass, exit 0.
  • Non-floor range → passes with the note, exit 0.
  • node_modules/ and web/dist/ are gitignored, so the gate never dirties the tree.
  • bash -n + shellcheck -S warning clean (pinned v0.11.0). Full offline suite green; docs-budget-test green.

Note on test coverage: the generic ts-override seam (GATE_TS_CMD / .sandcastle/ts-gate.sh auto-detection) is already covered by tests/gate-lib-test.sh. There is no appropriate home for an automated test of this per-repo file: the root tests/ are factory-core (and must not reference a per-repo file other consumers lack), and .sandcastle/tests/ are vendored manifest files. The live gate runs above are the proof.

Commit: 1272b56151 (sandcastle: #312 — self-consumer floor TS pre-push gate), with the docs/journal/2026-10-28-312-floor-ts-gate.md entry + the STATUS.md self-consumer row note in the same commit.

Ruled by agent under ADR 0174 — veto anytime. This was a two-way door throughout: a revertible per-repo config file, proven by the existing gate machinery and the floor's own suite. No one-way door touched (no secrets, no posture widening, no re-vendor).

**Close-report — landed on `main` (`1272b56151`, push-mode self-consumer).** **What landed:** a per-repo `.sandcastle/ts-gate.sh` — the self-consumer's real TypeScript pre-push gate for the floor. It is precedence tier 2 of `gate_ts_stage` (an executable `.sandcastle/ts-gate.sh`, auto-detected), **not** in `FACTORY_MANIFEST`, so it stays a per-repo layer file (drift-safe — no factory-core change, no re-vendor, GOTCHAS 4). The drift check iterates manifest entries only, so an extra non-manifest file never trips it. **Why it was needed:** the harness repo's stack is "none" — no eslint config, root `package.json` has no `lint` script, and the swarm sandbox (`node:22-bookworm`) has no `nix`. All three tiers of `gate_ts_stage` (`GATE_TS_CMD` → `.sandcastle/ts-gate.sh` → the nix `pnpm run lint` default) missed, so the gate failed **closed** (exit 3) for ANY ts-token change — every `fleet-tui/floor` `.vue`/`.js` push from the sandbox AND every host reconcile/session push (the host has nix but `pnpm run lint` has no script). That forced #306 through the `GATE_TS_CMD` env seam. `ts-gate.sh` resolves BOTH push paths (the `GATE_TS_CMD`-in-Dockerfile alternative would have left the host push still blocked). **What it does:** scopes to the one TS build/test harness this repo owns. A pushed range touching `fleet-tui/floor/` runs `npm ci && npm run build && npm test` (the Vite build + the node `--test` server suite + the vitest component suite — none of which CI runs: the offline bash suite only runs the floor's `node --test` server tests, never the build or vitest). A range touching no floor file (root `main.mts`/`branch-strategy.mts`, the root `package.json` for the lone `@ai-hero/sandcastle` dep) passes with a loud note — this repo has no offline check for those; sandcastle type-checks them at run time. **Proof (on `matou-workstation`):** - Reproduced the symptom: pre-fix `gate_ts_stage` on a ts-token change exits **3** with the `#1252` refusal message (no nix / no override / no ts-gate.sh). - Floor-touching range → `ts-gate.sh` builds the floor (Vite, ~0.3 s) and runs green: **137 `node --test` pass, 35 vitest pass**, exit 0. - Non-floor range → passes with the note, exit 0. - `node_modules/` and `web/dist/` are gitignored, so the gate never dirties the tree. - `bash -n` + `shellcheck -S warning` clean (pinned v0.11.0). Full offline suite green; `docs-budget-test` green. **Note on test coverage:** the generic ts-override seam (`GATE_TS_CMD` / `.sandcastle/ts-gate.sh` auto-detection) is already covered by `tests/gate-lib-test.sh`. There is no appropriate home for an automated test of this *per-repo* file: the root `tests/` are factory-core (and must not reference a per-repo file other consumers lack), and `.sandcastle/tests/` are vendored manifest files. The live gate runs above are the proof. **Commit:** `1272b56151` (`sandcastle: #312 — self-consumer floor TS pre-push gate`), with the `docs/journal/2026-10-28-312-floor-ts-gate.md` entry + the `STATUS.md` self-consumer row note in the same commit. Ruled by agent under ADR 0174 — veto anytime. This was a two-way door throughout: a revertible per-repo config file, proven by the existing gate machinery and the floor's own suite. No one-way door touched (no secrets, no posture widening, no re-vendor).
matou-build-agent 2026-10-28 18:31:53 +00:00
Sign in to join this conversation.
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/dev-factory#312
No description provided.