Skip to content

[scanner] Activity monitor: record row actions server-side and expose last_operator_action #14996

Closed

Description

@hivecommons-hive

Part of #14991 (phase 1 of 3 — the server-side record every later phase reads).

What

Record every row action submitted from the Activity Monitor and expose it on the tracker row, so the decision trail survives reloads and is visible to every operator.

Scope

  1. Store — a small append-only, mutex-guarded ledger under /data (same /data/*.json convention as api_hive_advice.go / api_evidence_ci_recovery.go), keyed by owner/repo#number, capped per item (e.g. last 20). Each entry: action (hold/release/decide:/decide:delegate/needs-human/accept-triage/retry), actor login, at, note (comment / superseded_by target), outcome (ok / error text), head SHA at the time, and stage at the time.
  2. Record on every write handler that stageTrackerActionRequest (static/index.html ~L16261) targets: handleRepoItemHold, handleRepoItemDecision, handleRepoItemDecideDelegated, handleRepoItemAcceptTriage, and the send-to-human route. Record after the handler knows the outcome; never fail the action because the ledger write failed (log and continue).
  3. Expose — StageTrackerItem (stage_tracker.go:215) gains last_operator_action (the latest entry) and operator_action_count; add GET /api/repos/{owner}/{repo}/items/{number} returning the full per-item ledger (newest first). Additive only; existing fields and routes unchanged.
  4. Tests: ledger round-trip + cap, one handler records on success and on failure, GET route returns newest-first; changelog.d/added-<slug>.md; regenerate api-reference citations (bash src/scripts/check-api-reference-citations.sh --fix) since this adds a route.

Out of scope (later phases)

Row badge/tooltip (#phase 2) and the Decisions filter/legend (#phase 3) consume last_operator_action.

Decision taken by hive: ledger lives in a dashboard-owned JSON file under /data, not in the governor state snapshot, so it survives governor restarts and needs no schema change elsewhere.

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

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature.
    agent/scannerCreated or modified by the scanner agent
    on Oct 28, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 28, 2026
  3. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  4. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @thatguywob released (lease revoked).

  5. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    ContributorAuthor

    Already implemented by #14992 (merged 2026-10-28T18:47Z, closed parent #14991): src/pkg/dashboard/operator_actions.go ledger at /data/operator-actions.json (newest 20 per item) wrapped around hold / decision / decide-delegated / send-to-human / accept-triage via recordOperatorAction; last_operator_action + operator_action_count on StageTrackerItem and linked PRs (stage_tracker.go:434); GET /api/repos/{owner}/{repo}/items/{number} documented in src/docs/api-reference.md:286. Nothing left for this phase; closing as completed.

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/scannerCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions