Skip to content

🐛 fix(trackerrow): pin the STAGE_TRACKER_* contract and list tracker-human-attention - #16081

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-16067
Oct 31, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-16067

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #16067
Closes #16068

Both findings came from the review of #16066.

Why

What

  • trackerrow.RequiredGlobals exports the required constants so the hub can assert against it when it activates the asset.
  • TestRequiredGlobals keeps that list equal to what the embedded assets reference.
  • TestTrackerRowRequiredGlobalsDefinedBySpoke fails if the spoke page stops defining one.
  • Doc list now includes tracker-human-attention in manifest order.
  • Changelog fragment added.

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

…human-attention in the layout doc

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 31, 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 hanthor 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 31, 2026
@hivecommons-hive

hivecommons-hive Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

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

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Read the new Go against the tree at b6e3fe6. The ten RequiredGlobals literals (trackerrow.go:56–65) match the spoke declarations verbatim — agent-now.js:472–476 and tracker-words-core.js:67,71,74,76,105 — and they are exactly the set of STAGE_TRACKER_* names the two embedded assets reference, so TestRequiredGlobals is satisfied at this head. jsConstLine (disabled_agent_enable_test.go:205) anchors on "const NAME = " so a name that is a prefix of another cannot be mis-matched. The doc list change matches manifest.txt:77–79 order. Looks correct to me.

One cross-reference for whoever lands these: #16084 (hub /activity page) defines the same ten globals in static/activity.js with the same values and pins them with a regex-derived test; once this merges, that test can iterate trackerrow.RequiredGlobals instead, which is what this PR exports it for.

Evidence bundle `#16081464d512` sha256:7d6a697ecd6ea4d847bf9c65014ebed79391ef8ba1b9b53ead2caa6f4f5cda43 — download from the dashboard or `hivectl review evidence #16081`.

@github-actions

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.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Intent alignment (read at head e755c0b).

#16067 is fully addressed: src/docs/dashboard-source-layout.md:80 now lists tracker-human-attention between tracker-row-acted and tracker-row-layout, matching static-src/manifest.txt:77-79.

#16068 is only partially addressed. The issue's finding is that "nothing pins the hub's copies to the spoke's values". This PR exports a list of names (src/pkg/webassets/trackerrow/trackerrow.go:40-51), and the two new tests check names only: TestRequiredGlobals regex-matches identifiers in the assets (trackerrow_test.go:70-91), and TestTrackerRowRequiredGlobalsDefinedBySpoke calls jsConstLine (tracker_row_shared_asset_test.go:52-57), which only asserts const NAME = exists in index.html (disabled_agent_enable_test.go:205-216) and discards the returned line. A hub that defines STAGE_TRACKER_PATH = [0, 10, 20, 30, 40, 80] passes everything here yet lights different columns than the spoke's [0, 10, 20, 30, 50, 80] (agent-now.js:472).

The changelog fragment (changelog.d/fixed-trackerrow-drift-guard.md:1) claims "so the hub cannot silently light different columns than the spoke", which the diff does not deliver.

Requested change: carry the spoke's values in the contract, not just the names — e.g. make RequiredGlobals a map[string]string (or an ordered slice of {Name, JS}) holding the JS literal for each constant, and have TestTrackerRowRequiredGlobalsDefinedBySpoke compare jsConstLine(t, html, name) against "const " + name + " = " + value + ";" so a spoke edit fails until the Go table is updated. Then the hub can assert its own definitions against values, and the changelog claim becomes true.

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

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
…pt digits in the drift-guard regex

RequiredGlobals now carries each STAGE_TRACKER_* constant's spoke JS literal
(Global{Name, JS} with Decl()), and TestTrackerRowRequiredGlobalsDefinedBySpoke
compares the spoke's declaration against it, so a hub copy with a different
value fails the test as #16068 asked. TestRequiredGlobals matches
[A-Z0-9_]+ so a future constant with a digit is still forced into the list.

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>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 31, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks correct to me. I checked the new pins against the v5 tree rather than the diff.

  • src/pkg/webassets/trackerrow/trackerrow.go:56-67 — all ten RequiredGlobals values match the spoke's declarations verbatim: agent-now.js:472-476 (PATH, PR_COLUMN, MERGE_COLUMN, NEEDS_DECISION, ISSUE_NEEDS_DECISION) and tracker-words-core.js:67-105 (ISSUE_DECISION_COLUMN, TRIAGE_NEEDED, POSSIBLY_EXISTS, PRE_MERGE_SOAK, TERMINAL). The generated static/index.html carries each as const NAME = VALUE; with no trailing comment, so the exact-string compare in TestTrackerRowRequiredGlobalsDefinedBySpoke (tracker_row_shared_asset_test.go:53-59) passes today and will fail on a value change, which is the point.
  • trackerrow_test.go:71-102 — the \bSTAGE_TRACKER_[A-Z0-9_]+\b scan of the two embedded files yields exactly the ten names in the list (I ran the same grep over tracker-row-anchor.js / tracker-row-title.js), so the set-equality check is green at this head and any new free global forces a list entry.
  • jsConstLine (disabled_agent_enable_test.go:205) fatals when a name is absent, so a removed spoke constant is caught as well as a changed one.
  • src/docs/dashboard-source-layout.md:80 — tracker-human-attention placed between tracker-row-acted and tracker-row-layout, which is manifest.txt:77-79 order.

