Repository navigation
feat: mark each safe point to /clear for Headroom's auto-clear - #456
Merged
Merged
Conversation
clear-point.mjs writes the next command to the file HEADROOM_CLEAR_POINT names, and only there. It won't mark twice with nothing changed, so a step that keeps failing can't loop a clear and retry.
…e-to-clear closer From the review: git status hid edits to an already-changed file and new files in an untracked folder, so the tree is fingerprinted through a throwaway index. The agile path marks only when the release's next step has moved, so a stopped run gets one retry at most. verify's mark no longer doubles the slash, and new-project and adopt mark theirs.
From the re-review: git add -A copied every untracked file into .git, so a 1 GB file timed out the mark and left an 800 MB temp pack each time. The fingerprint is now HEAD plus the size and time of each path git status lists and each file in .planning, found where Cadence finds it, leaving out the logs its hooks append on every tool call.
|
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.



Cadence 4.6.0. Every command whose report says it's safe to
/clearfirst now marks that safe point, with the command that picks up after it, for a host that clears on its own. Today that host is Headroom 0.2.0's auto-clear. The newcadence-core/bin/clear-point.mjswrites{ "next": "/cadence:cad-plan 2" }to the fileHEADROOM_CLEAR_POINTnames, and with the variable unset it writes nothing, so without Headroom nothing changes. The old path marks in the done steps of context, plan, execute, verify, new-project and adopt. The agile path marks/cadence:cad-agileafter a report that finished its step, while the release has a next step.The script won't mark again when nothing has moved since its last mark, so a step that keeps stopping can't loop a clear and a retry. On the old path it compares the working tree by HEAD plus the size and time of each path git status lists and each file in
.planning, leaving out the logs Cadence's hooks append on every tool call. On the agile path it compares the release's next step. It reads no file content and writes nothing into.git, only a small fingerprint file under the git directory.Verified: 22 tests in
tests/clear-point.test.mjsand the moved pins inarg-contract.test.mjsandseam-calls.test.mjs. The full suite shows no failures beyond the 44 that fail on untouched 4.5.3 on my machine, and self-verify is clean. Two code reviews and their fixes. A live run of the agile path with Headroom in a scratch project, where each safe point was marked, Headroom cleared above its clear point, and Cadence picked up in the fresh session from disk. The suite is pinned to4bebbda, the 4.x tests tip, which cadence-tests PR #27 merged into itsmain.Byte budgets rose where the mark went in: 156 to 159 bytes for adopt, context, execute, new-project and plan, 302 for verify, 188 for the
/cad-agileskill, and 38 for the convention inreferences/conventions.md. This change still has to be merged forward into release/5.0.