Skip to content

test(scheduler): restore #1541 coverage on current main - #1554

Closed
seonghobae wants to merge 2 commits into
mainfrom
fix/scheduler-coverage-current-main-20260901
Closed

test(scheduler): restore #1541 coverage on current main#1554
seonghobae wants to merge 2 commits into
mainfrom
fix/scheduler-coverage-current-main-20260901

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Root cause

Protected main@5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1 contains 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-#1546 main; 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. Protected main was 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:

  • conflicted draft PRs remaining draft PR skips;
  • conflicted, unapproved PRs failing closed without conflict-repair authority;
  • REST workflow-name lookup pagination beyond 100 runs while filtering unnamed rows;
  • Resource not accessible by integration degrading to an empty fail-closed workflow map;
  • unrelated REST failures (for example HTTP 502) propagating instead of being swallowed.

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.


Devin Review

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 899dfa07-4b5a-49e7-8cf2-5d454e6ec568

📥 Commits

Reviewing files that changed from the base of the PR and between 5686de4 and 563a766.

📒 Files selected for processing (2)
  • tests/test_pr_review_fix_scheduler.py
  • tests/test_scheduler_1541_coverage_regressions.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

/oc review

Review exact head 2009bcb9ffcdb1ab4f91c772d698778576ee6f3d only. This is a current-main test-only successor for the #1541 scheduler coverage regression; verify the five executable fail-closed/fallback cases and do not transfer predecessor #1551/#1547/#1548 evidence.

@seonghobae
seonghobae enabled auto-merge (squash) September 1, 2026 06:09

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Review exact head 2009bcb9ffcdb1ab4f91c772d698778576ee6f3d only. This replaces the earlier /oc request because protected main@5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1 does not yet contain #1537's /oc alias. Verify the five current-main scheduler regression cases; do not transfer predecessor evidence.

Copy link
Copy Markdown
Contributor Author

@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.

seonghobae pushed a commit that referenced this pull request Sep 1, 2026
#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.

Copy link
Copy Markdown
Contributor Author

Current-main coverage repair advanced to exact head 563a766c5be935a8cdba7afc0cc9684af741e72e. A concurrent agent reproduced three additional coverage gaps on plain main@5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1 while working #1558: real live_head_matches(), the no-stale-worker short circuit, and the already-active current-head autofix wait branch. I moved those tests to this canonical scheduler-coverage owner rather than leaving unrelated scheduler changes in the mention-router PR. The tested blob is the same one that completed a 2,276-pass/100%-coverage local suite in the concurrent branch lineage; fresh exact-head hosted checks/review are still required here. @opencode-agent review

seonghobae pushed a commit that referenced this pull request Sep 1, 2026
…-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.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Fresh exact-head review requested for 563a766c5be935a8cdba7afc0cc9684af741e72e. This PR is test-only closure evidence for uncovered scheduler branches on protected main@5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1; evaluate the exact current head only. No predecessor review/check evidence transfers.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review review

Please review exact head 563a766c5be935a8cdba7afc0cc9684af741e72e. Scope is only regression coverage for existing scheduler behavior; treat queued/cancelled predecessor evidence as non-passing.

Copy link
Copy Markdown
Contributor Author

Superseded by current-main #1567 after protected main advanced through #1546. #1567 reproduces the post-#1546 99% coverage regression on unmodified main, covers the earlier conflicted-draft/conflicted-unauthorized and REST workflow-identity branches from this PR, and additionally covers the new #1546 live_head_matches, empty-stale-run fall-through, and active-autofix wait branches. Its exact head db106d50f2134ece147bc5318e389aeb124d198c reports 100% repository coverage. Keeping both open would duplicate the same coverage-owner lane and create extra review/check load. No #1554 checks/reviews are transferred; #1567 must satisfy fresh exact-head governance.

@seonghobae seonghobae closed this Sep 1, 2026
auto-merge was automatically disabled September 1, 2026 07:34

Pull request was closed

seonghobae pushed a commit that referenced this pull request Sep 1, 2026
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.
seonghobae added a commit that referenced this pull request Sep 1, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant