Skip to content

Add regression coverage for an unconfirmed merge response #690

Description

@LSantha

Summary

The merge helper now tolerates GitHub empty responses and re-fetches the PR to confirm merged: true. Add regression coverage for the opposite case: the merge call returns without error, but the follow-up PR read reports merged: false.

Affected behavior

Both the ticket-runner and batch-orchestrator auto-merge paths should keep the task in REVIEW and surface a merge failure rather than claiming success when the PR is not actually merged.

Scope

  • Add focused tests for the unconfirmed-merge response in the ticket-runner and orchestrator test suites.
  • Reuse the existing mergePR verification behavior; do not change production semantics unless a test exposes a missing error path.
  • Assert the issue/master state is not advanced to DONE and a failure comment is recorded.

Acceptance criteria

  • Empty successful response with merged: false is not treated as success.
  • No Java, ASM, build, or CI workflow files are changed.
  • The Node test suite remains green.

Test path

Run node --test .github/scripts/tests/*.test.js.

Merge signal

Auto-merge is appropriate: kind/chore, regression-test hardening, no Java or build surface.

Triage Addendum (auto, 2026-09-26)

  • Area / Kind: area/test + kind/chore
  • Blast radius: L0 method (test files only - .github/scripts/tests/*.test.js; no production module change intended)
  • Expected scope: .github/scripts/tests/ticket-runner.test.js and .github/scripts/tests/orchestrator.test.js; stub pulls.merge to resolve empty and pulls.get to return merged: false; assert phase never reaches DONE, plus merge_failed history entry and failure comment. No-go: core/src/**, *.asm, all/build.xml, .github/workflows/**, mergePR semantics.
  • Test path: node --test .github/scripts/tests/*.test.js
  • Merge signal: safe (test-only, ~2 files / <150 added lines, no boot path, no public API change, working verify command)
  • Gaps: non-blocking - the mergePR throw path leaves state.phase = "MERGE", not REVIEW (.github/scripts/ticket-runner.js:718 and :548 catch blocks); assert "not DONE" rather than a REVIEW phase, or file a follow-up if REVIEW rollback is the real intent.
  • Full report: ## Triage comment below.

❌ Ticket Runner Status

Field Value
Phase FAILED
Turn 0/3
Retries 3/3
PR #691
Review in progress no
Started 2026-09-26T13:32:41.097Z

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/doneThe agent finished successfully; PR opened or comment posted.agent/failedThe agent exhausted its retries without producing a result.area/testUnit tests, boot tests, QEMU test infrastructure.kind/choreRefactor, typo sweep, dead-code removal; no behavior change.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions