test(scheduler): restore #1541 coverage on current main - #1554
test(scheduler): restore #1541 coverage on current main#1554seonghobae wants to merge 2 commits into
Conversation
|
Warning Review limit reachedNext included review available in 52 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@opencode-agent review Review exact head |
|
@opencode-agent review Please review the exact current head as current-main closure evidence for the #1541 scheduler behavior. This PR is test-only and should not inherit any predecessor review/check evidence. Verify the five fail-closed/fallback branches against current protected main and preserve the existing G-13 residual gaps. |
#1554's own coverage-restoration commit does not actually reach 100%: after porting it onto this branch, three spots in pr_review_fix_scheduler.py remained uncovered (introduced by #1546, distinct from the original #1541 regression #1554 targets): - live_head_matches()'s entire real body was never exercised — every existing test monkeypatches it away instead of calling it; - prepare_autofix_slot()'s "no stale workers" short-circuit (the `if stale_ids:` branch skipping straight to `return same_head`) was never taken — every existing test's fixture always produces at least one stale run; - inspect_pr()'s "current-head autofix run is already queued or running" wait branch (prepare_autofix_slot returning True) had no direct test — existing tests only cover it returning False or None. Verified this gap reproduces identically on plain main@5686de41 and on #1554's own branch in isolation, confirming it predates and is independent of both this branch's mention-router fix and #1554's own commit. Full suite: 2276 passed, 1 skipped, 21 subtests passed. 100% coverage and 100% docstrings restored.
|
Current-main coverage repair advanced to exact head |
…-agent boundary The shared trailing lookahead excluded a following letter, digit, underscore, hyphen, or slash, but not a following "?", so a query string glued directly onto the alias with no separator (/oc?mode=docs, /opencode?next=x) still matched as a complete mention. Reported by CodeRabbit on this feature's predecessor PR (#1558, now closed in favor of this clean stack on #1554). Reproduced first, then added "?" to the same shared trailing exclusion, verified against the full existing accept/reject matrix plus the new query-string cases before applying. Full suite: 2278 passed, 1 skipped, 21 subtests passed. 100% coverage and 100% docstrings maintained.
|
@opencode-agent review Fresh exact-head review requested for |
|
@cwl-noema-review review Please review exact head |
|
Superseded by current-main #1567 after protected |
Pull request was closed
Adds a dated traceability entry for the coverage gap this PR closes: root cause (#1546's uncovered additions plus the older #1547/#1551/ #1554 gap, neither of which merged or transfers evidence here), the fix and its verification, the resolved Devin false-positive on sub-clause coverage, and the known pre-existing SIGPIPE test flake left unremediated as out of scope.
The former scheduler-coverage base #1554 closed unmerged while #1567 became the canonical current-main owner. Preserve #1559's current four mention-router owner blobs exactly on top of #1567, including the latest parser/rejection regressions, and exclude the unrelated SIGPIPE fixture change owned by #1561. This is a normal history-preserving merge; no predecessor checks or reviews transfer.
Root cause
Protected
main@5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1contains the scheduler behavior introduced by #1541 but still lacks executable coverage for five fail-closed/fallback branches. The previous owner #1551 was based on pre-#1546main; while synchronizing it after #1546 merged, a stale-tree two-parent commit was detected immediately by compare and repaired with a forward child commit whose tree is byte-identical to protected main. Protectedmainwas never touched. This PR is a clean current-main successor rather than carrying that historical branch topology forward.Change
Add one focused regression module against the current protected tree. It covers:
draft PRskips;Resource not accessible by integrationdegrading to an empty fail-closed workflow map;No production code, workflow authority, credential path, review rule, or merge behavior changes. The tests exercise the existing current-main behavior only.
Traceability
This is closure evidence for the existing G-13 scheduler/control-plane gap, not a new product behavior. G-13 remains open for receipt consistency, credential-unavailable next-action evidence, and fleet-wide single-flight verification.
Merge gate
Use only exact-current-head checks and formal review. Do not transfer evidence from #1551/#1547/#1548, self-approve, synthesize statuses, force-push, or bypass protected governance.