Skip to content

The review brief's rebuild marker write passes the scan for unnoted broad handlers - #2384

Merged
zlareb1 merged 1 commit into
mainfrom
fix/review-brief-history-gather-noted
Dec 6, 2026
Merged

zlareb1 merged 1 commit into
mainfrom
fix/review-brief-history-gather-noted

Conversation

@zlareb1

@zlareb1 zlareb1 commented Dec 6, 2026 •

Copy link
Copy Markdown
Member

Related: #1232

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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_not names one site, server/code/app/review_brief.py::_rebuild::2: a broad handler that notes nothing and is not in tests/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 notes code.review_brief: stale_brief_served with the reason rebuild failed and then the build's notes. That statement runs whether the marker was written or not, so degraded already 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 write category and a comment that says where the note is made. Calling degradations.partial inside 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 no degraded note changes. The list gains no other entry and loses none.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: reverting removes the list line, and the scan fails on the site again.

Tests

  • LOOM_ENV_FILE= .venv/bin/python -m pytest -q -p no:randomly tests/unit/test_degraded_unnoted.py on main's tree: 1 failed, 2 passed. The failure lists server/code/app/review_brief.py::_rebuild::2 and 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.py on this branch: 9 passed. The scan passes whole, so the list holds no stale entry.
  • The diff holds no Python file, so ruff and mypy have 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_served notes, 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

  • Local format, lint, type checks and focused tests pass. The full make test-unit and applicable integration results are reported by CI; a full local run is not required before pushing.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

…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>
@vercel

vercel Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Dec 6, 2026 10:34am UTC
loom-telemetry Ready Ready Preview Dec 6, 2026 10:34am UTC

Request Review

@zlareb1
zlareb1 merged commit 302b8f8 into main Dec 6, 2026
69 of 76 checks passed
@zlareb1
zlareb1 deleted the fix/review-brief-history-gather-noted branch December 6, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant