Repository navigation
ISS-15021: Ask for each ticket's project, show context sizes, and sweep finished worktrees - #456
Merged
Merged
Conversation
… the fleet launch guard
…ep finished worktrees Also covers ISS-15023 (3a, 3c), ISS-14998 and ISS-15026.
# 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 askoffers the saved project as a default and asks each time (ask: truewith aquestion).place --answerresolves the project the person named for one ticket and saves nothing;ask --answerreplaces the default.ticket-write-check.mjsasks 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)
session-context.mjs. The setup check prints the max context and autocompact sizes for Claude Code (the variable, each settings file'sautoCompactWindowand the session model'smodelSettingsentry) and for Codex (config.toml, active profile first). Every value prints with its source. A value that cannot be read prints as unknown.context-guard.mjsandfleet-home.mjsshare its window parsing and range.Review defect classes (ISS-14998), five preventions under the fix cap, in risk order
redact*function over a credential corpus. It foundredactUserinfoleaking the end of a password holding@then/; the pattern is fixed, and the cloud trigger stream now redacts URL credentials too.safe.directorytrust in runtime and shell files.Worktree and Docker cleanup (ISS-15026)
loopruns 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, toevents/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 theloopcommand passes the sweep, so a test or other caller of the loop sweeps nothing.mergedproof. 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.mjsfinds every worktree withgit worktree listand 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 recordrecords a worktree at creation (proof, QA main, lane run, takeover, scratch, writer) with its ticket or PR. The fleet skill says to run it.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.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.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
cleanup-sweep record. The scripts that make worktrees are not wired: a vibe session'snewand 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.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 andplacetests 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.ymlruns them, each in a fresh worktree of an exact proof commit:ruff check .)pyright)pytest plugins/)validate:plugins, benchmark contracts, Codex mirror contractsvalidate:pluginsagain on 0ef7224a)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.