fix(reads): align index inspection to Raft horizon (EN-1946) - #1891
fix(reads): align index inspection to Raft horizon (EN-1946)#1891gfyrag wants to merge 1 commit into
Conversation
✅ Approve — automated reviewThe alignment, pinned version resolution, lifecycle handling, and horizon trimming are consistent. The previously reported removed-index classification issue is fixed. No findings. |
NumaryBot
left a comment
There was a problem hiding this comment.
NumaryBot posted 1 new inline finding.
Summary: #1891 (comment)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## fix/en-1946-prepared-query-snapshot #1891 +/- ##
=======================================================================
+ Coverage 77.38% 77.40% +0.02%
=======================================================================
Files 458 458
Lines 48631 48643 +12
=======================================================================
+ Hits 37632 37654 +22
+ Misses 7839 7825 -14
- Partials 3160 3164 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8577869 to
f25be30
Compare
94e9664 to
08c7d37
Compare
84ffd2a to
90e5766
Compare
1316d94 to
e7f8c2c
Compare
90e5766 to
41d3953
Compare
|
This PR aligns Standards1. [P1][blocking] Removed index misclassified as The new gate is: version, primed, err := readstore.PinnedVersionResolver(snap, ledgerInfo.GetName(), mainSeq)(indexes.Canonical(indexID))
...
if !primed || version.Version == 0 {
return nil, &domain.BusinessError{Err: &domain.ErrIndexBuilding{...}}
}
2. [P2] New regression test guards only the leaf trimming function, not the changed production path —
3. [P3] Stale code comments contradict the new behavior — Per SpecSpec basis: no linked issue or spec file is available (PR body references external tracker EN-1946); the reviewable contract is the PR's own stated behavior ("Aligns InspectIndex with a fixed Raft/main-store horizon, pinned index version, and native-sequence trimming") together with the read-path contract the PR's updated docs now reference. 1. [P1][blocking] Removed-after-pin requests return Same code as Standards finding 1, judged against the spec: the PR's stated purpose is to align 2. [P2] Missing regression coverage for the alignment behavior the PR claims — The spec promises barrier alignment, pinned version resolution, and horizon trimming at the Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
|
This PR aligns Recommendation: request changes (one P2 contract violation; everything else is minor). Standards[P3][non-blocking] The new regression test does not guard the changed production path
Resolution: add controller-level coverage that fails when the barrier, pin-aware version resolution, lease handoff, or [P3][non-blocking] Read-path subsystem README not updated
Resolution: mention index inspection's fixed-horizon alignment in the read-path README overview. The following candidate findings were rejected after verification: the "stale version-state comment" in SpecNo issue/spec reference accompanies this change (single commit [P2][blocking] Index removal after the pinned horizon is misreported as an in-progress build
This directly violates Resolution: split the gate — Otherwise no missing requirements or scope creep: the pin-aware version resolution, membership trimming across all three inspect modes, lease-protected event history, and the documentation updates match the alignment contract the PR implements. Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
e7f8c2c to
1bc6e9d
Compare
41d3953 to
517beb7
Compare
|
This PR aligns Standards[P1] Removed indexes are classified as
|
|
This PR aligns Standards[P2][blocking] Preserve the removed-index classification at the pinned horizon [P2][blocking] Test the changed production path, not only its leaf [P3][non-blocking] Update the owning subsystem README [P3][non-blocking] Make the stale behavior comments horizon-aware SpecSpec (PR body): "Stack 4/7 for EN-1946. Aligns InspectIndex with a fixed Raft/main-store horizon, pinned index version, and native-sequence trimming." All three named mechanisms are implemented: the fixed horizon and certificate wait ( [P2][blocking] Removed-index classification breaks the alignment claim [P2][blocking] The composed alignment path lacks regression coverage No other missing requirements or scope creep confirmed. Independently inspected risk areas beyond both reports — event-key horizon byte offsets, group-reset semantics, Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
1bc6e9d to
e6ee8af
Compare
517beb7 to
669999d
Compare
NumaryBot
left a comment
There was a problem hiding this comment.
NumaryBot review complete: no remaining inline findings.
Resolved 1 stale NumaryBot review thread (0 fixed, 1 outdated).
Summary: #1891 (comment)
NumaryBot
left a comment
There was a problem hiding this comment.
NumaryBot review complete: no remaining inline findings.
Resolved 1 stale NumaryBot review thread (0 fixed, 1 outdated).
Summary: #1891 (comment)
|
This PR aligns Standards[P1] The new regression test guards only the storage leaf; the production alignment path is unguarded — [P2] Subsystem docs updated, but the read-path README and [P3] Stale code comments contradict the new pin/horizon semantics — Spec[P1] A post-horizon index lifecycle mutation still leaks into the fixed-horizon inspection — Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
Final review — PR #1891 (fix(reads): align index inspection to Raft horizon, EN-1946)This PR extends the existing read-alignment machinery ( Standards
Candidate findings not retained (verified and rejected)
SpecNo confirmed material finding. The implementation matches the PR's stated scope — "Aligns InspectIndex with a fixed Raft/main-store horizon, pinned index version, and native-sequence trimming" — and nothing in the diff exceeds it. Verified specifically: the barrier is bound only for locally served reads via the existing Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
e6ee8af to
9e5d40f
Compare
669999d to
09fe8d2
Compare
|
This PR aligns Standards[P2] New regression test guards only the leaf scan, not the changed production path —
[P2] Stale documentation and code comments contradict the changed behavior —
Impact: authoritative guidance materially misstates the new consistency contract for future contributors and agents. Resolution: update all five locations to describe fixed-main-horizon alignment, pin-resolved versions, and latest-at-or-below-horizon membership (including the zero-horizon exception). SpecNo spec is available for this PR (it references external tracker EN-1946; there is no linked GitHub issue or in-repo spec), so this axis has no confirmed material finding. The end-to-end regression-coverage concern raised against the PR's stated goal is substantive and is captured above under Standards. Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
f23aac1 to
ea23f68
Compare
c4c06b4 to
a0583a2
Compare
Final review — PR #1891 (InspectIndex horizon alignment)This PR makes Standards1. [Must fix] No regression test guards the changed production wiring
2. [Must fix]
|
Review of PR #1891 (a0583a2 — fix(reads): align index inspection to raft horizon)The implementation itself is correct at the review target: routed barrier propagation ( Standards
SpecSpec basis: "Aligns InspectIndex with a fixed Raft/main-store horizon, pinned index version, and native-sequence trimming" (EN-1946), cross-checked against the repo's own contracts (
(One candidate finding was investigated and rejected: the Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
a0583a2 to
a4dbdae
Compare
ea23f68 to
fede0fd
Compare
|
This PR makes Recommendation: request changes — the implementation is correct, but the composed production path is untested and the documentation contract (AGENTS.md "Documentation maintenance") is only partially met. Standards
SpecNo usable spec is available for this PR: the commit ( Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
|
This PR aligns Standards1. [P2][blocking] The new regression test guards only the leaf; the changed production wiring is unguarded — 2. [P3] Owning-subsystem docs not updated for the new InspectIndex contract — 3. [P3] Stale code comments describe the pre-change behavior — SpecNo spec is available for this change (single commit, Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
fede0fd to
e0927aa
Compare
a4dbdae to
b5b13ff
Compare
Review summary — PR #1891The change correctly implements what the PR body promises: What falls short is validation and documentation synchronization: the PR's core cross-store guarantee is regression-guarded only at the leaf store function, and several authoritative comments/docs still describe the pre-change behavior. Recommendation: request changes — the code is sound, but per the repo's own standards ( StandardsP1 — Regression test guards the leaf, not the changed production path
P2 — Stale readiness-gate comment misattributes the pinned resolution to live
|
e0927aa to
b9b23ec
Compare
b5b13ff to
c5ae816
Compare
b9b23ec to
25900e7
Compare
c5ae816 to
cfdab0a
Compare
Final review — PR #1891 (Align
|
25900e7 to
616b31c
Compare
cfdab0a to
3144511
Compare
616b31c to
f11d23d
Compare
3144511 to
14ad389
Compare
Final review — PR #1891 (
|
f11d23d to
756bc59
Compare
14ad389 to
43352e0
Compare
756bc59 to
a92a950
Compare
43352e0 to
56a6038
Compare
Review summaryThis PR aligns Recommendation: request changes — the implementation looks correct, but the production-path regression coverage gap and the incomplete documentation/traceability updates should land in this PR. Standards1. [Major] Regression test guards the leaf, not the changed production path
Per Impact: the endpoint could regress to reporting projection-head membership or a version activated after the served snapshot while focused validation passes. Resolution: add controller/routed coverage that drives 2. [Moderate] Traceability chain incomplete in the changed authoritative docs
Impact: reviewers cannot establish the intended observable contract for the new blocking/wait semantics or judge whether the added latency on Resolution: add the missing need → limitation → requirement → decision → validation chain to the owning subsystem documents and summarize/link it in the PR description, including validation that observes the requirement. 3. [Minor] Code comments not updated for the new pin/horizon semantics
4. [Minor] Subsystem documentation not fully aligned with the change
SpecNo spec is available for this PR. I verified the diff against the PR's own stated scope ("aligns InspectIndex with a fixed Raft/main-store horizon, pinned index version, and native-sequence trimming") and found no scope creep and no unrelated externally observable behavior: the four code changes (routed barrier propagation, controller reservation/alignment/pin wiring, horizon-aware scanning, and the leaf regression test) and the documentation changes all serve that single goal. No confirmed material findings on this axis. Reviewed independently by GLM (glm-5.3-flash) and Codex (gpt-5.6-sol) via Shipfox; verified and synthesized by GLM. |
a92a950 to
ee81a54
Compare
56a6038 to
6cef75d
Compare
Review summary — PR #1891 (fix(reads): align index inspection to raft horizon)This PR makes Recommendation: request changes (one blocking coverage gap per the repo's own severity rules; the code itself is verified correct). Standards1. [P2][blocking] Added regression test guards the leaf, not the changed production pathLocation: Standard: Evidence: the only added test builds Impact: default inspection could again serve an index projection that is stale or ahead of its fixed main-store state, or lose pin-aware version gating and event-history protection, while all unit tests and existing e2e specs pass. Resolution: add a controller/routing-level regression test that drives 2. [P3] Stale readiness-gate comment in
|
Stack 4/7 for EN-1946. Aligns InspectIndex with a fixed Raft/main-store horizon, pinned index version, and native-sequence trimming.