M-7: Turn surface keystone (per-turn batcher + listTurns hydration; B-06 partial) #11
Open
opened 2026-05-12 19:02:52 +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#11
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
Land Turn surface (keystone). Partition
OutboundBatcherbyturnId. Webview retiressessionHistorypush and callslistTurnson connect (R-015).bargeInlives on Turn (UQ-4). Confirmation roundtrip. Closes B-06 partial (turnTextCompleteAPI event; DOM scroll ack remains in webview vitest territory). Worst rollback in plan; dual-channel transport (M-0.5) stays active until M-7 verified across N≥3 days.Scope — surfaces in this phase
JarvisAPI.Turncommands:submitTurn(text:source:)(noimages:— F-007),cancelTurn(turnId:),bargeIn(text:source:),respondToConfirmation(confirmationId:outcome:)turnStarted,tokenStreamed(turnId, seq),thinkingStreamed(turnId, seq),toolCallStarted/Updated/Ended,confirmationRequested/Resolved,turnEnded(terminator:),turnError(code:),turnTextComplete(G-006 / B-06)getActiveTurn(exposestoolCalls+accumulatedThinkingper F-019),listTurnsseq: Intper-turn monotonicity (F-018)OutboundBatcher.postToken(turnId:)— partitioned pending buffer; onbargeIn, superseded turn's tokens dropped (R-002)ConfirmationBrokerreads timeout from injectedConfirmationPolicy(R-008)Turn.bargeIntriggersVoice.cancelTTS(R-018 surface wiring; substrate from M-6.8)sessionHistoryinbound push; callsTurn.listTurns(limit:)on connect (R-015) — atomic with SwiftBusOutbound.hudState+sessionHistorycasesBUS_PROTOCOL_VERSION = "2.4.0"strict (drops2.3.0) — LAST commit in branch; lands after N≥3-day soakFiles (created/modified)
packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Turn+Adapter.swift(new)packages/Bus/Sources/Bus/OutboundBatcher.swift— partition by turnIdpackages/MCP/Sources/MCP/ConfirmationBroker.swift— injected ConfirmationPolicypackages/AgentCore/Sources/AgentOrchestrator/AgentOrchestrator.swift— wire bargeIn → cancelTTSwebview/src/...— dropsessionHistoryinbound handler; addlistTurns()on connectwebview/dist/— rebuild + commit atomic with Swiftpackages/Bus/Sources/Bus/Protocol.swift— strict 2.4.0packages/Harness/Tests/HarnessTests/TurnScenarioTests.swift(new)Test contract
Scenarios
S-TURN-001..S-TURN-018. Both transport modes mandatory.cancelTurn(t1)succeeds, no furthert1events;turnEnded(t1, .cancelled)is lastseq == prevSeq + 1acrosstokenStreamed/thinkingStreamedper turnturnTextCompleteemitted between lasttokenStreamedandturnEnded(DOM scroll ack remains vitest)ttsEnded(.cancelled)thenturnStarted(new)Acceptance criteria
bash scripts/check-orchestrator-events-single-consumer.sh(single fanout drainer) greenbash scripts/check-bus-protocol-version.shgreen for2.4.0strictbash scripts/check-bus-harness-parity.shgreenbash scripts/check-app-builds.shgreenbash scripts/check-no-evaluate-javascript.shgreenbash scripts/check-no-schema-migration-in-turn.shgreen (no schema delta in M-7 — Failure Mode 5).inProcessActorrunner.jsonRoundTripWebViewrunnerturnTextCompleteemitted between lasttokenStreamedandturnEndedCarry-forward closures
turnTextCompleteAPI event lands; DOM scroll ack out of harness scope (R-014 / G-006)Dependencies
Sub-issues
Estimate
5.0–7.0 engineer-days
Source
.planning/architecture/JARVIS-API-MIGRATION-PLAN.md§2.8 + §4 (webview lockstep) + §5.5 (Failure Mode 5 no schema migration).planning/architecture/JARVIS-API-DESIGN-v0.1.md—Turnsurface.planning/architecture/JARVIS-API-DESIGN-v0.2.md— F-004, F-005, F-007, F-013, F-018, F-019, UQ-4 bargeIn on Turn.planning/architecture/REVIEW-MIGRATION-RISK.mdR-002, R-008, R-009, R-014, R-015, R-018