test(session): finish-audit closeout for #184
CI / ci (pull_request) Canceled after 0s
CI / ci (push) 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 was merged in pull request #184.
This commit is contained in:
AlexKucera committed 2026-11-10 16:25:58 +01:00
1 parent 704e7a83fd
commit a3ef007562
8 files changed
+123 -8

No files matched your search

+6 -2
View File
@@ -283,7 +283,7 @@ final class MentorSessionModel {
/// torn down mid-stream. Pending-ness rides the enum, NEVER the
/// target's optionality: a nil target is an explicit clear (nothing
/// open hosts nothing), not "no pending request".
private enum PendingScope: Equatable {
private enum PendingScope {
case none
case scope(String?)
}
@@ -1072,7 +1072,11 @@ extension MentorSessionModel {
/// end — from BOTH turn-end defers (chat sendPrompt and the pass run),
/// after `isStreaming` cleared, so the scope rail re-evaluates for real.
/// A deferred nil target drains too — it is an explicit clear, so the
/// old piece's hosting must not survive the drain.
/// old piece's hosting must not survive the drain. Ceiling: a
/// same-turn pendingRestart drains first and respawn's `.starting`
/// window makes the scope Task no-op AFTER consumption — the scope
/// is lost (pre-existing rail shape, titled and nil alike;
/// ponytail: consume-at-apply is the upgrade path).
private func firePendingScopeIfRequested() {
guard case let .scope(title) = pendingScope else { return }
pendingScope = .none