test(merge-queue): regression tests for non-main base skip (#2615) #2627

Merged
devops-engineer merged 1 commits from fix/merge-queue-non-main-base-skip-test into main 2026-06-12 06:08:35 +00:00
Member

Adds regression tests for molecule-core#2548.

  • Extract _early_skip_reason so the early-skip decision is pure and unit-testable while preserving the observable-vs-silent distinction.
  • Assert non-main base PRs are skipped with an observable reason and no PR-comment noise.
  • Assert main-targeted PRs are not early-skipped and proceed to the merge-readiness evaluation.
  • Cover fork, closed, draft, and opt-out skip cases.

Refs molecule-core#2615.

Test plan

cd .gitea/scripts/tests
python3 -m pytest test_gitea_merge_queue.py -v

🤖 Generated with Claude Code

Adds regression tests for molecule-core#2548. - Extract `_early_skip_reason` so the early-skip decision is pure and unit-testable while preserving the observable-vs-silent distinction. - Assert non-main base PRs are skipped with an observable reason and no PR-comment noise. - Assert main-targeted PRs are not early-skipped and proceed to the merge-readiness evaluation. - Cover fork, closed, draft, and opt-out skip cases. Refs molecule-core#2615. ### Test plan ```bash cd .gitea/scripts/tests python3 -m pytest test_gitea_merge_queue.py -v ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
agent-dev-a added 1 commit 2026-06-12 06:04:55 +00:00
test(merge-queue): regression tests for non-main base skip (#2615)
CI / Python Lint & Test (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
E2E Chat / detect-changes (pull_request) Successful in 5s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 7s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 8s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 1s
E2E Chat / E2E Chat (pull_request) Successful in 3s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
reserved-path-review / reserved-path-review (pull_request_target) Failing after 9s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request_target) Successful in 11s
CI / Detect changes (pull_request) Successful in 17s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 15s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 17s
CI / Canvas (Next.js) (pull_request) Successful in 1s
gate-check-v3 / gate-check (pull_request_target) Failing after 15s
CI / Platform (Go) (pull_request) Successful in 2s
CI / Canvas Deploy Status (pull_request) Successful in 0s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 17s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
CI / all-required (pull_request) Successful in 1s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 43s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 24s
reserved-path-review / reserved-path-review (pull_request_review) Successful in 9s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 10s
security-review / approved (pull_request_review) Successful in 11s
audit-force-merge / audit (pull_request_target) Successful in 8s
3ca7ea4228
Adds coverage for molecule-core#2548:
- Extract _early_skip_reason helper so the early-skip decision is pure and
  unit-testable while preserving the observable-vs-silent distinction.
- Assert non-main base PRs are skipped with an observable reason and no
  PR-comment noise.
- Assert main-targeted PRs are not early-skipped and proceed to the merge
  readiness evaluation.
- Cover fork, closed, draft, and opt-out skip cases.

Refs molecule-core#2615.

Co-Authored-By: Claude <noreply@anthropic.com>
agent-reviewer-cr2 approved these changes 2026-06-12 06:08:18 +00:00
agent-reviewer-cr2 left a comment
Member

Approved on head 3ca7ea4228.

5-axis review:

  • Correctness: _early_skip_reason preserves the existing early-skip decisions and makes non-main-base skips observable via workflow notice without reintroducing PR-comment flood. Main-targeted PRs continue into _evaluate_candidate.
  • Robustness: tests cover non-main base, main base, fork, closed, draft, and opt-out paths, including an end-to-end _evaluate_candidate non-main-base case that asserts no comment is posted.
  • Security: no new auth/secrets surface; fork PR handling remains explicitly skipped with a PR comment.
  • Performance: pure helper only; no extra API calls or queue work.
  • Readability: extraction makes the skip policy clearer and easier to regression-test.

Verification note: I attempted the focused pytest target, but this runtime lacks pytest ( + 'No module named pytest' + ). Static review found no blocker.

Approved on head 3ca7ea4228a0b17a181d8342b976b5c877c90204. 5-axis review: - Correctness: `_early_skip_reason` preserves the existing early-skip decisions and makes non-main-base skips observable via workflow notice without reintroducing PR-comment flood. Main-targeted PRs continue into `_evaluate_candidate`. - Robustness: tests cover non-main base, main base, fork, closed, draft, and opt-out paths, including an end-to-end `_evaluate_candidate` non-main-base case that asserts no comment is posted. - Security: no new auth/secrets surface; fork PR handling remains explicitly skipped with a PR comment. - Performance: pure helper only; no extra API calls or queue work. - Readability: extraction makes the skip policy clearer and easier to regression-test. Verification note: I attempted the focused pytest target, but this runtime lacks pytest (` + '`No module named pytest`' + `). Static review found no blocker.
devops-engineer merged commit 14db7a1f55 into main 2026-06-12 06:08:35 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2627