Repository navigation
π Show current preparation backlog without fabricating a ready train - #15887
Conversation
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
[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
|
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Reviewed (correctness, delta 4980443β9d01259) β no blocking findings; one low-severity advisory.
Reopened PR in the recentlyClosed ring is projected as inactive even while present in the open snapshot (src/pkg/dashboard/stage_tracker_build.go:491-506, stage_tracker_preparation.go:81-84). The resolver is built with status=nil, so the "open" answer can only come from forgestate (stage_tracker_caption.go:235-247). When deps.GHClient/ForgeState() is nil, the resp.RecentlyClosed fallback wins and project returns inactive before the items loop at :88 ever sees the open row. recentlyClosed is only pruned by time (stage_tracker_recently_closed.go:60-71), and the hive does reopen PRs (hive#15135 flow, stage_tracker_caption.go:826), so a reopened ticket-holder would drop out of the displayed queue/active count until the ring ages out. Transient and low impact; a minimal fix is to let an open-snapshot row beat the closed-ledger answer:
if len(state) > 0 && state[0] != nil && stageTrackerLinkedPRFinished(state[0](d.repo, m.Number)) && !slices.ContainsFunc(items, func(it StageTrackerItem) bool {
return it.Kind == "pr" && strings.EqualFold(it.Repo, d.repo) && it.Number == m.Number
}) {
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
β¦mantics Signed-off-by: Andy Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Reviewed (intent-alignment) β diff matches the title/body; one small gap, advisory only.
Verified: cmd/hive/base_preparation_visibility.go:6 builds a fresh engine without Options.BasePreparation, which falls back to sharedBasePreparation (automerge_base_preparation.go:39-44, :25), the same durable store the sweep engine uses (main_sweeps.go:816-847 sets no override), so the dashboard reads the real tickets. ownerSnapshot (base_preparation_store.go:100-124) is read-only and never creates the dir.
Low / in-scope β chip stays visible for an empty observed queue. Body: chip is kept visible "for durable base-preparation owners and FIFO tickets". Diff: tracker-queue.js:107 chip.hidden = !trains.length && !_stageTrackerPreparationQueues.length, and stage_tracker_preparation.go:131-135 still appends a queue when Owner == nil && len(Waiting) == 0 ("No recorded preparation tickets"). Since the store file persists after the first ticket is ever written, every require-current-base repo with any open PR will show a permanent 0 train PRs Β· 0 owner Β· 0 waiting chip once its backlog drains β slightly wider than the stated intent (the prep unknown case is deliberately covered by the test at stage_tracker_preparation_test.go JS block, the observed-empty case is not). If the "unknown" chip is wanted but the empty one isn't:
const prepVisible = _stageTrackerPreparationQueues.some(q => q.state !== 'observed' || (q.owner && q.owner.state !== 'inactive') || (q.waiting || []).some(p => p.state !== 'inactive'));
chip.hidden = !trains.length && !prepVisible;
β hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Style review (head 9d01259) β no blockers; two maintainability notes.
- Redundant state resolver + dead loop β
src/pkg/dashboard/stage_tracker_build.go:491-506.preparationStateis built withstageTrackerPRStateResolver(nil, resp.Merged24h), and that resolver already scans itsmergedargument (stage_tracker_caption.go:243-247), so the explicitfor _, merged := range resp.Merged24hloop at 493-497 can never return anything the resolver call right below it would not. The same function also already holdsprState(line 272). Suggest a named helper so the three-source lookup is readable and not duplicated inline:
- preparationState := s.stageTrackerPRStateResolver(nil, resp.Merged24h)
- resp.BasePreparation = s.stageTrackerPreparation(resp.Items, now, func(repo string, number int) string {
- for _, merged := range resp.Merged24h {
- if merged.Number == number && strings.EqualFold(merged.Repo, repo) {
- return blockedOnPRStateMerged
- }
- }
- if state := preparationState(repo, number); state != "" {
- return state
- }
- for _, closed := range resp.RecentlyClosed {
- if closed.Number == number && strings.EqualFold(closed.Repo, repo) {
- return blockedOnPRStateClosed
- }
- }
- return ""
- })
+ resp.BasePreparation = s.stageTrackerPreparation(resp.Items, now, s.stageTrackerPreparationPRState(resp))with stageTrackerPreparationPRState in stage_tracker_preparation.go wrapping stageTrackerPRStateResolver(nil, resp.Merged24h) and the RecentlyClosed fallback.
- Variadic used as an optional parameter β
src/pkg/dashboard/stage_tracker_preparation.go:34:state ...func(string, int) stringexists only so tests can omit it (stage_tracker_preparation_test.go:36,53,β¦); the single production caller always passes one func, and the body doeslen(state) > 0 && state[0] != nil. Make it a plainstate func(string, int) stringand passnilin tests β same nil-check, no index gymnastics.
Minor: tracker-queue.js:74 guards typeof stageTrackerPreparationPopHtml === 'function' for a function defined in the same file at line 55; the typeof idiom in this SPA is for cross-file helpers (tracker-row.js:625), so this one can be a direct call.
β hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 23621c8. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Standalone preparation visibility: delivered in v5 source
Evidence:
The existing Activity Monitor now exposes recorded preparation owners, exact-ticket waiting PRs, and explicitly unverified evidence even with no ready train. Known terminal/held/draft/expired tickets are excluded from active waiting counts/display; admitted-head evidence is never transferred to a refreshed owner head. CI / Review stages, sorting/filtering/pagination, ready trains, and native queue semantics remain unchanged. Independent precommit review found observation-clock ETag churn; fixed with a copied hash projection and regressions. Real integration conflict with the landed tracker source split was resolved by preserving the split and moving the annotations to the new source files. Its one actual CI failure was a navigation-test loader pointing to the pre-split constant file; the real source path was corrected without deleting assertions, retrying failures, or weakening gates. No local tests/build/lint/docs guards were run. No manual deployment, production configuration change, native queue enablement, or runtime rollout was performed. Source merge and green PR image checks are not a claim that the live hive runs this revision; publication and runtime attribution remain separate. |
Summary
Independence
This standalone visibility fix does not depend on the priority/fairness implementation in #15886, integration rewrite #15885, or native queue PR #15853. It includes only the two additive shared snapshot-seam patches also consumed by those independent branches.
Review and validation
code-reviewagent reviewed the entire change against v5 before the implementation commit. Its substantive finding (observation clocks invalidating unchanged tracker ETags) is fixed with copied hash projection and regressions.make dashboard-gen;gofmt -lis clean.23621c899bf5bb43ac1bb581f0638f84bdb61f9c.9d012593578629f11999cf6b2752d3f773207461. Immediate premerge verification then found a real conflict with newly landed tracker source split π± refactor: split tracker row sourceΒ #15771. The explicit v5 merge preserves that split and moves the same preparation annotations to its new source files; full CI is required again on the integrated head above. Prior-head green is not the final integrated-head verdict.STAGE_TRACKER_ACTED_FILTERSfrom the pre-split source file (11 failures sharing the same missing-constant assertion). A one-line fixture path correction now loads the real constant fromtracker-row-acted.js; no assertions, gates, or production behavior were weakened. Full newest-head CI is required again.The owner explicitly authorized source merge after mandatory exact-head CI/build/lint is green. No deployment, runtime configuration, or native queue activation is authorized or performed by this PR.