Skip to content

fix(training): backport caller-isolated controller replays to 3.2 - #8592

Merged
bokelley merged 1 commit into
3.2.xfrom
fix/3.2-controller-seed-replay-isolation
Oct 29, 2026
Merged

bokelley merged 1 commit into
3.2.xfrom
fix/3.2-controller-seed-replay-isolation

Conversation

@bokelley

@bokelley bokelley commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Backport #8591 to 3.2. Two authenticated callers can seed their independently owned sandbox accounts using the same correlation/account IDs without colliding in the SDK replay cache. The trusted tenant/caller scope namespaces the bounded native cache; equivalent replays still succeed and divergent replays by the same caller still fail.

The runtime changes and regression match main across all native tenant configurations. Retains 3.2.8, SDK 14.0.0-rc.53, existing authentication/sandbox gates, public/demo shared-fixture semantics and released artifacts. This app-only correction needs no protocol changeset.

Validation:

  • Five required local native-MCP endpoint controls with SDK 14: independent caller state, exact account readback, equivalent replay, divergent rejection, unchanged state after rejection, ignored ownership/session spoofs.
  • Independent code/security reviews are clear. Additional product-seed controls pass for independent brand sessions on all four applicable native routes.
  • Normal Docker pre-commit hook passes 1,174 root tests, 11,772 server tests (31 existing opt-in skips), and typecheck. Two local shards retain all assertions and timeouts; the existing worker diagnostic passes unchanged.
  • Normal Docker pre-push gates pass. The documented advisory local storyboard skip is used; GitHub's full matrix must pass and main must land before merge.

Refs #8589. The 3.1 account-fixture adaptation is #8590; legacy 3.1 non-account seed-cache behavior is a separate follow-up.


Open workspace in Conductor

@bokelley bokelley added this to the P0 Bugs milestone Oct 29, 2026
@bokelley bokelley added bug Something isn't working compliance-testing labels Oct 29, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean, well-scoped multi-tenant isolation fix.

This is a backport of #8591 to the 3.2.x line. It namespaces the SDK comply-controller seed-replay cache by the AsyncLocalStorage-established trusted caller scope (getTrainingCallerScope → requiredClientScope(undefined)), which caller-supplied __training_principal/__training_task_owner_scope fields cannot override. Scope is read lazily at replay time inside runWithTrainingTaskScope. All four seed-bearing tenant configs are covered; the underlying cache is built once at registry init so keys isolate rather than rebuild per request. The new test asserts cross-caller isolation plus same-caller divergence rejection across all five live routes.

App-only server change under server/** — correctly carries no protocol changeset; no static/schemas/source/, docs/reference/, or dist/** surface touched. No high-risk paths, no gated paths, no author team gate.

Reviewer surfaced no Critical/High/Medium findings. Falls through to row 9.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean backport of #8591 to 3.2.x (caller-isolated comply seed-replay cache).

Checked:

  • No critical/high/medium findings from the reviewer.
  • high_risk: false, gated_paths: false, no no-auto-approve team match, no prior decision.
  • Change scope is server/** app-only (mcp-task-store.ts, comply.ts + a unit test), not the published protocol surface (static/schemas/source/**, normative docs/reference/**, dist artifacts), so no changeset is required.
  • getTrainingCallerScope() reads the trusted ALS scope derived from the auth-set principal (router.ts:563), not caller-supplied body fields; spoofed __training_principal is overwritten at router.ts:498. Cache is namespaced per caller, with fail-closed behavior on missing scope. Regression test covers all five native tenants and verifies ownership/session spoofs are ignored.

No decision-table trigger (rows 1–8) fires; falls through to row 9.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean backport (#8591 → 3.2.x) of a caller-isolation fix for the training agent's SDK seed-replay cache.

createPrincipalScopedSeedCache (comply.ts:39) scopes every get/has/set by the trusted ALS-established caller scope, partitioning the shared per-registry cache by authenticated principal rather than caller-supplied fields. The new test proves isolation via __training_principal spoofing across all five tenants. App-only server code — no static/schemas/source/** or wire-shape change, so no protocol changeset required.

No findings. high_risk false, gated_paths false, no author team gate, no prior decision. None of rows 1–8 fire → row 9 approve.

@bokelley
bokelley merged commit e78d1d3 into 3.2.x Oct 29, 2026
64 of 66 checks passed
@bokelley
bokelley deleted the fix/3.2-controller-seed-replay-isolation branch October 29, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compliance-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant