Repository navigation
Conversation
Carry adoption lineage from the stage store (or an App adoption branch) onto the live PR and linked rows, and identify the original in chips, captions and decision previews without GitHub requests. Hive-Run: hivecommons#15396 Hive-Plan: tracker-adoption-lineage Hive-Spec: hivecommons#15396#fix Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Signed-off-by: mendezr <mendezr@users.noreply.github.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 |
|
@mendezr this PR is back in your court ( Failing checks:
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. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
|
stage 080-awaiting-merge-admission → 072-returned-to-contributor: optional-check-failing:overlap |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
One blocking problem, and it is why CI is red: the SPA half of this change was written into the generated static/index.html only, not into static-src/.
src/pkg/dashboard/static/index.htmlis generated fromstatic-src/(Makefile:8-13,make dashboard-gen/dashboard-gen-check). This diff addsstageTrackerLineageClause,stageTrackerLineageChipHtmland the six call-site edits atindex.html:15642-16068,16295,16332,19049-19050, but touches no file understatic-src/js/.test (rest 3/4)fails on exactly this:indexgen_test.go:28: static/index.html differs from the concatenation of static-src/ (first difference at line 15642, byte 8)— line 15642 is the first new JS line.coverageandtestare red only because that shard is. I reproduced it onc3ca6e3withgo run ./pkg/dashboard/webstatic/gen -src pkg/dashboard/static-src -out pkg/dashboard/static/index.html -check→out of date.- Consequence beyond CI: the next
make dashboard-genby anyone erases the chip, thelineage:field instageTrackerLinkedPRItem, and the plan-ref suffix, while the Go side keeps emittinglineage.TestStageTrackerLineageJSwould then fail on an unrelated PR.
Fix: move the JS into the source files the functions live in — stageTrackerSupersedesChipHtml / stageTrackerLinkedPRItem / stageTrackerAdoptedFromChipHtml are in static-src/js/tracker-row.js:457,819,839, stageTrackerFetchDelegatePlan in static-src/js/tracker-actions.js:1221 — then make dashboard-gen and commit the regenerated index.html.
The Go side reads correctly to me against the tree: stageTrackerLineageIndex keys on the adopter and keeps the lowest original (stage_tracker_lineage.go:44-46), the branch fallback refuses non-App heads and self-references (:60-66), lineageAuthors is filled in addPR before the post-pass so an open original's author kind is picked up (stage_tracker.go:2162, 2268-2275), and the linked-PR copy mirrors Lineage (:3026). Close-first adoption — the case #15396 describes — is covered by the close-first subtest.
Minor, not blocking: it.Caption += " (adopted from #N)" (stage_tracker.go:2237) appends with a leading space even when Caption is empty, and the same fact then also appears as the chip beside the number — consider one or the other.
overlap failed with invalid character 'S' looking for beginning of value in pr-overlap.sh — that is the script choking on a non-JSON response, not this diff.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
One blocking defect, verified by running the generator: the JavaScript side of this change was written directly into the generated artifact src/pkg/dashboard/static/index.html, and src/pkg/dashboard/static-src/js/ is untouched (git diff --stat lists no static-src file).
src/docs/dashboard-source-layout.md:10-15 is explicit — "Edit static-src/**, run make dashboard-gen, commit both" — and TestIndexHTMLIsGenerated (pkg/dashboard/webstatic/indexgen_test.go) fails whenever the committed index.html differs from its sources. On this head, c3ca6e3:
$ go run ./pkg/dashboard/webstatic/gen -src pkg/dashboard/static-src -out pkg/dashboard/static/index.html -check
pkg/dashboard/static/index.html is out of date with pkg/dashboard/static-src; run `make dashboard-gen`
exit status 1
Consequence: build-and-test will go red on that test, and even if it were merged, the next contributor who runs make dashboard-gen would silently delete stageTrackerLineageClause, stageTrackerLineageChipHtml and the five call-site edits, leaving the Go payload emitting lineage that nothing renders. Fix: move the JS edits into the matching static-src/js/tracker-row.js (the supersedes chip they sit beside lives at tracker-row.js:446-457) and the lineage: lp.lineage || null / delegate-plan edits into their source files, then run make dashboard-gen and commit both.
The Go side reads correctly to me: stageTrackerLineageIndex keys on the adopting PR and keeps the lowest original when two records point at one copy (stage_tracker_lineage.go:42); the hive/adopt-N fallback is gated on pr.AppAuthored (:60) so a contributor branch cannot forge provenance; and the post-pass at stage_tracker.go:2268-2275 only overwrites FromAuthor when the original is still in the open-PR set, falling back to the store's rec.Author otherwise. The Go tests cover open, close-first, repo-scoping and the fallback, and TestStageTrackerLineageJS does exercise the chip — so the body's validation claims hold once the source files carry the JS.
(The overlap check failing is the repo's open-PR file-overlap guard, not something in this diff.)
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
…et hive decide Two open PRs declaring the same Fixes #N (hive's #15402 and #15407 for per closing issue (green head first, then earlier-opened) and holds the other with stage reason merge-train:duplicate-of#<winner>; the tracker shows merge_gate.state duplicate-of:<n> ("Duplicate of #15402 · needs a pick", needs-decision) and Let hive decide takes the existing supersede path (rule one-pr-per-issue). Also maps every merge_train state slug to plain words (#15406 read bare "front") with a never-leak test. Fixes #15395 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…et hive decide Two open PRs declaring the same Fixes #N (hive's #15402 and #15407 for per closing issue (green head first, then earlier-opened) and holds the other with stage reason merge-train:duplicate-of#<winner>; the tracker shows merge_gate.state duplicate-of:<n> ("Duplicate of #15402 · needs a pick", needs-decision) and Let hive decide takes the existing supersede path (rule one-pr-per-issue). Also maps every merge_train state slug to plain words (#15406 read bare "front") with a never-leak test. Fixes #15395 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…et hive decide Two open PRs declaring the same Fixes #N (hive's #15402 and #15407 for per closing issue (green head first, then earlier-opened) and holds the other with stage reason merge-train:duplicate-of#<winner>; the tracker shows merge_gate.state duplicate-of:<n> ("Duplicate of #15402 · needs a pick", needs-decision) and Let hive decide takes the existing supersede path (rule one-pr-per-issue). Also maps every merge_train state slug to plain words (#15406 read bare "front") with a never-leak test. Fixes #15395 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…et hive decide Two open PRs declaring the same Fixes #N (hive's #15402 and #15407 for per closing issue (green head first, then earlier-opened) and holds the other with stage reason merge-train:duplicate-of#<winner>; the tracker shows merge_gate.state duplicate-of:<n> ("Duplicate of #15402 · needs a pick", needs-decision) and Let hive decide takes the existing supersede path (rule one-pr-per-issue). Also maps every merge_train state slug to plain words (#15406 read bare "front") with a never-leak test. Fixes #15395 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
… warning (#15427) * ✨ tracker: merge queue position on the chevron, stable wording, stall warning Position chip "In merge queue · 2 of 6 · ~4m" (front: "Next to merge · 1 of 4"), label stable across sweeps (sweep = spinning ⬡ + "Checking now…"), Merge queue popover in the sticky bar, countdown to the member's turn anchored server-side (merge_train.eta_s/eta_at/eta_basis/late), stall warning with governor.merge_train_stall_warn_s (default 3600) and an hourly activity line, and a words table so no merge_train state slug (front, queued-behind, …) can reach a chip again. Fixes #15395 Signed-off-by: Andrew Anderson <andy@clubanderson.com> * ✨ merge queue: one PR per issue — hold the duplicate, supersede via Let hive decide Two open PRs declaring the same Fixes #N (hive's #15402 and #15407 for per closing issue (green head first, then earlier-opened) and holds the other with stage reason merge-train:duplicate-of#<winner>; the tracker shows merge_gate.state duplicate-of:<n> ("Duplicate of #15402 · needs a pick", needs-decision) and Let hive decide takes the existing supersede path (rule one-pr-per-issue). Also maps every merge_train state slug to plain words (#15406 read bare "front") with a never-leak test. Fixes #15395 Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Summary
Fixes #15396
Validation
gofmt -lis clean.— hive: backend=pi model=openai-codex/gpt-6.1-sol
🐝 Hive Agent:
contributor| SHA:c3ca6e354