Skip to content

fix(compliance): seed 3.1 provenance accounts and isolate replays - #8590

Merged
bokelley merged 1 commit into
3.1.xfrom
backport/3.1.x-provenance-account-fixtures
Oct 29, 2026
Merged

bokelley merged 1 commit into
3.1.xfrom
backport/3.1.x-provenance-account-fixtures

Conversation

@bokelley

@bokelley bokelley commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Refs #8533; adapts the account prerequisites from #7601/#7602 to 3.1.x. The three provenance scenarios and creative_reception now declare the sandbox account they reference. Their natural-key AccountRefs explicitly use sandbox: true; one identical fixture ID across all four permits idempotent rotated runs without 3.2's operator_unit field.

The sales tenant registers its existing native seed_account adapter outside frozen 3.0 mode. A replay-cache collision found during review is also closed: the SDK cache is bounded and namespaced by the router's trusted caller identity. Different callers can use the same fixture/correlation IDs without poisoning each other's setup; same-caller divergent replays remain rejected. Native authentication, schema validation and sandbox gates are preserved.

No production/test SDK pin, protocol schema, package version or released artifact changes. A patch changeset records the conformance-source correction.

Validation in Docker:

  • Complete fixture suite: 38 pass, zero skips. New controls cover all four cold prerequisites, every rotated four-scenario order, schema-valid sandbox references, omitted fixtures and rejected seeding. These probes establish setup ordering, not full conformance.
  • Four native MCP unit controls pass: cold and previously provisioned accounts, replay idempotency, two callers with different fixtures and a spoofed private identity field, plus frozen 3.0 rejection. Protocol/code/security review is clear after the caller-isolation correction.
  • Compliance and schema builds, typecheck, and Changeset scope/status pass.

Full authored MCP comparison against the actual 3.1 reference tenant and unchanged 3.1.30 schemas:

Scenario Base P/F/S This PR P/F/S
provenance_enforcement 4/2/2 5/2/2
provenance_truth_of_claim 2/3/0 3/3/0
provenance_audit_observation 2/2/2 3/2/2
creative_reception 4/0/0 5/0/0

Every added pass is account seeding. All existing failure details match byte-for-byte: malformed static product-card responses and modern-runner refusal of embedded_provenance after the old tenant negotiates 3.0. The comparison uses read-only baseline file overlays, identical dependencies/schema roots and all authored validations. This PR neither suppresses those failures nor claims the reference tenant is fully conformant. The unrelated old src/.../tenant-smoke.test.ts version expectation also fails unchanged on the base; new MCP regression controls are in the required server unit suite instead.

The source correction ships through the next 3.1 bundle; existing versions remain immutable.

Normal pre-commit hooks pass: 1,012 root unit tests, 4,370 server unit tests (30 existing skips), and typecheck. No hooks bypassed.


Open workspace in Conductor

@bokelley
bokelley requested a review from a team as a code owner October 29, 2026 18:30
@bokelley bokelley added this to the 3.1.x milestone 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 3.1.x backport with no blocking or medium findings.

Verified against the decision table:

  • No critical/high findings (row 1 n/a).
  • gated_paths: false (row 2 n/a).
  • high_risk: false — no deleted/modified high-risk entries (rows 3, 5 n/a).
  • No medium findings in any category (rows 4, 8 n/a).
  • No prior decision (row 6 n/a).
  • No no-auto-approve team match (row 7 n/a).
  • Falls through to row 9 → approve.

What was checked: seeds acct_acmeoutdoor_pinnacle_sandbox across the three provenance storyboards + creative_reception (natural-key AccountRefs, explicit sandbox: true, single shared idempotent fixture, no 3.2 operator_unit), and registers the sales seed_account adapter outside frozen 3.0 mode. The load-bearing change — createPrincipalScopedSeedCache (comply.ts) plus withControllerPrincipal wrapping the transport path (router.ts:313) — correctly namespaces the SDK replay cache by the trusted router principal, aligning it with the principal-scoped account store and closing the cross-caller false-"diverges" rejection. 'anonymous' defaulting is consistent; local comply path never touches the scoped cache; 3.0 mode omits the account seed. Cache built once (memoized registry), no new external I/O/timeout surface, changeset present (patch), scenario versions bumped 1.0.0→1.0.1. Strong test coverage for caller isolation, frozen-3.0 rejection, and cold/rotated prerequisites.

@bokelley
bokelley merged commit f1445df into 3.1.x Oct 29, 2026
12 checks passed
@bokelley
bokelley deleted the backport/3.1.x-provenance-account-fixtures branch October 29, 2026 19:43

Copy link
Copy Markdown
Contributor Author

Forward-merge preparation, comparing actual merged heads 3.1.x@f1445dfc and main@d1bdc77b:

  • The preview has nine content conflicts. Preserve main's existing trusted task scope, caller cache across all native tenant configs, task registry and modern router wrappers. The 3.1-only AsyncLocalStorage block adds a second same-named cache helper outside the conflict markers; remove that obsolete block when resolving into main.
  • Preserve main's operator-unit-aware fixture identities and both sandbox variants. Carry the storyboard version bumps and adapt the added cold/rotated prerequisite tests to complete modern natural keys. Account for the automatically added MCP test too; resolving only the marked paths misses it.
  • Preserve the narrow sales seed.account exclusion for frozen 3.0 and its refusal regression. A direct MCP probe on unchanged main/SDK17 confirms that frozen 3.0 omits seed_account from discovery but still accepts it. This is a separate compatibility follow-up to retain during integration.

Refresh the comparison when the next 3.1 versioned records are ready. Resolve the release-workflow test hunks narrowly, retain immutable records through the existing resolver, and rerun the adapted controls. The legacy wrapper and fixture shapes should not replace main's modern identity handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant