Skip to content

✨ feat(dashboard): feed published checkpoint diff regions to Code activity - #16499

Closed
thatguywob wants to merge 7 commits into
hivecommons:v5from
thatguywob:feat/16476-published-checkpoints
Closed

thatguywob wants to merge 7 commits into
hivecommons:v5from
thatguywob:feat/16476-published-checkpoints

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

Closes #16476

Feeds the Code activity reader complete published PR diff regions through the existing authorized sentinel patch observer. Additions and removals retain indentation, blank lines and repeats; unsafe text on either side drops the whole region. No new poller, workspace capture, permission expansion or automatic enablement.

Depends on #16492 (part 1). This branch starts from upstream/v5 and includes that reader prerequisite so the source integration is reviewable end to end. Merge the reader first; part 3 (#16477) still owns navigation cutover and Matrix retirement.

  • Adds whole-region admission, deduplication, pagination and eviction under line, text, head and rate bounds. The existing content endpoint selects the region contract with format=regions, including continuation seq, latest, policy epoch, source stage, actual PR links and ingest freshness.
  • Clears admitted and queued code on policy changes, rejects stale queued observations, keeps responses no-store even on auth failures, and retains only sequence hints on SSE. Deletion-only checkpoints also nudge the reader.
  • Labels opening backlog as a buffered snapshot, provides explicit labelled replay with automatic replay off, bounds browser history and visible cards, and clears browser code on policy changes, failed/disabled/unauthorized pulls and hidden tabs.
  • Removes legacy Matrix code-history persistence to meet the memory-only boundary. Existing history files are left untouched for operator retention decisions; the separate sentinel evaluated-head map still persists.

Validation: gofmt -l on changed Go files produced no output; git diff --check passed. Added regression coverage for region data and boundaries, secrets on additions/removals, incomplete diffs, continuation, rate and eviction limits, policy transitions and stale queues, cold source/auth behavior, memory-only history, reader paging, replay and browser bounds. Tests were not run locally because AGENTS.md reserves execution for CI.

— hive: backend=codex model=gpt-6.1-sol effort=medium


🐝 Hive Agent: contributor | SHA: 0bc67d5bf

hivecommons-hive Bot and others added 6 commits November 3, 2026 19:30
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Keeps the operator index.html style ratchet at its baseline: the reader's
raw font-size, padding and border-radius values become var() tokens.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Hive-Run: hivecommons#16476
Hive-Plan: reader-source-cutover
Hive-Spec: code-activity#published-checkpoints
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
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: hivecommons#16476
Hive-Plan: reader-source-cutover
Hive-Spec: code-activity#published-checkpoints
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 4, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 4, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • relative links and anchors resolve
    Review asks:
  • 2 commits are signed off as the hive App instead of you, so a squash merge would misattribute them — set git config user.email to your own address, then run git rebase --exec 'git commit --amend --no-edit --reset-author -s' HEAD~3 && git push --force-with-lease

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 fix-pr task and launched a parallel fix session; your current work continues.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor
45ed859

⚠️ Sentinel alert — maintainer review required

Hive flagged this PR (author @thatguywob, head 45ed859ed1fe) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • remote_code_execution — adds a remote-fetch-and-execute, decoded payload, reverse shell or embedded credential (Adds curl|sh, eval of encoded payloads, reverse shells or embedded private keys)
    • src/pkg/dashboard/checkpoint_source_test.go

