M-0: JARVIS_HARNESS=1 runtime gate + ProviderOverrides (UQ-1) #93

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

Goal

Add JARVIS_HARNESS=1 runtime gate to JarvisHost.boot() and gate all internal-surface test commands behind it. Resolves UQ-1, G-001/G-003/G-004.

Scope

  • JarvisHost.init(transportConfig:, providerOverrides: ProviderOverrides?)
  • Internal-surface commands (Voice._injectAudioFrame, Self._forceTCCStatus, _forceError, setConfirmationDefault, ProviderOverrides) gate behind if ProcessInfo.processInfo.environment["JARVIS_HARNESS"] == "1"
  • When env var absent, methods no-op (or trap in debug, no-op in release)
  • Harness data isolation: ~/Library/Application Support/Jarvis-Harness/ when env set

Files

  • packages/JarvisAPI/Sources/JarvisAPI/JarvisHost.swift
  • All internal-surface conformers (added in later phases consume this gate)

Acceptance

  • JARVIS_HARNESS=1 env triggers seam activation
  • env var absent → seams no-op (assert via unit test that injectAudioFrame is no-op)
  • App-support directory selection switches based on env var
  • Harness scenario S-INFRA-001 skeleton present (full assertion lands in plan §5.6)

Test

Unit test asserts seam activation toggles based on env var; data-isolation path selection asserted.

Parent epic

#4

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.1 (M-0.4) + §5.6 Failure Mode 6 + §5.7 Failure Mode 7
.planning/architecture/JARVIS-API-DESIGN-v0.2.md §5 UQ-1

## Goal Add JARVIS_HARNESS=1 runtime gate to JarvisHost.boot() and gate all internal-surface test commands behind it. Resolves UQ-1, G-001/G-003/G-004. ## Scope - `JarvisHost.init(transportConfig:, providerOverrides: ProviderOverrides?)` - Internal-surface commands (`Voice._injectAudioFrame`, `Self._forceTCCStatus`, `_forceError`, `setConfirmationDefault`, `ProviderOverrides`) gate behind `if ProcessInfo.processInfo.environment["JARVIS_HARNESS"] == "1"` - When env var absent, methods no-op (or trap in debug, no-op in release) - Harness data isolation: `~/Library/Application Support/Jarvis-Harness/` when env set ## Files - `packages/JarvisAPI/Sources/JarvisAPI/JarvisHost.swift` - All internal-surface conformers (added in later phases consume this gate) ## Acceptance - [ ] `JARVIS_HARNESS=1` env triggers seam activation - [ ] env var absent → seams no-op (assert via unit test that injectAudioFrame is no-op) - [ ] App-support directory selection switches based on env var - [ ] Harness scenario `S-INFRA-001` skeleton present (full assertion lands in plan §5.6) ## Test Unit test asserts seam activation toggles based on env var; data-isolation path selection asserted. ## Parent epic #4 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.1 (M-0.4) + §5.6 Failure Mode 6 + §5.7 Failure Mode 7 `.planning/architecture/JARVIS-API-DESIGN-v0.2.md` §5 UQ-1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#93