Repository navigation
π fix: avoid empty reader catch-up pulls for filtered lines - #16569
thatguywob wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Read the full diff against the v5 tree (matrix_source.go, api_matrix.go, both callers of SinceMatching, reader.js pull loop). The fix looks correct to me.
Server: SinceMatching (src/pkg/dashboard/matrix_source.go:423-441) now keeps scanning past a full page and reports true only when another kept line exists, so more is false when every newer ring entry is filtered out β exactly the case from #16530. The ring is capped at 2000 (matrix_source.go:25) and scanned under m.mu, so the extra tail scan is negligible. Since() is the only other caller and discards the flag; api_matrix.go:130 is the only consumer.
Client: reader.js:197 prefers data.more when it is a boolean and keeps the old returned < seq heuristic otherwise, so an older server still pages correctly; lastSeq = more ? returned : seq then jumps to the global high-water mark when nothing visible remains. The endpoint test table and the three new browser scenarios (trailing, page+trailing, legacy) cover the cases that matter. Generated static/index.html matches static-src/js/reader.js (one data.more occurrence each).
Sequencing note for maintainers (not a defect): #16513 (part 2/3 of the reader work) deletes this exact var more = β¦ line and moves the reader to /api/matrix/lines?β¦&format=regions (served by handleCheckpointRegions), so the reader.js half of this PR is superseded once #16513 lands, and the two branches conflict in reader.js/matrix_source.go today (merge-tree shows markers). The server-side more flag stays useful for any other /api/matrix/lines caller. Suggest landing this first (small, green, fixes a shipped behaviour) and letting #16513 rebase.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Read
Cost note (not a defect): the scan no longer exits early once the page is full; it walks the remaining ring until it finds one more kept line. For a ring of fixed size that is bounded and tiny next to the HTTP round-trip it removes. stage 095-pre-merge-soak β 060-reviewed: untrusted-author-role Review findings from Server half looks correct; the client half edits code that #16513 (merged to v5 yesterday) removed, so this needs a rebase and a decision about what remains of #16530. What I verified on
Why it cannot merge as-is ( The regions path does not have the #16530 gap: Suggested next step for hive/awaiting-ci: rebased onto π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Open PR overlap checkBase branch:
Conflicts are checked with every PR merged onto the current tip of
|
|
Ready for a human merge: verdict approved @edf038b, 67/67 checks green, DCO yes, soak 10m0s elapsed. Blocked only by The hive never approves on your behalf: |
There was a problem hiding this comment.
Read the change against the tree at 80ebdfb, not just the diff. Looks correct to me.
What I verified
SinceMatching(src/pkg/dashboard/matrix_source.go:423-441) has exactly one non-test caller,api_matrix.go:130;Sincekeeps its old two-value signature, so the existingSincetests andmatrix_persist_test.go:134are unaffected. The loop now walks the whole ring (β€matrixBacklogCap= 2000) only until it finds thelimit+1-th kept line, somoreis true iff another visible line remains β which is exactly what the client needs.reader.js:195-201:lastSeq = more ? returned : seqis sound with the new flag. Whenmoreis false and the newest ring lines are filtered,lastSeqjumps to the globalseq, so the next nudge pullssince=<global>and no empty catch-up request is issued.more === trueimplieslen(out) == limit > 0, soreturnedis never 0 on the paging path. Legacy fallback (typeof data.more !== 'boolean') preserves the oldreturned < seqheuristic.static/index.html:7683-7688matchesstatic-src/js/reader.js(regenerated asset).go build ./pkg/dashboard/andgofmt -lclean on the PR head; dashboard test shards 1/2/4 are already green in CI. (go testis blocked on agent pods β #9845.)- Intent: #16530 proposed "the server return β¦ a
moreflag so the client need not guess"; this is that change, no extra scope.Fixes #16530is the right link.
One suggestion (docs, low)
src/docs/api-reference/dashboard-misc.md:59 still says a paging client "should use the last returned line's seq as its next since, not the top-level seq". With this PR the documented contract becomes: continue from the last returned seq while more is true, otherwise resume from the top-level seq. Worth a one-line update in this PR so the API reference doesn't describe the pre-more behaviour.
Note for the maintainer: the conflicts-with-open-pr label is a sequencing question against the other open reader/dashboard PRs, not something wrong in this diff.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@thatguywob this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Your relay session received this as a |
|
@thatguywob the hive has adopted this PR ( |
Report whether another allowed line remains in a matrix page and use that signal to finish reader catch-up without an empty follow-up request. Keep the global sequence and legacy-server fallback. Hive-Run: hivecommons#16530 Hive-Plan: issue-16530 Hive-Spec: hivecommons#16530 Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
The reader moved to format=regions on v5 (hivecommons#16513), so the client half of this fix is superseded; the API change still lands for /api/matrix/lines. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
80ebdfb to
eca144d
Compare
Summary
moreflag from/api/matrix/lines, computed by looking for another allowed line after the page limit. Preserve the globalseqvalue.more.Fixes #16530
Testing
AGENTS.mdrequires CI validation for agent-authored changes.gofmt -lon changed Go files: clean.GOCACHE=/tmp/hive-16530-go-cache make dashboard-gen: succeeded.β hive: backend=codex model=gpt-6.1-sol effort=high
π Hive Agent:
contributor| SHA:edf038b2d