v1.0 API Migration — UI/Backend separation (M-0..M-7) #76
Open
opened 2026-05-12 19:26:53 +00:00 by KofTwentyTwo
·
0 comments
No Branch/Tag Specified
develop
ci/secrets-historical-baseline
feature/security-findings-2026-10
dependabot/npm_and_yarn/webview/npm_and_yarn-3ac77625be
dependabot/npm_and_yarn/webview/packages/bus/npm_and_yarn-c86b58a346
dependabot/npm_and_yarn/webview/vitejs/plugin-react-6.0.2
dependabot/npm_and_yarn/webview/vite-8.0.13
dependabot/npm_and_yarn/webview/zustand-5.0.13
dependabot/npm_and_yarn/webview/types/node-25.9.1
dependabot/npm_and_yarn/webview/vitest-4.1.6
dependabot/github_actions/actions/setup-node-6
dependabot/github_actions/github/codeql-action-4
dependabot/github_actions/actions/checkout-6
dependabot/github_actions/actions/cache-5
dependabot/github_actions/pnpm/action-setup-6
feat/local-first-llm-routing
docs/local-first-llm-routing-spec
fix/v0.2-wave-1-code-fixes
docs/v0.2-wave-1-doc-drift
docs/handoff-2026-05-14
docs/multi-runner-inventory
docs/ollama-baseline-58
fix/ci-env-harness-sqlite-voice-warmup
fix/ci-xcode-26-and-batcher-timing
chore/typecheck-blocking
fix/hud-typecheck-strict-undefined
wip/voice-log-menu-stash4
v0.1.0-dev.71
v0.1.0-dev.68
v0.1.0-dev.64
v0.1.0-dev.50
Labels
Clear labels
area:agent
area:build
area:bus
area:devtool
area:hud
area:logging
area:mcp
area:memory
area:vision
area:voice
audit-finding
bug
carry-forward
comment-cleanup
dependencies
documentation
duplicate
enhancement
epic
good first issue
help wanted
invalid
javascript
migration
question
severity:critical
severity:high
severity:low
severity:medium
wontfix
Something isn't working
Comment / docstring cleanup per .planning/code-commenting-guide.md
Dependency updates
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Pull requests that update javascript code
Further information is requested
This will not be worked on
Milestone
No items
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: KofTwentyTwo/Jarvis#76
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
Separate the SwiftUI/AppKit + WKWebView UI surface from the Swift backend behind a typed
JarvisAPIpackage, with a parametric harness running every behavioral scenario against BOTH.inProcessActorAND.jsonRoundTripWebViewrunners. The full v1.0 contract is defined in.planning/architecture/JARVIS-API-DESIGN-v0.1.md+JARVIS-API-DESIGN-v0.2.mdand executed via the per-phase migration cards inJARVIS-API-MIGRATION-PLAN.md(M-0..M-7).Why
The 2026-05-03 / 2026-05-04 audits surfaced 8 carry-forward bugs (B-01..B-08) all rooted in a single class of failure: "verification gate is executor self-reports green tests + boundary gates, which cannot detect substrate failures." Grep-based gates pass while runtime substrate is dead (voice graph nil, camera button no-op, history threading missing, sessionHistory never read). The v1.0 contract dissolves the entire class by forcing every behavior through a typed API surface and running every scenario through a real WKWebView JSON round-trip — making "looks green but is broken" detectable at PR time.
Design artifacts (source of truth)
.planning/architecture/README.md— index.planning/architecture/JARVIS-API-DESIGN-v0.1.md— v1.0 contract part 1 (surfaces, commands, events, queries).planning/architecture/JARVIS-API-DESIGN-v0.2.md— v1.0 contract part 2, UQ-1..UQ-5 answered.planning/architecture/JARVIS-API-MIGRATION-PLAN.md— the spine; per-phase scope/files/tests/AC/dependencies/estimates.planning/architecture/JARVIS-API-TEST-CONTRACT.md— parametric harness contract (UQ-5 mandatory).planning/architecture/INVENTORY.md— surface inventory.planning/architecture/REVIEW-API-CORRECTNESS.md— correctness review.planning/architecture/REVIEW-MIGRATION-RISK.md— risk findings R-001..R-018 and per-phase cutover risks.planning/architecture/REVIEW-TEST-CONTRACT.md— test contract review.planning/architecture/HANDOFF-2026-05-07.md— design swarm handoffLocked decisions (UQ-1..UQ-5)
JARVIS_HARNESS=1env var. Test seams (_injectAudioFrame,_forceTCCStatus,_forceError,ProviderOverrides,setConfirmationDefault) ONLY effective when env var set. Production launches fail closed.develop(DONE 2026-05-11, commit48ad8d6) BEFORE M-0 starts. M-4 reframes against the new surface + adds the cache-eligibility regression gate.Voice.synthesizeTurn(turnId:text:tier:)onturnEnded(.completed)for voice-source turns. No implicit TTS routing.Settingsowns ALL configuration mutation. Voice surface losessetTTSTier,muteWakeWord,unmuteWakeWord,startVoice,shutdownVoice. Voice retains only runtime-control verbs (pttDown,pttUp,cancelTTS,synthesizeTurn)..inProcessActorAND.jsonRoundTripWebViewmodes..jsonRoundTripWebViewis non-skippable for B-03-class regressions (M-5S-VIS-001).Phase dependency DAG
Each phase (M-1..M-7) lives on a feature branch with a single PR to
develop. M-0 lands additively direct ondevelop. M-7 is the worst rollback in the plan; dual-channel transport (M-0.5) stays active across the soak.Sub-epics (per-phase)
Total estimate
18.5–25.5 engineer-days (~4–5.5 calendar weeks at solo pace, includes context-switch + PR review overhead + N≥3-day post-M-7 soak as passive observation).
Per-phase breakdown:
Carry-forward bug dissolution map
48ad8d6. M-4 reframes against API + pins behavior viaS-MEM-CACHE-REGRESSION.Result<FrameAttachArmed, FrameAttachError>+ non-skippable.jsonRoundTripWebViewscenarioS-VIS-001.startVoice()returnsaudioGraphFailedif ringBuffer nil; behavioral gate ≥10audioLevelChangedwithin 500 ms.Voice.synthesizeTurnexplicit-command contract per UQ-3 (A).turnTextCompleteAPI event lands; DOM scroll ack stays in webview vitest (out of harness scope per R-014 / G-006).modelDisplayNametyped at API boundary; N=10 anti-paraphrase trials.v1.0 lock criteria
JARVIS-API-DESIGN-v1.0.mdsingle-doc merge, test contract, migration plan,Tools/jarvis-diag/harness)Source
.planning/architecture/JARVIS-API-MIGRATION-PLAN.md— full plan (sections 1–10).planning/architecture/JARVIS-API-DESIGN-v0.1.md+v0.2.md— v1.0 contract.planning/architecture/JARVIS-API-TEST-CONTRACT.md— parametric harness contractdocs/SESSION-STATE.md— locked UQ decisions reference