test(regression): reuse SessionAutoReply in subagent-hang test (F12)#15
Closed
tesdal wants to merge 1 commit intophase-ab-basefrom
Closed
test(regression): reuse SessionAutoReply in subagent-hang test (F12)#15tesdal wants to merge 1 commit intophase-ab-basefrom
tesdal wants to merge 1 commit intophase-ab-basefrom
Conversation
Replace manual bus.subscribeCallback mirror with the real production SessionAutoReply.make path. The previous test was a regression gate for the *concept* (a subscriber that rejects descendants); now it gates the *integration* between SessionAutoReply and SessionPrompt.loop, so any drift in the production auto-reply implementation will fail this regression directly. - Drop manual mirror handlers (Question/Permission bus subscribers). - Drop unused imports (Bus, Permission, Question). - Acquire SessionAutoReply via Effect.acquireRelease so unsubscribe runs on success, failure, or timeout. - Replace the local questionsRejected counter with the handle's own stats.autoRejectedQuestions — strictly stronger coverage when paired with the existing 'dismissed' tool-error assertion. Diamond review: codex-5.3 spec APPROVE, Opus quality APPROVE. Refs: F12 in docs/superpowers/plans/2026-04-23-audit-remediation.md
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
There was a problem hiding this comment.
Pull request overview
Updates the subagent-hang-regression test to exercise the real SessionAutoReply production implementation instead of duplicating its Bus subscription behavior inline, strengthening the regression gate against drift in the auto-reply integration path.
Changes:
- Replace manual
bus.subscribeCallbackmirroring withEffect.acquireRelease(SessionAutoReply.make(...), unsubscribe)in the subagent-hang regression test. - Remove now-unused imports and the local
questionsRejectedcounter in favor ofhandle.stats.autoRejectedQuestions. - Refresh test comments to reference
SessionAutoReplydirectly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
Review-only PR. Copilot R1 clean (overview only, 0 inline comments). Merging into local/integration-v2 via --no-ff. |
tesdal
added a commit
that referenced
this pull request
Apr 29, 2026
The subagent-hang regression test (Test B) was duplicating SessionAutoReply's contract inline via raw bus.subscribeCallback handlers. Replace the manual mirror with the real production path so the test exercises SessionAutoReply.make directly. Drift in production auto-reply now fails this regression directly. Diamond: codex-5.3 spec APPROVE, Opus quality APPROVE. Copilot R1: clean (overview only, 0 inline comments). PR (review-only): #15 Refs: F12 in docs/superpowers/plans/2026-04-23-audit-remediation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
F12 of the audit-remediation effort. The subagent-hang regression test (Test B in
subagent-hang-regression.test.ts) duplicated theSessionAutoReplycontract inline via rawbus.subscribeCallbackhandlers. Replace the manual mirror with the real production path so the test exercisesSessionAutoReply.makedirectly — drift in the production implementation now fails this regression directly.Changes
Effect.acquireRelease(SessionAutoReply.make(...), handle.unsubscribe).Bus,Permission,Question).questionsRejectedcounter withhandle.stats.autoRejectedQuestions. Strictly stronger when paired with the existing 'dismissed' tool-error assertion.Verification
bun typecheckfrompackages/opencode/— passes.bun test test/session/subagent-hang-regression.test.ts— both tests pass (52s, 8 expect calls).Diamond review
This PR is opened against
phase-ab-baseand is review-only — it will be closed without merging. The work merges intolocal/integration-v2via--no-ffafter Copilot review iterates clean.