Jobs plan: fold the stopped-jobs audit's top fixes into phase 0
The audit landed as the plan was finished. Production runners have never had gitleaks (staging only), so phase 0.2 is partly done. Tasks 0.3 to 0.6: gitleaks with production releases, a merge hold no longer stops retries, Engineering's step time made usable, and every failing CI shard's output reaches the fix round. Audit fixes 5 to 7 are recorded as open with reasons. Not reviewed by Astra.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+58
−7
docs/superpowers/plans/2026-11-25-jobs-that-keep-moving.md+58 −7
CI passed — run details
CI log
=== build === CGO_ENABLED=0 go build ./... === vet === go vet ./... === fmt-check === === staticcheck === go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./... === govulncheck === go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... No vulnerabilities found. === gitleaks === [90m7:53PM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net [90m7:53PM[0m [32mINF[0m [1m1 commits scanned.[0m [90m7:53PM[0m [32mINF[0m [1mscanned ~2514401 bytes (2.51 MB) in 289ms[0m [90m7:53PM[0m [32mINF[0m [1mno leaks found[0m === budget === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size budget size: 22 directories within budget === script-test === scripts/prepare-apps_test.sh ok releases lookup failure stops before ship ok app owned elsewhere stops the script ok apps listing failure stops before create ok ambiguous release dir is refused ok explicit version resolves the ambiguity ok releases match is exact, not substring ok shipped version is only promoted, existing app not created ok fresh account creates, ships, promotes to edge, enables ok failing promote stops the script ok ship is retried while uploads are rate limited all passed hack/fonts_test.sh fonts_test: ok === test === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -count=1 ./... receipt: test step 7.944s against a 60s target (the gate's other steps are not in this figure) receipt: 16 packages ran, 0 cached, 6 without tests, 0 failed receipt: slow package 6.962s amadan.net/oficina/base/internal/webtest receipt: slow package 1.112s amadan.net/oficina/base/internal/issuer receipt: slow package 621ms amadan.net/oficina/base/internal/operations receipt: slow package 243ms amadan.net/oficina/base/internal/consumer receipt: slow package 175ms amadan.net/oficina/base/internal/web receipt: slow test 1.51s amadan.net/oficina/base/internal/webtest TestHomeDoesNotWaitOnAStalledSnapshot receipt: slow test 1.08s amadan.net/oficina/base/internal/webtest TestAskZoneIsToldOnce receipt: slow test 790ms amadan.net/oficina/base/internal/issuer TestAuthorizeSignsForInstalledApp receipt: slow test 520ms amadan.net/oficina/base/internal/operations TestOperationsRefusals receipt: slow test 270ms amadan.net/oficina/base/internal/issuer TestAuthorizeRefusals === native === strings: copy review's strings.json is not here (git-ignored); its comparison skipped strings: 119 in the catalog, 116 used worktree-lib_test: ok
diff --git a/docs/superpowers/plans/2026-11-25-jobs-that-keep-moving.md b/docs/superpowers/plans/2026-11-25-jobs-that-keep-moving.md| index 74a0151..6bad3c7 100644 |
| --- a/docs/superpowers/plans/2026-11-25-jobs-that-keep-moving.md |
| +++ b/docs/superpowers/plans/2026-11-25-jobs-that-keep-moving.md |
| @@ -21,12 +21,12 @@ |
| | Spec item | Status | Where | |
| |---|---|---| |
| | Phase 0.1: staging runner forge credential for repositories it creates | **Done in code; staging check pending** | Equipo `8757df09`, merged `14496879` (11-20): owner's staging runner gets its own agent-wide credential file at each install. Task 0.1 confirms the installed runner has it | |
| -| Phase 0.2: `gitleaks` in the installed runner release | **Done in code; staging check pending** | same commit: staging build copies pinned gitleaks, provenance checks it. Task 0.1 confirms | |
| +| Phase 0.2: `gitleaks` in the installed runner release | **Partly: staging only** | same commit: the **staging** build copies pinned gitleaks. The stopped-jobs audit (2026-11-25) found none of the 23 **production** release directories has it, including the live `927a031a`, so every production preview fails with `preview_scanner`. Task 0.3 | |
| | (related) new job repositories start with `main` | **Done** | Equipo `c8c4b82d` (11-20): runner pushes an empty-commit `main` into a repository it created | |
| | (related) preview refusals reach the step (`preview_headers`) | **Done** | Equipo `8dc096b4` (11-21): runner reads carlos's stderr | |
| | (related) carry on after connecting Oficina | **Done** | Equipo `9f7e04a6` (11-19); Base `f42602f` | |
| | (related) local merge refusals become final with a no-access reason | **In flight elsewhere** | Equipo branch `honest-merge-refusals` at `ef909582` (not merged): `forge.ErrMergeNoAccess`, step reason `wire.ReasonMergeNoAccess = "merge_no_access"`, `causeNoAccess` in `jobStop` (also for `merge_forbidden`), detail `assistant.job.detail.no_access`, and "trying again cannot help". Not planned here; Tasks 1.6, 2.3 and 2.6 build on it (PD11) | |
| -| (related) stopped-jobs audit | **Not landed** | report expected at `.superpowers/sdd/2026-11-13-assistant-jobs/stopped-jobs-audit-2026-11-25.md`; placeholder Task 0.2 | |
| +| (related) stopped-jobs audit | **Landed** | `.superpowers/sdd/2026-11-13-assistant-jobs/stopped-jobs-audit-2026-11-25.md` (Base checkout): 26 jobs, 18 stopped; its top fixes are Tasks 0.3 to 0.6 | |
| | Addendum: decision cards carry context, link, recommendation, option detail (Equipo) | **Partly** | Equipo branch `decision-cards-context` `cf0614ec`, **not merged**; based on `c8c4b82d`, 154 commits behind; its protocol 29 and migration `0095` both collide with main (see PD1, PD2); its 34 strings are marked `COPY REVIEW PENDING`, which the release copy check does not catch. Landed by Task 1.1 | |
| | Addendum: Base renders the decision parts | Not started | Tasks 1.18 to 1.20 (job asks and outcome cards, web and native) | |
| | K1 job card fields, decision identity, receipts | Not started | | |
| @@ -103,16 +103,67 @@ Each step goes to staging (`*.oncarlos.com`) first, then production (`*.oficina. |
| ### Task 0.1: Confirm phase 0 holds on staging |
| -Verification only; the fixes are merged (table above). |
| +Verification only; the staging fixes are merged (table above). Production's `gitleaks` is Task 0.3. |
| -- [ ] **Step 1:** On staging, read the six jobs' steps (Equipo task pages). Expected: job 5 and job 6 previews no longer fail with `preview_scanner`; a merge into a repository the runner created no longer fails "merge refused by validation". |
| +- [ ] **Step 1:** On staging, read the six jobs' steps (Equipo task pages). Expected: job 5 and job 6 previews no longer fail with `preview_scanner`; a merge into a repository the runner created no longer fails "merge refused by validation" (the audit saw Neary's land after the credential fix). |
| - [ ] **Step 2:** Record the result, with commit ids, under a new "Jobs that keep moving" heading in `docs/live-check.md` (Base). Commit: `Live check: phase 0 of jobs that keep moving holds on staging`. |
| -### Task 0.2: Fold in the stopped-jobs audit's top fixes |
| +### Task 0.2: The stopped-jobs audit, folded in |
| -The audit was not at `/home/paulca/amadan.net/carlos/base/.superpowers/sdd/2026-11-13-assistant-jobs/stopped-jobs-audit-2026-11-25.md` when this plan was written. |
| +The audit (`/home/paulca/amadan.net/carlos/base/.superpowers/sdd/2026-11-13-assistant-jobs/stopped-jobs-audit-2026-11-25.md`) landed as this plan was finished. Its ranked fixes 1 to 4 are Tasks 0.3 to 0.6 below. Its fixes 5 to 7 are not planned here: 5 (Unix sockets and a read-only `.git` in Engineering's sandbox) changes the sandbox's security boundary and needs its own design; 6 (a no-change round after a setup failure recorded as "checks couldn't run", and re-triage of jobs a release has unblocked) needs a design for when re-runs are safe, and phase 1's Try again already lets the person restart such a job (example 1); 7 (staging deploys drain running steps) is a staging script change for whoever owns `upgrade-thin.sh`. These four tasks were added after Astra's last round and have not been reviewed by Astra. |
| -- [ ] **Step 1:** At the start of phase 0's execution, look for the report. If it is there, add each of its top fixes as a Phase 0 task here (repository, files, failing test, run command, commit), unless a task below already covers it (then note which), and commit the plan change. If it is not there, record "audit not landed" in the phase's progress notes and go on: phase 1 does not depend on it, and the audit's fixes join the next phase not yet started. |
| +- [ ] **Step 1:** Note in the handoff that audit fixes 5 to 7 are open, with the reasons above. |
| + |
| +### Task 0.3 (Equipo, operations): `gitleaks` on production runners (audit fix 1) |
| + |
| +**Files:** `scripts/upgrade-thin.sh` (production upgrade), `scripts/runner-reference-allowlist.json`, `internal/release/upgrade_test.go`. |
| + |
| +The production upgrade path installs a release without `gitleaks`, so `previewScannerTool` (`internal/runner/thin/preview_security.go`) finds none beside the binary. Make each production release carry it as staging's build does: copy the pinned `gitleaks` (`release.GitleaksVersion`, checked against `GitleaksSHA256`) into the release directory, and refuse to switch to a release without it. |
| + |
| +- [ ] **Step 1: Failing test** `TestUpgradeCarriesGitleaks` (in `internal/release/upgrade_test.go`, with the script's fake unit): an upgrade from a staged release without `gitleaks` fails before the switch; with it (and a matching digest) succeeds; a wrong digest fails. |
| +- [ ] **Step 2:** Run `go test ./internal/release -run TestUpgradeCarriesGitleaks -count=1`. Expected: FAIL. |
| +- [ ] **Step 3:** Implement. |
| +- [ ] **Step 4:** Run the same, then `make runner-host`. Expected: PASS. |
| +- [ ] **Step 5:** Commit `Production runner releases carry gitleaks, checked by digest`. |
| +- [ ] **Step 6 (operations, with Paul's go-ahead):** put the pinned `gitleaks` into the live production release directory (`~/.local/share/equipo-runner/releases/927a031a/`) or run the fixed upgrade; then confirm one production preview deploys. Record it in `docs/live-check.md` (Base). |
| + |
| +### Task 0.4 (Equipo): A merge hold no longer stops retries (audit fix 2) |
| + |
| +**Files:** `internal/equipo/triage/triage.go` (`Classify`), `internal/equipo/triage/triage_test.go`. |
| + |
| +`Classify` returns nothing when `f.Held` (a merge hold) is set, so a held task's `step_timeout` or `runner_restarted` is never retried. The hold is meant to stop a merge only: apply `f.Held` to the merge-side actions (`NeedsMerge` recheck, rebase), not to `NeedsRetry`. |
| + |
| +- [ ] **Step 1: Failing test** `TestClassifyHeldStillRetries`: held + `step_timeout` → retry; held + `runner_restarted` → retry; held + `NeedsMerge` → nothing (as today); not held → unchanged. |
| +- [ ] **Step 2:** Run `go test ./internal/equipo/triage -run TestClassifyHeldStillRetries -count=1`. Expected: FAIL. |
| +- [ ] **Step 3:** Implement. |
| +- [ ] **Step 4:** Run `go test ./internal/equipo/triage ./internal/equipo/chat -run 'Triage|Classify|Retriage' -count=1`. Expected: PASS. |
| +- [ ] **Step 5:** Commit `A merge hold stops merges, not retries`. |
| + |
| +### Task 0.5 (Equipo, runner): Engineering's step time is usable (audit fix 3) |
| + |
| +**Files:** `internal/runner/thin/engineer.go` (`stepPrompt`, the timeout path, `DefaultMaxStep`), `internal/runner/thin/run.go` (`OptionsFromEnv`), `internal/runner/thin/engineer_time_test.go` (new). |
| + |
| +**Interfaces:** `stepPrompt` states the step's limit in minutes and replaces "Run targeted tests and the repository's documented gates before finishing" with "Run targeted tests; the Checks step runs the full gate" (model-facing, not copy); on `step_timeout`, when the tree has changes, commit it and report the step as timed out **with** its candidate, so Checks runs on it (no change: as today); `OptionsFromEnv` reads `EQUIPO_RUNNER_MAX_STEP` (a Go duration, at least 5 minutes, at most 60; else the default 20). |
| + |
| +- [ ] **Step 1: Failing tests:** `TestStepPromptStatesLimit`, `TestTimeoutKeepsChanges` (a step killed at the cap after writing a file produces a commit and a candidate; one that wrote nothing produces none), `TestMaxStepFromEnv` (valid, too small, too large, unparsable). |
| +- [ ] **Step 2:** Run `go test ./internal/runner/thin -run 'StepPromptStatesLimit|TimeoutKeepsChanges|MaxStepFromEnv' -count=1`. Expected: FAIL. |
| +- [ ] **Step 3:** Implement. If a timed-out step with a candidate needs the instance to accept it, the instance half (`internal/equipo/chat/review.go`, treat it like a finished step whose report says it ran out of time) goes in this task with `TestTimedOutCandidateGoesToChecks`. |
| +- [ ] **Step 4:** Run the same, then `make runner-host`. Expected: PASS. |
| +- [ ] **Step 5:** Commit `Engineering knows its time limit, and a timeout keeps the work`. |
| + |
| +### Task 0.6 (Equipo, runner): Every failing shard's output reaches the fix round (audit fix 4) |
| + |
| +**Files:** `internal/runner/thin/judge_hosted.go` (`failedLogs`), `internal/runner/thin/judge_hosted_test.go`. |
| + |
| +`failedLogs` joins every failing shard's log and keeps the tail within `MaxChecksOutput` (32 KB), so earlier shards vanish. Give each failing shard an equal share of the limit, and within a share keep the `--- FAIL` and `Error` lines first, then the shard's tail. |
| + |
| +- [ ] **Step 1: Failing test** `TestFailedLogsEveryShard`: three failing shards with 40 KB logs each → each shard is named in the output, each keeps its `--- FAIL` lines, the total is within the limit. |
| +- [ ] **Step 2:** Run `go test ./internal/runner/thin -run TestFailedLogsEveryShard -count=1`. Expected: FAIL. |
| +- [ ] **Step 3:** Implement. |
| +- [ ] **Step 4:** Run the same, then `go test ./internal/runner/thin -run 'Judge|Hosted' -count=1`. Expected: PASS. |
| +- [ ] **Step 5:** Commit `Hosted check failures give every shard's failing lines`. |
| + |
| +The audit's other half of fix 4 (not counting a fix round the engineer ran without a working shell, or three rounds for hosted CI) is left for Paul: the shell is fixed since `474c4f61`, so the rounds now mean what they say. |
| --- |