Skip to content

feat(harness): add plan-level closed-unmerged scenario (AB#3239) - #482

Merged
PolyphonyRequiem merged 1 commit into
mainfrom
feat/ab3239-plan-level-closed-unmerged-scenario
May 19, 2026
Merged

feat(harness): add plan-level closed-unmerged scenario (AB#3239)#482
PolyphonyRequiem merged 1 commit into
mainfrom
feat/ab3239-plan-level-closed-unmerged-scenario

Conversation

@PolyphonyRequiem

Copy link
Copy Markdown
Owner

Summary

First path-coverage scenario for plan-level.yaml. Closes the immediate
acceptance criterion of AB#3239 ("at least one passing scenario exercising
a plan-level sentiment-loop path"). Lands the simplest such path — the
closed-unmerged abort — and establishes the input/cli-stub baseline that
follow-up scenarios (analyzer → fixer → merge loop, stale-generation
re-architect, complete-path child recursion) can build on.

Path covered

depth_guard
  → guidance_loader
    → root_resolver
      → type_loader
        → ancestor_chain
          → state_detector (awaiting_review)
            → pr_poll_platform_router (platform=github)
              → poll_status (route=abort_unmerged)
                → closed_unmerged_gate → $end

The scenario stubs the seven entry-chain CLI verbs (plan depth-guard,
plan load-agent-guidance, root resolve, plan load-type, plan derive-ancestor-chain, plan detect-state, pr poll-status) with the
minimum JSON each agent's Jinja templates inspect. pr_poll_platform_router
is a pwsh inline script that runs unintercepted and routes on
workflow.input.platform.

Single-pass abort — no shim sequencing required.

Verification

  • python -m driver.run tests/harness/scenarios/plan_level_closed_unmerged_acknowledges_via_gatepassed: true (event_count=37, gates_presented=[closed_unmerged_gate]).
  • Invoke-Pester tests/harness/run-scenarios.Tests.ps1 → 11/11 green (10 existing + 1 new) in ~3m30s.

Scope notes

This PR ships the closed-unmerged abort path only. The richer sentiment-loop
scenarios listed in AB#3239's "Scenarios to add" section remain in scope for
follow-up PRs but are intentionally not bundled here — each one needs its own
agent_scripts (architect, plan_reviewer, pr_feedback_analyzer, pr_fixer) and
in some cases shim sequencing, which makes them substantially larger reviews.
Splitting them out keeps each change reviewable.

Refs AB#3239.

First path-coverage scenario for plan-level.yaml. Mirrors the github-pr
abort-path template: state_detector classifies the plan PR as
`awaiting_review` so the workflow enters the sentiment-loop seam, then
poll_status reports `route=abort_unmerged`. The workflow surfaces
`closed_unmerged_gate` (auto-acknowledged under --skip-gates) and
terminates, proving the abort path is wired through the entire entry
chain (depth_guard → guidance_loader → root_resolver → type_loader →
ancestor_chain → state_detector → pr_poll_platform_router → poll_status
→ closed_unmerged_gate).

Path covered:
  depth_guard → guidance_loader → root_resolver → type_loader →
  ancestor_chain → state_detector (awaiting_review) →
  pr_poll_platform_router (platform=github) →
  poll_status (route=abort_unmerged) →
  closed_unmerged_gate → \

No sequencing required — single-pass abort. Follow-up scenarios for the
analyzer → fixer → merge loop, stale-generation re-architect, and
complete-path child recursion will land separately.

Refs AB#3239.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PolyphonyRequiem
PolyphonyRequiem merged commit 086a74b into main May 19, 2026
1 check passed
@PolyphonyRequiem
PolyphonyRequiem deleted the feat/ab3239-plan-level-closed-unmerged-scenario branch May 19, 2026 21:22
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