Hive added the sentinel-alert label. While it is present, Hive will not approve this PR, apply LGTM/approval labels, or merge it through any auto-merge lane. Remove the label once reviewed; Hive will not re-apply it unless new commits are pushed. Tune paths and behaviors under sentinel in hive.yaml or the dashboard Security tab.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16500 ✨ feat(dashboard): replace Matrix presentation with Code activity same files changelog.d/added-16475-code-activity-reader.md
changelog.d/added-16476-published-checkpoints.md
src/cmd/hive/main.go
src/cmd/hive/matrix_ingest.go
src/docs/api-reference/auth.md
src/docs/api-reference/dashboard-misc.md
src/docs/api-reference/health-status-events.md
src/docs/api-reference/snapshots-and-style.md
src/docs/dashboard.md
src/docs/streaming-the-activity-monitor.md
src/pkg/dashboard/api_checkpoint.go
src/pkg/dashboard/api_matrix.go
src/pkg/dashboard/checkpoint_source.go
src/pkg/dashboard/checkpoint_source_test.go
src/pkg/dashboard/matrix_persist_test.go
src/pkg/dashboard/matrix_source.go
src/pkg/dashboard/reader_ui_test.go
src/pkg/dashboard/server.go
src/pkg/dashboard/static-src/css/reader.css
src/pkg/dashboard/static-src/html/faq.html
src/pkg/dashboard/static-src/html/topbar.html
src/pkg/dashboard/static-src/js/boot.js
src/pkg/dashboard/static-src/js/reader.js
src/pkg/dashboard/static-src/js/refresh.js
src/pkg/dashboard/static-src/js/sse-bootstrap.js
src/pkg/dashboard/static-src/manifest.txt
src/pkg/dashboard/static/index.html
#16492 ✨ feat(dashboard): changed-paragraph reader kiosk view (part 1/3) same files changelog.d/added-16475-code-activity-reader.md
src/docs/dashboard.md
src/docs/streaming-the-activity-monitor.md
src/pkg/dashboard/reader_ui_test.go
src/pkg/dashboard/static-src/css/reader.css
src/pkg/dashboard/static-src/html/faq.html
src/pkg/dashboard/static-src/html/topbar.html
src/pkg/dashboard/static-src/js/boot.js
src/pkg/dashboard/static-src/js/reader.js
src/pkg/dashboard/static-src/js/refresh.js
src/pkg/dashboard/static-src/js/sse-bootstrap.js
src/pkg/dashboard/static-src/manifest.txt
src/pkg/dashboard/static/index.html

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • Sign-off survives the squash
    Review asks:
  • 2 commits are signed off as the hive App instead of you, so a squash merge would misattribute them — set git config user.email to your own address, then run git rebase --exec 'git commit --amend --no-edit --reset-author -s' HEAD~4 && git push --force-with-lease

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 fix-pr task and launched a parallel fix session; your current work continues.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision needed: @hanthor should decide whether to clear the sentinel-alert label on #16499 (the flagged file is a scrubber negative-fixture list, not executable content) and whether this PR should wait for #16492 to merge and then rebase to the part-2 delta only.

Routing to a maintainer rather than judging this alone: the PR carries sentinel-alert, and it also currently fails CI for reasons that are its own.

Sentinel hit — what the flagged file actually contains. src/pkg/dashboard/checkpoint_source_test.go (new) holds a bad := []string{…} list of negative fixtures for the region scrubber: a bare -----BEGIN PRIVATE KEY----- header with no key body, a password: …/token = … placeholder, a control byte, an invalid UTF-8 byte and an over-long line. Nothing is fetched, decoded or executed. Some header literals later in the same file reached me masked by a scrubber, so I could not read them; a human should glance at the raw file. Decision is @hanthor's (approver) — I have not touched the label.

Not a duplicate of #16492. 16499 contains 16492 byte-for-byte in 9 of its 13 files (same changelog.d/added-16475-code-activity-reader.md, reader.css, boot.js, refresh.js, sse-bootstrap.js, manifest.txt, faq.html, topbar.html, streaming-the-activity-monitor.md) and extends reader.js, reader_ui_test.go, dashboard.md and index.html. The body says so ("Depends on #16492… includes that reader prerequisite"). So they conflict in the merge-queue sense: landing this one makes #16492 a no-op, landing #16492 first forces a rebase here. Sequencing is a maintainer call; the body itself asks for 16492 first.

CI failures caused by this diff (head 45ed859, job test (dashboard 4/4) and test (rest 2/4)):

  1. TestCheckpointAPIAuthColdAndEpoch — the PR's own new test panics (checkpoint_source_test.go:226 via :237, outer frame :260). It fails on first run, so it was never green.
  2. TestDashboardHistoryPushSitesAreCapped — index.html:7520 (reader.js group()): history.push(item); pending.push(item); is followed by a lines/bytes eviction loop rather than capHistory(history) or .slice(-N), which is what the repository ratchet requires textually. Semantically bounded, but the guard will stay red until the push site uses the sanctioned form.
  3. TestSleepRatchet — two new time.Sleep(time.Millisecond) calls in test code (diff lines 864, 1062) push the count to 197 over the 195 baseline; the repo convention is to wait on channels/timeouts in tests.

Body claim worth a maintainer's eye: "bounds browser history" is implemented by the eviction loop above, which is fine, but "Tests were not run locally" plus a failing self-authored test suggests the Go side was not exercised. I have not reviewed the source-integration logic in checkpoint_source.go / api_checkpoint.go in depth; with the test red there is no point until it passes.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Superseded by hive: re-authored as #16513 with the same commits and sign-off because the author's clanker is offline. This PR is closed; if #16513 fails, hive reopens it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. hive/superseded Closed by Hive: a different merged PR already landed this change sentinel-alert size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] Code activity: published-checkpoint diff source (part 2/3 of #16137)

1 participant