Repository navigation
✨ feat(dashboard): feed published checkpoint diff regions to Code activity - #16513
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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
10c14e9
ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
There was a problem hiding this comment.
Intent alignment (#16476), reviewed at head 45ed859
The part‑2 code itself tracks the issue's acceptance criteria well: whole-region admission with fail-closed hunk validation (src/pkg/dashboard/checkpoint_source.go:94-171, :191+), unsafe additions or removals drop the region (:173-183), Pushed PR label / seq / latest / epoch / stage on the response (:282-291), no-store even on auth failure (src/pkg/dashboard/server.go:1981-1983), queued-observation epoch drop on policy change (src/pkg/dashboard/matrix_source.go:124-137, :184-186), and no workspace collector.
1. Stacked PR silently carries part 1 (#16492) and the dependency note was dropped — in scope, please fix the body.
Commits 1bf96ee…8692bfe here are exactly #16492's head (8692bfeaa8), still OPEN. The original #16499 body said "Depends on #16492 … Merge the reader first"; this superseding body says only Closes #16476 with no dependency marker. Because a Supersedes PR auto-merges once CI/review are clean, merging this as-is lands the whole reader without closing #16475 and leaves #16492 as a conflicting duplicate. Requested change: add Depends on #16492 — merge the reader first, then rebase (and keep it blocked until then), or if the intent is to land both here, add Closes #16475 and close #16492 as superseded.
2. Advisory — removal of the #16276 Matrix restart persistence lands ahead of part 3.
src/cmd/hive/main.go drops SetMatrixPersistPath, matrix_source.go deletes restore/persist, and SetMatrixPersistPath is now a no-op (matrix_source.go:479-482). This matches the issue boundary "memory-only … no persistent history" and is disclosed in the body/changelog, but it regresses the still-live Matrix kiosk (blank after restart) before #16477 retires it. Acceptable per the boundary; noting it so part 3 / operators are not surprised.
3. Low — Observe drops observations whenever a reader poll holds policyMu.
handleCheckpointRegions calls s.MatrixObserver(...) → setConfig on every format=regions request (src/pkg/dashboard/api_checkpoint.go:13, matrix_source.go:117-120), and Observe uses policyMu.TryLock() and counts a drop on contention (matrix_source.go:152-156). A sentinel observation arriving during that window is lost, and because the sentinel's evaluated-head map persists, that head is not re-observed until it moves. Narrow window, but it works against "eligible heads reach the reader"; a blocking Lock (or snapshotting the epoch without the mutex) would close it.
— hive: agent=adjudicator-3 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 Style/maintainability review (head
Minor: Review findings from Read the Go side against the tree at 3338fc2 (compared to current Stack status: #16492 (part 1) merged at 07:54Z today. Verified:
Open question (not a defect, fail-closed either way): Review findings from Decision needed: Routing to a maintainer rather than judging alone. Facts at head
Recommendation: merge #16492 (after its review asks), rebase this to the part-2 delta, and have an approver glance at the raw fixture file once; then the reader source can be reviewed on its own. Review findings from Correctness review (head Read the full diff plus One low-severity gap against #16476's "no persistent history":
Verdict: approve. Review findings from docs-currency (read at head Unreleased changelog fragment contradicts this PR's persistence removal — Otherwise the new operator text checks out against the code: limits in Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. hive/awaiting-ci: rebased onto v5 after #16492 merged (dropped the six commits that landed in #16492; 19 files remain). CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Evidence bundle `#165133338fc2` sha256:7b3fa395a9951c1092fdb123147fd7fbbf3e476799a090caf1c3413e6110d26b — download from the dashboard or `hivectl review evidence #16513`. |
There was a problem hiding this comment.
Intent-alignment delta re-review at a053567e (previous head 45ed859e).
Still present (in-scope): this PR still carries part 1 (#16492) wholesale. #16492 is still open, and this PR is based on v5, so its diff includes the whole reader kiosk view (static-src/js/reader.js, css/reader.css, html/faq.html, html/topbar.html, js/boot.js, js/refresh.js, js/sse-bootstrap.js, reader_ui_test.go, changelog.d/added-16475-code-activity-reader.md). #16476 says "Blocked by part 1" and the maintainer decision was to implement reader → source → cutover in order; landing this would merge part 1 under a part-2 title and changelog. The delta compounds it: commit 7f93822f5 (merged in via scanner/fix-16475) adds changelog.d/fixed-tracker-mobile-chevron-height.md, static-src/css/tracker.css, and webstatic/testdata/tracker-header-geometry.js — a tracker-strip CSS fix unrelated to the checkpoint source.
Requested change: land #16492 first, then rebase this branch onto v5 so the diff is only the published-checkpoint source (api_checkpoint.go, checkpoint_source.go, matrix_source.go, api_matrix.go, cmd/hive/matrix_ingest.go, docs, added-16476-published-checkpoints.md), and update the body — it still says the branch is "45ed859ed1fe … unchanged", which is no longer true after the 12 new commits.
Previous findings at the new head: time.Sleep ratchet (checkpoint_source_test.go, matrix_persist_test.go) — fixed via SSE frame wait / waitFor; test config data race — fixed (checkpoint_source_test.go:243-263); reader.js history-cap idiom — fixed (renamed to retained, reader.js:46). api_checkpoint.go setConfig, sentinel-alert routing, and matrix_source.go godoc/stub notes were not touched by the delta and stand as previously recorded.
— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88
10c14e9 to
f70f5dc
Compare
|
FOSSA license scan red at f70f5dc is infrastructure, not this diff: 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Reuse the authorized sentinel observer for complete add/remove regions with whole-region filtering, bounds, continuation and policy epochs. Keep code memory-only, clear stale policy data, and label buffered snapshots and explicit replay in the reader. Hive-Run: #16476 Hive-Plan: reader-source-cutover Hive-Spec: code-activity#published-checkpoints Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
CI on this branch was red on four fronts: - TestCheckpointAPIAuthColdAndEpoch raced: the observer goroutine reads s.deps.Config.Dashboard.Matrix while broadcasting the code-lines nudge, and the test rewrote that config as soon as the region was ingested. Register an SSE client and wait for the nudge frame instead, so the observer is quiescent before the policy edits. - TestSleepRatchet: both new polling loops used time.Sleep; the above removes one and the persist test now uses the existing waitFor helper. - TestDashboardHistoryPushSitesAreCapped: the reader's retained-region array matched the history-array guard. It is bounded by line/byte budget rather than capHistory, so name it `retained`. - mobile-shots tracker-header-geometry: inherited from the prerequisite branch; merged scanner/fix-16475 which carries the compact mobile chevron fix (7f93822). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Observe used policyMu.TryLock, so two sentinel observers running at once (the sweep and webhook paths each run observers in their own goroutine) made the loser count as dropped and never re-observed. policyMu is now an RWMutex: observers take TryRLock and only back off while setConfig holds the exclusive lock, keeping Observe non-blocking. Hive-Fix-Attempt: 2/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
…s unchanged handleCheckpointRegions refreshes the Matrix policy on every reader GET, and setConfig took policyMu exclusively even when nothing changed. An observer arriving during that window failed TryRLock and was dropped, and because the checkpoint head map is keyed by head SHA the dropped head was never re-observed. setConfig now compares the incoming policy with the one in force and returns before locking when they match. The stale-epoch skip in run() now documents why the legacy projection also drops the observation: setConfig reset that backlog for the same policy change. Hive-Fix-Attempt: 3/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
…int labels Address review findings on #16513: - changelog.d/fixed-matrix-ingest-freshness.md no longer promises /data/matrix-lines.json persistence, which this PR removes. - Re-attach the matrixSource doc paragraph to matrixSource. - Delete the no-op SetMatrixPersistPath stub and matrix_persist_test.go; the legacy-history-never-restored assertion moves into TestCheckpointMemoryOnly. - Name the "Pushed PR" / "pushed-checkpoint" response contract as constants shared by ingest and since(). Hive-Fix-Attempt: 4/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
f70f5dc to
3338fc2
Compare
|
FOSSA failure on f70f5dc was infrastructure: 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Read the part-2 core at 3338fc2 from the tree, not just the diff. What I verified looks correct to me; nothing blocking in the code.
Access gate. api_checkpoint.go:9 claims the regions endpoint sits behind the Matrix read gate. Confirmed: api_matrix.go:93-103 checks RoleAtLeast(X-Hive-Role, RoleRead) before dispatching format=regions to handleCheckpointRegions, and matrixActiveSource() (api_matrix.go:60-78) still returns nil → 404 when the flag is off. The per-request s.MatrixObserver(...) call is idempotent (matrix_source.go:464-486: setConfig/setNotify on an existing source, no restart).
Fail-closed parsing. checkpoint_source.go:196-274 validates hunk counts (oldLeft/newLeft must reach exactly 0; a new @@ with a non-zero remainder, an empty row, an unknown prefix or negative count all return nil), so a truncated patch never yields a partial region — this is the "never turn a region into an apparently complete fragment" criterion in #16476.
Bounds. Region size (checkpointMaxRegionBytes), per-head/per-window line caps, backlog eviction by whole region (:159-167), head dedup keyed on repo+PR+head SHA with TTL and oldest-eviction (:109-128), and whole-region drop on any unsafe line including removals (:146-152) all match the issue's acceptance list.
Persistence removal is per spec. The diff deletes SetMatrixPersistPath / matrix_persist_test.go from #16276. That reads like a regression at first, but #16476 explicitly requires "memory-only bounded buffers; no … persistent history", and changelog.d/added-16476-published-checkpoints.md says so — the sentinel head map (/data/sentinel-heads.json) is kept, only the code buffer stops persisting.
Housekeeping, not a defect: #16492 (part 1) merged at 75fa300 on 2026-11-04T07:54Z, so the stacking precondition in the body is now satisfied. This branch still carries part 1 in its diff and has two CANCELLED checks (Sign-off survives the squash, native-queue-policy); a rebase onto current v5 should collapse the diff to the part-2 delta and rerun them. I did not read reader.js / index.html line by line.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
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>
* 🐛 fix: avoid empty reader catch-up pulls for filtered lines 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: #16530 Hive-Plan: issue-16530 Hive-Spec: #16530 Signed-off-by: thatguywob <thatguywob@users.noreply.github.com> * 🌱 chore: scope the changelog fragment to the server-side more flag The reader moved to format=regions on v5 (#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> * 📖 docs: document the matrix lines more flag and reframe the fragment No in-tree client reads `more` yet, so describe it where paging guidance lives (the /api/matrix/lines API-reference row) and record the change as an API addition rather than a client fix. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: thatguywob <thatguywob@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: thatguywob <thatguywob@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Supersedes #16499 (adopted after CI went red and the contributor was unavailable; original commits by @thatguywob preserved).
Closes #16476
Stacked on #16492 (part 1/3, still open). This branch is #16499's head
45ed859ed1feplus fix-agent follow-ups (a053567e2, test settling) merged with the currentscanner/fix-16475head. Because the base isv5, the diff currently shows all of part 1 (reader kiosk view) and part 1's tracker chevron CSS fix (7f93822f5) in addition to the part-2 work. The part-2-only delta is7f93822f5...a053567e2(checkpoint source, matrix ingest, api docs, reader wiring).Merge order: #16492 → this PR → cutover (part 3). Do not merge this before #16492; once part 1 lands on
v5, this diff collapses to the checkpoint-source changes only.Last lane reason on the original:
hive-signoff-attribution.Hive fix agent: rebase this branch on
v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and theirSigned-off-by; add your own sign-off on your commits. Do not open another PR.