One non-blocking note for the hub side: nothing consumes RequiredGlobals yet (as the body says, that is #16063's job), so until the hub adds its own assertion the guard only protects the spoke half of the contract. Not a defect in this change.

"Sign-off survives the squash" shows CANCELLED on this head — looks like a runner cancellation rather than something in the diff; worth a re-run before merge.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks correct to me. What I checked against the tree at 464d512:

  • The ten names in trackerrow.RequiredGlobals (src/pkg/webassets/trackerrow/trackerrow.go:56-67) are exactly the set of STAGE_TRACKER_* identifiers the four embedded asset files reference — no extras, none missing — so TestRequiredGlobals will pass and will fire if either side drifts.
  • Each pinned JS literal is byte-for-byte the spoke's declaration in static-src/js (const STAGE_TRACKER_PATH = [0, 10, 20, 30, 50, 80]; etc.), so TestTrackerRowRequiredGlobalsDefinedBySpoke passes today. It leans on the existing jsConstLine/indexHTML helpers (disabled_agent_enable_test.go:205, clickable_avatars_test.go:12), which return the declaration up to end-of-line — fine for these single-line consts.
  • dashboard-source-layout.md now lists tracker-human-attention between tracker-row-acted and tracker-row-layout, matching manifest.txt:77-79.

One note for the hub side (#16063/#16084, not this PR): nothing in v5 asserts against RequiredGlobals yet; the value of this list is realised only when the hub's host page checks its own consts against it, so that follow-up should land with or soon after this.

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

@hivecommons-hive
hivecommons-hive Bot merged commit dc26e91 into v5 Oct 31, 2026
73 of 74 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-16067 branch October 31, 2026 18:32
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
Karibhou added a commit to Karibhou/hive that referenced this pull request Oct 31, 2026
…iredGlobals

Now that the branch carries hivecommons#16081, TestActivityPage_DefinesTrackerRowGlobalsWithSpokeValues
compares each STAGE_TRACKER_* declaration in static/activity.js with
trackerrow.RequiredGlobals[i].Decl(), instead of re-deriving the names
from the asset and re-parsing the spoke's static-src. The names stay
pinned to the asset by TestRequiredGlobals and the values to the spoke
by TestTrackerRowRequiredGlobalsDefinedBySpoke, so the hub now checks
against the same single list instead of a second copy of the contract.

Addresses the hive reviewer suggestion on hivecommons#16084.

Hive-Run: hivecommons#16063
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HRH6kjQb8shmrV2ZP2K8GD
Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
hivecommons-hive Bot added a commit that referenced this pull request Oct 31, 2026
…ng, hive chips and group-by-hive headers (#16084)

* ✨ feature(hub): add the Fleet activity page /activity

Add the read-only hub Fleet activity board at /activity, linked as
"📡 Fleet activity" next to "🔬 Evidence" on the dashboard's Fleet
quadrant card (#16063, part of #15965, RFC #15861 by @hanthor).

- GET /activity: data-free shell; no valid session redirects to /login,
  otherwise requireAuth (not admin-only). Served with its own CSP
  following webstatic/csp_script_src.go (scripts/styles from 'self'
  only, script-src-attr and style-src-attr 'none', script-src-elem
  recomputed from the served bytes) and the static no-cache + ETag
  headers.
- GET /activity/assets/{name}: the shared trackerrow asset (#16062),
  byte-identical, whitelisted to trackerrow.Files.
- static/activity.js polls GET /api/hub/activity every 15 s with
  If-None-Match and redraws only on a new ETag. Hive column with stable
  colour chips linking to /api/saas/hives/{id}/open; rows link to
  GitHub; titles set as text; no action menus. Group-by-hive headers
  carry counts and freshness (stale, "upgrade to report activity",
  missing). Truncation, dropped events and stale/missing hives are
  always listed above the board.
- The page defines the STAGE_TRACKER_* globals the shared asset reads;
  a test pins them to the spoke's values (#16067 / #16081).
- /activity is noindex; docs page and changelog fragment.

Hive-Run: #16063
Hive-Plan: #15965 decomposition, piece 2 of 3 (#16062 -> #16063 -> #16064)
Hive-Spec: RFC-15861#D
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HRH6kmq5bGTopPWeCopPvU
Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>

* 🌱 test(hub): assert the activity page globals against trackerrow.RequiredGlobals

Now that the branch carries #16081, TestActivityPage_DefinesTrackerRowGlobalsWithSpokeValues
compares each STAGE_TRACKER_* declaration in static/activity.js with
trackerrow.RequiredGlobals[i].Decl(), instead of re-deriving the names
from the asset and re-parsing the spoke's static-src. The names stay
pinned to the asset by TestRequiredGlobals and the values to the spoke
by TestTrackerRowRequiredGlobalsDefinedBySpoke, so the hub now checks
against the same single list instead of a second copy of the contract.

Addresses the hive reviewer suggestion on #16084.

Hive-Run: #16063
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HRH6kjQb8shmrV2ZP2K8GD
Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>

---------

Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

0 participants