Repository navigation
Conversation
branch and repo runs leave one ref per agent on the target. A run sweeps its own leftovers before measuring, but only once they are a week old, because it cannot tell a fresh ref from another generator's live one. Anyone benchmarking a throwaway repo had to wait a week or delete refs by hand. `forgemark sweep` runs that cleanup immediately. It takes the benchmark's own target, -ref-namespace and -branch-prefix flags, so it is aimed with the exact flags of the run that pushed the refs, plus -dry-run to list the selection first and -min-age to restore an age guard when another generator might still be pushing. The selection is the one the in-run sweep already uses: exact forgemark-shaped refs under the namespace and prefix, legacy refs/heads/ leftovers included, never a human branch or the remote's default branch. The engine's cleanup now has one core (sweepBenchRefs) that both CleanStaleBenchRefs and the new SweepBenchRefs call, the latter reporting each repo's selected refs and deletions so the CLI can show them. The target and ref flags move into shared registration helpers so the two commands cannot drift. An end-to-end test drives both sweeps against a real receive-pack via git http-backend over CGI: a dry run lists without touching the remote, the in-run sweep spares an hour-old ref, and the standalone sweep at min-age 0 reaches it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GaE8XsVHZkDY1sxV3YLoLA Entire-Checkpoint: ea6099e3bd8e
Run IDs embed the pushing host's clock, so comparing them against the sweeper's time.Now() at min-age 0 skipped refs from any generator whose clock ran ahead, contradicting "0 sweeps every matching ref". A zero age now drops the time comparison entirely. Shape match and a parseable run ID still gate every deletion, and the in-run week-long guard is unchanged. Addresses the Trail Review finding on internal/bench/cleanup.go. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GaE8XsVHZkDY1sxV3YLoLA Entire-Checkpoint: 88c0359b84fd
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.
https://entire.io/gh/entireio/forgemark/trails/8
This draft pull request was opened by Entire to back the linked trail. Feel free to edit the title or body — the link above is what keeps the trail and PR connected.