Repository navigation
✨ review: wire review.pending_fix_ttl into the fix dispatcher - #14677
Conversation
|
[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
|
There was a problem hiding this comment.
Config plumbing is correct; the PR is incomplete — the new leaf is not surfaced in the Settings UI, and that is why test (dashboard 3/4) is red.
What I verified against the tree at 8ef8505:
src/pkg/config/review_dispatch.go:79-89—PendingReviewFixTTL()returns the default for unset/0/unparsable and passes a negative through.src/pkg/review/dispatch.go:1420-1427(pendingFixExpired) treats<0as never-expire and0asDefaultPendingFixTTL, so the two agree andsrc/cmd/hive/main.go:10724wires it to the right field.src/pkg/config/validate.go:149— typo fails at load; covered byTestPendingReviewFixTTL.- Both
DefaultPendingFixTTLconstants are 2h and the test pins them together. Fine.
The defect (severity: medium — blocks merge):
src/hive.yaml.example:844addsreview.pending_fix_ttl, but nothing insrc/pkg/dashboard/references it.settings_parity_test.go:33fails withhive.yaml settings are not referenced by the Settings UI and are not allowlisted: review.pending_fix_ttl(job 122388924475, all 3 re-runs).coverageand the aggregatetestcheck are downstream of that.- Fix: mirror what
review.pending_ttlalready does — addPendingFixTTL *string \json:"pending_fix_ttl"`next toapi_config_review.go:133, copy thebody.PendingTTLhandling at:320and:480, add the input next to thereview.pending_ttlfield atstatic/index.html:50150and thereview.pending_fix_ttltoken to the search text at:40553. (Allowlisting it insettings_parity_allowlist.txt` would also turn the test green, but the whole point of #14643 is that the knob is tunable, so the UI field is the better fix.)
Also needs a rebase — mergeable=CONFLICTING against v5.
Nit, not blocking: config.go:7388 cites #14604 while the changelog fragment and test cite #14643; one of them is probably the wrong number.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
The wiring is correct; the red test (dashboard 3/4) is caused by this diff and needs one more file.
What I verified (tree at v5, head 8ef8505)
src/pkg/config/review_dispatch.goPendingReviewFixTTL()returns the default for unset/0/unparsable and passes negatives through. That matches the consumer atsrc/pkg/review/dispatch.go:1420-1427(pendingFixExpired:ttl < 0→ never expires,ttl == 0→DefaultPendingFixTTL). The twoDefaultPendingFixTTLconstants agree at 2h (review/dispatch.go:44).src/cmd/hive/main.go:10724is the only planner call site, so the option now reaches the dispatcher.- Docs,
hive.yaml.exampleand the changelog fragment all describe the same semantics as the code.
Finding — medium — TestSettingsDialogReferencesEveryHiveYAMLLeaf fails on this head
src/pkg/dashboard/settings_parity_test.go:33 walks every Config leaf and fails for any key that is neither referenced by the Settings UI nor listed in src/pkg/dashboard/settings_parity_allowlist.txt. This PR adds the leaf review.pending_fix_ttl (config.go ReviewConfig.PendingFixTTL) but touches neither, so the job reports:
hive.yaml settings are not referenced by the Settings UI and are not allowlisted:
review.pending_fix_ttl
(run 40560535345, job test (dashboard 3/4); the shuffle 3/3 and coverage jobs fail for the same reason.)
Two ways to clear it, in order of preference:
- Wire it like
pending_ttl: add aPendingFixTTL *string \json:"pending_fix_ttl"`field next toPendingTTLinsrc/pkg/dashboard/api_config_review.go:133(apply at ~:320and:480), and a sibling input to thereview.pending_ttlfield insrc/pkg/dashboard/static/index.html:50150withdata-arg1="pending_fix_ttl"(plus the search-text entry at:40553).review_settings_parity_test.go:87shows the exactdata-arg*` shape the test looks for. - Minimal: add
review.pending_fix_ttl # TODO #<issue>tosettings_parity_allowlist.txt. The file header says every entry needs a tracked follow-up.
Separately, the branch is CONFLICTING against v5 and needs a rebase before CI can go green either way.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
DispatchOptions.PendingFixTTL was only settable in code, so operators always got the 2h default even though labels-and-control-signals.md presented PendingFixTTL as a tunable. Add review.pending_fix_ttl (Go duration; unset or 0 means 2h, negative disables expiry), validate it at config load, pass it to the planner, and document it next to review.pending_ttl. Closes #14643 Hive-Run: #14643 Hive-Plan: review-backlog/pending-fix-ttl-config Hive-Spec: review-dispatch#pending-fix-ttl Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRH6kmKQdyGqpPWbCsKpUX Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
…ialog gains a control The settings-parity test fails closed on any new hive.yaml leaf the dialog does not reference; record the gap against #14643 like the sibling review keys. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
8ef8505 to
e581c38
Compare
|
hive/awaiting-ci: rebased on v5 (kept both ValidateDeltaMaxAge and ValidatePendingFixTTL in validate.go) and allowlisted 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Looks correct to me. This is #14660's commits rebased onto v5; the only review ask on the original was the rebase.
Verified against the tree at e581c38:
src/cmd/hive/main.go:10753passescfg.Review.PendingReviewFixTTL()intoDispatchOptions.PendingFixTTL, which was previously left at its zero value.- The consumer
pendingFixExpired(src/pkg/review/dispatch.go:1419-1427) already treats< 0as never-expire and0asDefaultPendingFixTTL, so the semantics documented inhive.yaml.exampleandreview-swarm.md("negative disables expiry") hold without any change to the planner. PendingReviewFixTTL/ValidatePendingFixTTL(src/pkg/config/review_dispatch.go:79-130) mirror the existingPendingReviewTTLpair line for line, andvalidate.go:152wires the validator in so a typo fails at load rather than silently running on 2h.TestPendingReviewFixTTLcovers default, zero, garbage, trimmed, and negative inputs plus theConfig.Validatepath.
One ordering note for whoever merges: #14695 touches the same six files (config.go, validate.go, dispatch.go, main.go, review-swarm.md, hive.yaml.example); whichever lands second will need a trivial rebase. Not a defect.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Looks correct to me. Read the consumer, not just the plumbing:
src/pkg/review/dispatch.go:1420-1428(pendingFixExpired) already implements the semantics the new config comment promises —ttl < 0returns false (never expire),ttl == 0falls back toDefaultPendingFixTTL.config.ReviewConfig.PendingReviewFixTTL()maps unset/"0"/unparsable to the 2h default and passes negatives through unchanged, so the planner sees exactly the values it expects.config.DefaultPendingFixTTL(2h) matchesreview.DefaultPendingFixTTLatdispatch.go:44, andTestPendingReviewFixTTLpins that equality so the two copies cannot drift silently.ValidatePendingFixTTLis wired intoConfig.ValidateWithOptions(validate.go:152), so a typo fails at load — consistent with howpending_ttlis handled.- The
settings_parity_allowlist.txtentry follows the existing# TODO #<issue>form.
For the maintainer, not a defect: #14695 (reviewer lane scales concurrency with backlog) edits the same six files (main.go, review-swarm.md, hive.yaml.example, config.go, validate.go, review/dispatch.go). Whichever merges second will need a rebase; the hunks here are small and additive so it should be mechanical.
This is the deliberate adoption of #14660 (same commits, now rebased onto v5); the earlier changes_requested on #14660 was only the rebase ask, which this head resolves.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Supersedes #14660 (adopted after CI went red and the contributor was unavailable; original commits by @Karibhou preserved).
This branch is #14660's head
8ef85054d6c3as pushed by @Karibhou (forkKaribhou/hive), unchanged. Last lane reason on the original:conflicting.Hive fix agent: rebase this branch on
v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and theirSigned-off-by; add your own sign-off on your commits. Do not open another PR.