You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
server: a mirrored secret's authority is not rechecked between typing the text and sending Enter #900
Split from #589: main already captures the pty identity and a role generation with the sender's claim when a secret is accepted, and rechecks them after the live-screen read (#624, on top of #588's claim recheck).
Remaining
On a mirrored pane, the secret handler in server/index.ts (the attachment.mirror branch) does not recheck the sender's authority between paneSendText(secret) and paneSendKeys(["Enter"]). A sender that detaches and rejoins a still-alive attachment while the text RPC is pending still gets its Enter sent, and the answer is ok: true. This was found in the pre-release Codex review of v0.4.0..6993563 and confirmed by reading the code; it has not been reproduced with a test.
Withholding Enter alone is not enough. It would leave the secret typed in the prompt for whoever presses Enter next.
Suggested fix:
Carry one captured authority (claim, pty identity, role generation) through the whole send.
If any part of it changes after the text is sent, clear the line instead of leaving the secret in it, and answer with the matching error.
Add a contract case for this window in server/submit.contract.test.ts, next to the existing detach/rejoin case.
Activity
fix(terminal): recheck mirror secret authority before Enter (devswha#…