M-4: orchestrator history-load via Memory surface + cache-eligibility regression gate (R-006) #119

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

Goal

Refactor AgentOrchestrator history-load path to use Memory surface helper. Reframes the B-02 patch against the new surface. CACHE-ELIGIBILITY REGRESSION GATE (R-006): two short turns then a third produces ZERO streamTruncated retries. BLOCKING for merge.

Scope

  • Orchestrator pulls recent turns via Memory.listTurns (or substrate helper)
  • B-02 patch behavior preserved
  • Cache-eligibility regression test pins post-patch behavior

Files

  • packages/AgentCore/Sources/AgentOrchestrator/AgentOrchestrator.swift
  • packages/AgentCore/Tests/AgentOrchestratorTests/CacheEligibilityRegressionTests.swift (new)

Acceptance

  • Orchestrator history-load uses surface helper
  • BLOCKING: scenario S-MEM-CACHE-REGRESSION (two short turns then a third) produces zero streamTruncated retries
  • B-02 patch behavior preserved
  • All cache-eligibility scenarios continue passing

Test

S-MEM-CACHE-REGRESSION — BLOCKING gate. Existing B-02 regression test continues green.

Parent epic

#8

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.5 (M-4.5) + §3 B-02 patch
.planning/architecture/REVIEW-MIGRATION-RISK.md R-006

## Goal Refactor AgentOrchestrator history-load path to use Memory surface helper. Reframes the B-02 patch against the new surface. CACHE-ELIGIBILITY REGRESSION GATE (R-006): two short turns then a third produces ZERO streamTruncated retries. BLOCKING for merge. ## Scope - Orchestrator pulls recent turns via `Memory.listTurns` (or substrate helper) - B-02 patch behavior preserved - Cache-eligibility regression test pins post-patch behavior ## Files - `packages/AgentCore/Sources/AgentOrchestrator/AgentOrchestrator.swift` - `packages/AgentCore/Tests/AgentOrchestratorTests/CacheEligibilityRegressionTests.swift` (new) ## Acceptance - [ ] Orchestrator history-load uses surface helper - [ ] **BLOCKING:** scenario `S-MEM-CACHE-REGRESSION` (two short turns then a third) produces zero `streamTruncated` retries - [ ] B-02 patch behavior preserved - [ ] All cache-eligibility scenarios continue passing ## Test `S-MEM-CACHE-REGRESSION` — BLOCKING gate. Existing B-02 regression test continues green. ## Parent epic #8 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.5 (M-4.5) + §3 B-02 patch `.planning/architecture/REVIEW-MIGRATION-RISK.md` R-006
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#119