Skip to content

ISS-15021: Ask for each ticket's project, show context sizes, and sweep finished worktrees - #456

Merged
shafty023 merged 5 commits into
mainfrom
feat/iss-15021-fleet
Dec 3, 2026
Merged

shafty023 merged 5 commits into
mainfrom
feat/iss-15021-fleet

Conversation

@shafty023

Copy link
Copy Markdown
Collaborator

What was wrong

Four logged vibe problems. A new ticket could only go to the saved backlog project (ISS-15021). The setup check never showed the session's context sizes or suggested a cheaper autocompact window (ISS-15023). Several review defect classes had no prevention, and one let part of a URL password through redaction (ISS-14998). Finished worktrees and Docker piled up on both machines until the operator asked for cleanup (ISS-15026).

This work was finished outside vibe at the operator's request, so vibe's own gate did not run on it.

What changed

Ticket placement (ISS-15021)

  • ticket-project.mjs ask offers the saved project as a default and asks each time (ask: true with a question). place --answer resolves the project the person named for one ticket and saves nothing; ask --answer replaces the default.
  • The project guard allows a create at Triage, Backlog or Todo in the saved project or a project read from the tracker in this conversation. An unstarted ticket can move to such a project. The In Progress start-work move keeps its check.
  • ticket-write-check.mjs asks for the project name and refuses a create at In Progress. An undated project skips the end-date check.

Context sizes (ISS-15023 3a and 3c)

  • New session-context.mjs. The setup check prints the max context and autocompact sizes for Claude Code (the variable, each settings file's autoCompactWindow and the session model's modelSettings entry) and for Codex (config.toml, active profile first). Every value prints with its source. A value that cannot be read prints as unknown.
  • A Claude Code session where every source was read and none sets a window gets one line recommending 400k, which it may ignore.
  • context-guard.mjs and fleet-home.mjs share its window parsing and range.

Review defect classes (ISS-14998), five preventions under the fix cap, in risk order

  • Classes 5 and 6 (credential leak): a guard runs every runtime redact* function over a credential corpus. It found redactUserinfo leaking the end of a password holding @ then /; the pattern is fixed, and the cloud trigger stream now redacts URL credentials too.
  • Class 7 (trust widened): a guard flags wildcard Git safe.directory trust in runtime and shell files.
  • Classes 11, 1 and 9 (destructive action on an unreadable input, fail-open gate, caller-written evidence): one sentence in the adversarial reviewer's guard attack, each clause pinned by the always-loaded rule check. The reviewer's size cap is unchanged; to fit it, wording the same file already states elsewhere was cut (the web and Desktop example of a shared package, "run only at handoff", and a second "actual" before the decision table).

Worktree and Docker cleanup (ISS-15026)

  • The worker-check loop runs the owned cleanup sweep on every configured machine after each pass (cleanup-pass.mjs). It writes what it removed and kept, each with its reason, to events/worktree-cleanup.md, and rewrites it only when that list changes. A kept tree repeats its last reason while its re-check waits, so the file does not change between checks. A failed sweep is one line there and never fails the pass. Only the loop command passes the sweep, so a test or other caller of the loop sweeps nothing.
  • A merged or closed PR now gets past a stale board state (session live, not handed off) through a new merged proof. The tree must still be clean, with no process cwd, lock or slot inside. A tree at or behind the merged PR head is covered; one ahead of it is never registered. This proof does not read the writer's session state and has no minimum age, so a finished PR's clean tree with no process inside is removed on the first pass after the merge.
  • worktree-sweep.mjs finds every worktree with git worktree list and ties it to a PR by its branch, or by its creation record. It looks up a bounded number a pass, starting where the last pass stopped, so every tree is reached in turn. It keeps, with the reason, a tree whose lookup fails, whose branch has no PR, several PRs, an open or cross-repository one, a locked or missing tree, and a detached tree whose record names no merged PR.
  • e2e-lock.mjs cleanup-sweep record records a worktree at creation (proof, QA main, lane run, takeover, scratch, writer) with its ticket or PR. The fleet skill says to run it.
  • The remote route reads PR verdicts on this machine and ships them with the board. The far sweep refuses a verdict that is missing, failed or older than 30 minutes. It reads process cwds on its own host.
  • e2e-lock run --helper <name> --helper-orch <dir> runs on the helper's recorded Compose project and records the run's resources on the helper, so its reconcile at PR merge removes them. Another project, or a helper started without one, is refused before the run.
  • A board row whose worktree is gone is retired and reported once, not left as a git ENOENT. A remote cleanup on a host with another vibe version prints one line naming both versions, instead of exiting 1 silently.

