fix: limit scheduler review dispatch fanout - #160
Conversation
OpenCode Review Overview
Pull request overviewOpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path. Findings1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch
gh pr checkout 160 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:codex/limit-review-dispatch-fanout
# rebase path only: git push --force-with-lease origin HEAD:codex/limit-review-dispatch-fanout
Change Flow DAGflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: pr-review-merge-scheduler.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> Conflict["Merge conflict blocks this path"]
Conflict --> V1["actionlint plus required checks"]
Evidence --> S2["CI script (2 files)"]
S2 --> I2["review and security gate shell path"]
I2 --> Conflict["Merge conflict blocks this path"]
Conflict --> V2["bash -n plus Strix self-test"]
Evidence --> S3["Test: test_pr_review_merge_scheduler.py"]
S3 --> I3["regression suite"]
I3 --> Conflict["Merge conflict blocks this path"]
Conflict --> V3["targeted test run"]
Merge Conflict Guidance
gh pr checkout 160 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:codex/limit-review-dispatch-fanout
# rebase path only: git push --force-with-lease origin HEAD:codex/limit-review-dispatch-fanout |
There was a problem hiding this comment.
Pull request overview
OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.
Findings
1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch
- Problem: GitHub reports mergeStateStatus
DIRTYfor this pull request. - Root cause: Branch
codex/limit-review-dispatch-fanoutcannot be merged cleanly intomain; the changed-file flow below shows which review/runtime path is blocked by the conflict. - Fix: Merge or rebase the latest
mainintocodex/limit-review-dispatch-fanout, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch. - Repair commands:
gh pr checkout 160 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:codex/limit-review-dispatch-fanout
# rebase path only: git push --force-with-lease origin HEAD:codex/limit-review-dispatch-fanout- Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.
Change Flow DAG
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: pr-review-merge-scheduler.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> Conflict["Merge conflict blocks this path"]
Conflict --> V1["actionlint plus required checks"]
Evidence --> S2["CI script (2 files)"]
S2 --> I2["review and security gate shell path"]
I2 --> Conflict["Merge conflict blocks this path"]
Conflict --> V2["bash -n plus Strix self-test"]
Evidence --> S3["Test: test_pr_review_merge_scheduler.py"]
S3 --> I3["regression suite"]
I3 --> Conflict["Merge conflict blocks this path"]
Conflict --> V3["targeted test run"]
- Result: REQUEST_CHANGES
- Reason: mergeStateStatus is
DIRTY; mergeable isCONFLICTING. - Head SHA:
67eaf3bba5eed672bc5194cb35a2e7459991decf - Workflow run: 28401199178
- Workflow attempt: 1
|
Closing as superseded. The latest main branch now contains the scheduler fanout control under the canonical review_dispatch_limit path: schedule/workflow_dispatch/workflow_run get a bounded follow-up dispatch budget and push events use zero, with workflow forwarding and scheduler tests already present. This PR's older max_review_dispatches implementation now conflicts with that newer main implementation rather than adding a separate needed fix. |
* fix(review): honor workspace coverage and synced Python envs Problem: Required OpenCode coverage could not validate fast-mlsirm even after its Rust suite compiled and passed. The Python evidence command collected 21 import errors for dependencies already installed by uv, and the Rust gate forced the 100% central default because the target is a virtual Cargo workspace. Reproduction/Evidence: fast-mlsirm PR #160 coverage-evidence job 87244269792 installed the optional dev environment, then executed configured pytest outside .venv and failed to import numpy. Its root Cargo.toml has only [workspace], while rust_coverage_fail_under_lines inspected only [package.metadata] and therefore ran cargo llvm-cov with --fail-under-lines 100 despite the repository-owned baseline facility. Root cause: The trusted pytest executor preserved the system PATH after uv sync created <project>/.venv, so direct pytest/python argv did not resolve in the synchronized environment. The inline TOML parser modeled package manifests only and omitted the valid metadata namespace for virtual workspaces. Change: - Prepend an existing project .venv/bin to PATH while preserving shell=False and validated argv execution. - Move Rust threshold resolution into a trusted, tested parser. - Resolve package metadata first and workspace metadata as the virtual-workspace fallback. - Keep invalid booleans, types, and values outside 0..100 fail-closed. - Extend workflow, security-boundary, and quick-gate contracts for both paths. Validation: - python3 -m pytest -q: 622 passed - targeted security/coverage/agent contracts: 72 passed - parser against fast-mlsirm virtual workspace Cargo.toml: emitted 90 - git diff --check: passed - long Strix quick-gate launched and continued through its expected negative fixtures; repository CI remains the authoritative complete shell-gate run Security: No PR-controlled shell is introduced. Commands remain allowlisted pytest argv executed with shell=False, and coverage metadata is parsed by trusted default-branch code with numeric range validation. * test(review): cover Rust threshold CLI contract Problem: The central repository enforces 100% Python coverage. PR #565 first ran under the previous trusted workflow and reported rust_coverage_threshold.py at 76%, leaving its argparse, error-reporting, and __main__ paths unproven even though the parser logic tests passed. Evidence: Required coverage-evidence job 87247543719 reported 5,533 statements, 11 missed statements, 99% total coverage, with all misses at rust_coverage_threshold.py lines 55-64 and 68. Change: Add end-to-end tests for normalized CLI output, invalid metadata diagnostics and exit status, and the executable __main__ entrypoint when no repository baseline is declared. Validation: - parser test module: 10 passed - python3 -m coverage run -m pytest -q: 625 passed - python3 -m coverage report --show-missing: 5,533 statements, 0 missed, 100% - git diff --check: passed
Summary
max_review_dispatchesfor workflow_call/workflow_dispatch and env overridesVerification
py -3.12 -m pytest tests/test_pr_review_merge_scheduler.py -qpy -3.12 scripts/ci/pr_review_merge_scheduler.py --self-testgit diff --check