M-3: Diagnostics.hardBlockTriggered + 1s pre-termination delay (G-012) #113

Open
opened 2026-05-12 19:37:04 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-05-12 19:37:04 +00:00 (Migrated from github.com)

Goal

Diagnostics.hardBlockTriggered event + 1s pre-termination delay (G-012). Replaces direct NSAlert.runModal. Banner observable, then process exits.

Scope

  • hardBlockTriggered(reason: HardBlockReason) event
  • 1s delay between event emission and exit() call
  • No direct NSAlert.runModal (G-012 / boundary script enforced)
  • HardBlockReason includes .harnessModeOnSignedRelease (Failure Mode 6)

Files

  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Diagnostics+Adapter.swift
  • App/AppDelegate.swift — replace any NSAlert.runModal hard-block path

Acceptance

  • bash scripts/check-no-modal-presentation.sh green
  • Hard-block emits event, banner observable for 1s, then exit
  • Scenario S-DIAG-008 (hardBlock path) green
  • S-INFRA-001 (harness-on-signed-Release hard-block, Failure Mode 6) skeleton present

Test

S-DIAG-008 asserts event emission + 1s observability before terminate.

Parent epic

#7

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.4 (M-3.5) + §5.6 Failure Mode 6
G-012 (no modal presentation)

## Goal Diagnostics.hardBlockTriggered event + 1s pre-termination delay (G-012). Replaces direct NSAlert.runModal. Banner observable, then process exits. ## Scope - `hardBlockTriggered(reason: HardBlockReason)` event - 1s delay between event emission and `exit()` call - No direct `NSAlert.runModal` (G-012 / boundary script enforced) - HardBlockReason includes `.harnessModeOnSignedRelease` (Failure Mode 6) ## Files - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Diagnostics+Adapter.swift` - `App/AppDelegate.swift` — replace any `NSAlert.runModal` hard-block path ## Acceptance - [ ] `bash scripts/check-no-modal-presentation.sh` green - [ ] Hard-block emits event, banner observable for 1s, then exit - [ ] Scenario `S-DIAG-008` (hardBlock path) green - [ ] `S-INFRA-001` (harness-on-signed-Release hard-block, Failure Mode 6) skeleton present ## Test `S-DIAG-008` asserts event emission + 1s observability before terminate. ## Parent epic #7 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.4 (M-3.5) + §5.6 Failure Mode 6 G-012 (no modal presentation)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#113