Repository navigation
The review brief's rebuild marker write passes the scan for unnoted broad handlers - #2384
Merged
Merged
Conversation
…road handlers test_degraded_unnoted fails on main: the second broad handler of _rebuild in server/code/app/review_brief.py logs, notes nothing and is not in the list. The handler guards the row that records a rebuild that failed, with the read that precedes it. The statement after it serves the stored brief through _stale_served, which notes code.review_brief: stale_brief_served and the build's notes whether the marker was written or not, so the answer says it is the stored brief either way. The scan reads a handler on its own, so the site is listed as a write with where the note is made. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Related: #1232
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Not required.
Why
The unit job fails on
main.tests/unit/test_degraded_unnoted.py::test_every_broad_handler_notes_its_fallback_or_says_why_it_need_notnames one site,server/code/app/review_brief.py::_rebuild::2: a broad handler that notes nothing and is not intests/unit/degraded_unnoted.txt.The handler guards the write of the row that records a rebuild that failed, with the read that precedes that write. It logs and falls through to the statement after it,
_stale_served(stale, REBUILD_FAILED, notes), which notescode.review_brief: stale_brief_servedwith the reasonrebuild failedand then the build's notes. That statement runs whether the marker was written or not, sodegradedalready says the answer is the stored brief of an older payload version. An unwritten marker changes one thing: the next read builds again.The scan reads a handler on its own and does not see the statement after it. The site is listed with the
writecategory and a comment that says where the note is made. Callingdegradations.partialinside the handler would add a second note for a failure that leaves the answer as it is.Scope and risk
One line in
tests/unit/degraded_unnoted.txt. No server code, no payload and nodegradednote changes. The list gains no other entry and loses none.Compatibility, rollout and rollback
Tests
LOOM_ENV_FILE= .venv/bin/python -m pytest -q -p no:randomly tests/unit/test_degraded_unnoted.pyonmain's tree: 1 failed, 2 passed. The failure listsserver/code/app/review_brief.py::_rebuild::2and no other site.LOOM_ENV_FILE= .venv/bin/python -m pytest -q -p no:randomly tests/unit/test_degraded_unnoted.py tests/unit/test_public_copy.pyon this branch: 9 passed. The scan passes whole, so the list holds no stale entry.ruffandmypyhave nothing of it to read and were not run. CI runs the full unit suite.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. Checked by reading: the handler and the statement after it in
_rebuild, what_stale_servednotes, the scan's rule for a broad handler and its category definitions, and the test run before and after the change.I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code