test(session): finish-audit closeout for #184
CI / ci (push) Canceled after 0s
CI / ci (pull_request) Canceled after 0s

Three-reviewer fanout over PR #184's deferred nil-scope fix:

- pin the titled drain's APPLY half (unpinned suite-wide) over a new
  hangOnPromptLoad rig mode (prompt parks, load answers);
  flip-verified against a nil-only drain guard
- cut the dead Equatable on PendingScope (converged finding)
- name the same-turn pendingRestart ceiling on the drain: respawn's
  .starting window drops the consumed scope; consume-at-apply is the
  upgrade path (follow-up ticket)
- changelog + devlog for the PR; AGENTS.md rails refreshed

Suite 654 executed / 0 failed; swiftformat clean; swiftlint
unchanged (both warnings pre-exist on main).
This commit is contained in:
AlexKucera committed 2026-11-10 16:23:08 +01:00
1 parent 836da5833d
commit 3193714a61
8 files changed
+127 -12

No files matched your search

+3 -3
View File
@@ -202,7 +202,7 @@ final class ScriptedEngine: EngineTransport, @unchecked Sendable {
self.onStderrLine?("cancel received")
// #124: the cancel-acknowledging hold — the real engine answers
// its hanging prompt the moment session/cancel arrives.
guard self.mode == "hangOnPrompt", let id = self.heldPromptID,
guard self.mode.hasPrefix("hangOnPrompt"), let id = self.heldPromptID,
let continuation = self.parked.removeValue(forKey: id) else { return }
self.heldPromptID = nil
continuation.resume(returning: .object(["stopReason": .string("cancelled")]))
@@ -332,7 +332,7 @@ extension ScriptedEngine {
return
}
toolCall(sid, title: "submit_fix_cards", rawInput: ScriptedPayloads.fixCard)
if mode == "hangOnPrompt" {
if mode.hasPrefix("hangOnPrompt") {
park(id: id, continuation: continuation)
heldPromptID = id
return
@@ -345,7 +345,7 @@ extension ScriptedEngine {
params: JSONValue?,
continuation: CheckedContinuation<JSONValue?, any Error>,
) {
guard mode.hasPrefix("loadReplay") else {
guard mode.hasPrefix("loadReplay") || mode == "hangOnPromptLoad" else {
park(id: id, continuation: continuation) // the zsh never answers
return
}