Repository navigation
fix(replacements): skip Bucket folders that are not run identities - #238
Merged
Merged
Conversation
ReplacementEvidence.records() read run.json from every folder under runs/. Folders that are not Harbor-HF runs have no run.json, so every replacement request and the leaderboard failed. Match the projection, which already reads only run-<24 hex> folders. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Every replacement request failed with
replacement_unavailable("Replacement request could not be confirmed; refresh before retrying"), and the leaderboard returned no rows.ReplacementEvidence.records()lists every folder underruns/in the Bucket and readsrun.jsonfrom each one. The artifact Bucket can hold other folders there, such as older smoke-test outputs, and those have norun.json. The read threw, the replacement routes mapped the unexpected error to a generic 503, and the leaderboard caught it and returned an empty list.This change filters the listing to
runs/run-<24 hex>/before reading, which is the same rule the projection already uses when it lists run records (packages/control-core/src/projection.ts).A new test in
packages/control-core/test/replacements.test.tsadds a strayruns/legacy-smoke/folder and checks thatrecords()still returns the real runs. It fails without the fix. The full suite passes (102 files, 1718 tests) afternpm ciandnpm run build, and the public privacy check passed.🤖 Generated with Claude Code