vibe 1.1.120 in both vibe plugins. Generated copies were rebuilt with npm run build. Instruction text grows by about 288 words net (instruction-words.mjs), mostly the placement flow and the cleanup steps.

Assertions this changes on purpose

  • owned-cleanup.test.mjs: "a live fleet writer is never registered for retirement" now uses an open PR. With a merged PR and a clean, idle tree, ISS-15026 criterion 2 asks for registration.
  • A board row whose recorded head differs from the merged PR head is no longer refused, when the tree is at or behind that head (criterion 2's PR-identity case).
  • ticket-project-guard.test.mjs: a move to an observed project without a status is allowed, and a create outside the saved project is allowed when the tracker was read for it (ISS-15021).
  • plugin-version.test.mjs: the setup check block gains the context lines (ISS-15023).

Not met or not in scope

  • ISS-14998: classes 2, 3, 4, 8, 10, 12, 13, 14 and 15 have no new prevention; the cap of 10 fixes stopped at five.
  • ISS-15023: the fleet context guard's 300k default is unchanged, because 3a's text does not name it. Its notice still says 300k beside the new 400k line. Parts other than 3a and 3c were not in scope.
  • ISS-15026 criterion 3: no creation script records its worktree itself. Proof, QA main, lane run and takeover trees are made by hand; the skill tells the orchestrator and workers to run cleanup-sweep record. The scripts that make worktrees are not wired: a vibe session's new and cl-sweep's ticket worktree are on a branch, so the branch tie finds them; the frozen render's base tree and main-sync's checkouts are detached and transient. Discovery covers an unrecorded tree on a branch with a PR. A detached tree is removed only when its record names a merged PR; one recorded with only a ticket, or not recorded, is reported, never removed.
  • ISS-15026 criterion 5: the far sweep reads process cwds on its own host; the worker-check remote snapshot is unchanged. Branch verdicts come from the newest 300 PRs of each repository on the board; a branch outside them is kept and reported.
  • No sweep ran against real worktrees on either machine.

How it was tested

Each behavior change has a test written first. With the new sweep module over the base owned-cleanup.mjs, 8 of its first 9 tests fail; the ninth covers only the new module's keep reasons. The two added later (every tree reached in turn, a kept reason repeated during backoff) failed on the sweep code before them. The cleanup loop, helper run, version-skew line and place tests fail on the base because the module, option or command they use does not exist there or exits silently.

Lanes run on a second machine as ci.yml runs them, each in a fresh worktree of an exact proof commit:

Lane Tree Result
Lint (ruff check .) 56582ea5 pass
Type Check (pyright) 56582ea5 0 errors
Tests (pytest plugins/) 0ef7224a 2892 passed, 3 skipped
TypeScript (vibe-closedloop-build): typecheck, test, dist current after two builds 0ef7224a 27 passed, dist unchanged
Plugin Manifest Versions 56582ea5 62 passed
Vibe Eval T0: typecheck, validate:plugins, benchmark contracts, Codex mirror contracts 56582ea5 (validate:plugins again on 0ef7224a) 274 passed, 80 passed, validation passed

The final tree differs from 56582ea5 only in the fleet skill's cleanup bullet (no backticks around the event file, which the references test read as a missing plugin file), the reviewer wording that brings the adversarial reviewer back under its size cap, and the CHANGELOG word count. It differs from 0ef7224a only in the adversarial reviewer file. On the final tree, every contract file that reads that agent definition passes locally: the handoff skill, review consolidation, review lessons, design pass, QA lessons, writer self-review, test-repair lean loop, retired tests, handoff docs, ISS-14336, and the 1057 and 1068 lessons contracts. So do review-class-guards.test.mjs, instruction-words.test.mjs, the vibe-closedloop-build references test and the generic scan.

Node Tests and the vibe-workers TypeScript lane run in GitHub CI on this pull request. A Node Tests run on the second machine was stopped part way, under high load, when CI became available again.

Base automatically changed from feat/iss-15030-cloud-check to main December 3, 2026 00:25
# Conflicts:
#	CHANGELOG.md
#	plugins/vibe-closedloop/.claude-plugin/plugin.json
#	plugins/vibe-closedloop/.codex-plugin/plugin.json
#	plugins/vibe-closedloop/README.md
#	plugins/vibe/.claude-plugin/plugin.json
#	plugins/vibe/.codex-plugin/plugin.json
#	plugins/vibe/README.md
#	plugins/vibe/tools/python/test_pr_takeover_skill_contract.py
#	plugins/vibe/tools/python/test_vibe_ws8_load_contract.py
@shafty023
shafty023 merged commit 2cc2066 into main Dec 3, 2026
25 of 26 checks passed
@shafty023
shafty023 deleted the feat/iss-15021-fleet branch December 3, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant