fix(transport): refuse ordinary sends at adopted Pi confirmations #2015
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 403 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.359
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2015"
general
weight: 0.35
openrig-review
An adopted Pi TUI can retain an unknown runtime and has no managed-runner hook. Its extension selector was not recognized by the shared pane classifier, so an ordinary message could choose the highlighted answer.
Recognize the current Pi selector by its option block with exactly one arrow-selected row, navigation/select/cancel help and adjoining closing border. Footer metadata is optional: unnamed sessions, absent usage counters, extension status and below-editor widgets do not decide recognition. Rebound select/cancel labels and other option names are supported. A later editor border or closing Markdown fence keeps historical/quoted output from reading as a current selector.
The existing
target_needs_inputrefusal then explains the stop and writes neither text nor Enter. The same pane fallback supplies attention evidence. Normal unknown-runtime sends and audited deliberate interaction retain their behavior. The cost applies only to this positive selector signature: ordinary messages wait until the person handles that selector. No runtime discovery, backend, setting or admission rule was added.The bounded match covers a selector with up to six nonblank rows below its closing border and a selected option within the existing prompt scan window. It is not universal recognition of every Pi extension editor or layout.
Validation:
tsc --noEmitand diff check passed.Delivery is an artery: messages and wakes share this classifier. A stub agent does not draw Pi's native widget, so these checks use real SessionTransport and SQLite adoption registration/binding with mocked pane capture and write spies. The original fixture is reconstructed from a retained filtered capture, not a byte-exact raw pane; added layout variants follow Pi v1.4.0
extension-selector.ts,footer.tsandinteractive-mode.ts. No native session, provider or real approval dialog was exercised by these source checks. Native acceptance must include a default unnamed Pi session, selected No, extension status, a narrow pane and an ordinary send after the selector closes.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Prompt sending now detects Pi confirmation selectors and prevents ordinary sends from typing or submitting while a selection prompt is active.
These prompts are marked as requiring attention, including when “No” is selected. Deliberate, audited input remains available.
Historical text and unrelated content are not treated as active selection prompts; sending to a quiet adopted seat continues to work normally.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->