Repository navigation
fix(autonudge): re-read a store replaced while its digests were read - #45115
KiroCrewAutoBuilder wants to merge 1 commit into
Conversation
Builder-Run: build-45063-6a1329e6c1ee
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the paired read fixes the reader-side race at its cause, and the new raise can only happen after five back-to-back store replacements. Notes
[DESIGN-REVIEWED] eade53d Description read[DESCRIPTION-READ] 05798e5d6ac8c066f5c29d87a3eed3ea6bfe9daad4f1fda40f75a86b129a0e86 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This is a reader-side fix for a defect linked as #45063, with a deterministic test that fails on base. Only the new exception type is extra surface, and it is a minor note. Notes
What this change shipsInventory (4 items) — 3 justifiedIntent: a loop the gateway committed loads active after a restart, even when another service commits to the same store during the load. FIX.
[FIRST-PRINCIPLES-REVIEWED] eade53d Description read[DESCRIPTION-READ] 5543e3406a4e82a0cbc3adcd55f0c001b9c641c0f92ded845a07c6a5a20985db That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Code change approver deep review: Request changesChanges requested on commit Tier: 2, held for a person: security checklist. A deep review by the code change approver, not by a person · commit |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Changes requested by the code change approver's deep review, not by a person.
The loader change reads correctly and all review lanes pass on head eade53d, but one piece of required evidence is missing. No code change is needed.
- Real-machine verification is missing (
src/kiro_crew/autonudge_service/store_loader.py:444-473, called at:485).- What happens: the body writes
N/Aunder## Real-machine verification.AGENTS.mdallowsN/Aonly when the diff runs nothing. This diff changes_load, which runs at every AutoNudge service start and everyload_for_maintenance. The body's own "Needs a person" section asks for this run twice. No machine record or maintainer waiver is on the PR. - The body also says the CI failure did not reproduce in 150 local runs. The claim that the new test fails on the base is prose only.
- Smallest fix: replace the
N/Ain## Real-machine verificationwith these four entries for head eade53d.- Machine: the machine you used. Use a POSIX machine, because two of the three new tests are skipped on Windows.
- Before: the base commit, the command, and its output. It must show
test_a_peer_commit_between_the_store_and_record_reads_holds_no_rowfail with theunverified_rowhold on the base loader. - After: the same command on head eade53d, with the output that shows the loop loads active.
- Cleanup: how you removed the machine.
- What happens: the body writes
Optional notes, not required:
- Optional: the body says
cli_commands_app.py:428gets the fix. That call isCronService._load, which this PR does not touch. The two real callers arestart()andload_for_maintenance(autonudge.py:928and:817). Remove the CLI claim from "Why it matters", "Reach" and the sibling sweep. - Optional: #45063 is closed, and #45124 already fixed the failing test on main from the test side. The loader fix is still new. Rewrite the Problem around the loader race, and change
Closes #45063to a reference. - Optional:
store_loader.py:554-555now adopts a missing digest record from a read made earlier than on main. The quarantine read and the policy probe run in between. A peer commit in that window loses its digests. This needs a first start beside a concurrent peer commit, so it is rare. Read the record again before the adoption, or list this path under "Not a goal".
One thing done well: the forced-interleaving test pins the race deterministically, and the order test shows the store stays open until the identity check.
This block is withdrawn automatically when a new commit fixes these items or a reply shows one is wrong: the approver reviews it again. Any maintainer can dismiss this review at any time.
Tier: 2, held for a person: security checklist.
Commit eade53d654 · 177 changed lines.
|
Closing this pull request: issue #45063 was closed as completed, so it is not needed. The branch autobuild/45063 stays for anyone who wants to reopen it, and the issue is still assigned to KiroCrewAutoBuilder; anyone with write access may reassign it to take it over. |
Problem / Motivation
Goal: A loop the gateway committed always loads active, even if another AutoNudge service commits to the same store while the load is reading it.
Why it matters
Not a goal
What changed (motivation → approach → change)
Backwards compatibility
Compatible: the loader reads the same two files. It only re-reads when the store was replaced during the read, so a store that is not being written loads exactly as before. The new error is raised only where the old code would have loaded an unverified pair.
Removes nothing: no field, row, path or validator changes. A held row is still held when its digest is truly missing.
Tests
Proof: not provable -- other: prove.py needs a commit, which the session cannot make
Manual verification
Real-machine verification
Screenshots / video
N/A — the patch touches no UI path.
Related Issues
Closes #45063
Sibling sweep
Sibling: src/kiro_crew/autonudge_service/store.py:251 -- not affected -- the writer reads the record under its own commit_lock to build a superset, it never vets rows against it
Sibling: src/kiro_crew/autonudge.py:817 -- changed here -- load_for_maintenance runs _load, which now uses the consistent read
Sibling: src/kiro_crew/cli_commands_app.py:428 -- changed here -- the CLI runs svc._load(), which now uses the consistent read
Pattern harvest
Rule candidate: review-prompt
Pattern: two files read as a pair while a writer renames one of them, without checking the first file is unchanged after reading the second
Checklist
Contribution License Agreement
Needs a person
Needs a person: the Builder's own review of this patch named steps that no change to the patch can do and that the issue or a repository rule requires (a run on a real machine, live data, CI's own artifacts, a person's sign-off), each with the sentence that requires it, which the Builder found there (
needs_person). None of them blocked the patch; each is a person's to do. What each reviewer named, in its own words:Draft PR by the Autobuilder (its agent's own words are quoted as code), run
build-45063-6a1329e6c1ee. The owner marks it ready for review.