Skip to content

feat(persona): add turn frame replay seed#1322

Merged
joelteply merged 1 commit into
canaryfrom
feature/persona-turn-frame-proof
May 16, 2026
Merged

feat(persona): add turn frame replay seed#1322
joelteply merged 1 commit into
canaryfrom
feature/persona-turn-frame-proof

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

Summary

  • add Rust PersonaTurnFrame as the CBAR-style layer above PersonaInboxFrame
  • derive a deterministic consolidated inbox chunk so a burst of room messages becomes one persona work frame
  • derive a replayable RagAssemblySeed without performing retrieval or adding fallback routes
  • export the new frame types from the persona module

Verification

  • cargo test --manifest-path src/workers/continuum-core/Cargo.toml --features metal,accelerate persona::turn_frame --lib
  • cargo test --manifest-path src/workers/continuum-core/Cargo.toml --features metal,accelerate persona::inbox --lib
  • precommit: TypeScript passed; clippy ratchet improved by one warning; browser tests skipped because jtag/core IPC prerequisites were not running
  • pre-push: TypeScript, ESLint ratchet, Rust compile, Rust tests passed

Notes

Native Docker image push failed in the pre-push image phase after creating the frozen worktree; the hook still allowed the Git push. This PR is a Rust persona library slice, but CI may require image verification before merge.

@joelteply joelteply merged commit dd09e1d into canary May 16, 2026
3 checks passed
@joelteply joelteply deleted the feature/persona-turn-frame-proof branch May 16, 2026 19:36
joelteply added a commit that referenced this pull request May 16, 2026
…PR-2) (#1323)

Stacks on #1321 (ArtifactKey + ArtifactSelector + Cadence types).
Adds three default-impl methods to ServiceModule:

- `artifact_subscriptions() -> Vec<ArtifactSelector>` — opt-in list of
  artifact streams this module wants delivery for. Default: empty.
- `cadence() -> Option<Cadence>` — wake-policy override. None preserves
  existing tick_interval semantics. Default: None.
- `on_artifact_available(&key, value) -> Result` — async handler PR-3's
  runtime will call when a producer publishes a matching key. Default:
  no-op Ok.

Non-breaking: every existing module (HealthModule, PressureBrokerModule,
CognitionModule, GpuModule, all 26+ ServiceModule impls in
modules/*.rs) compiles without edits. Opt-in only, same pattern as the
existing `handle_event` / `tick` / `command_schemas` defaults.

What this PR is NOT
- No runtime dispatch wiring yet (PR-3 — runtime calls
  on_artifact_available when a subscription matches a published key)
- No ModuleConfig field additions (artifact_subscriptions lives on the
  trait, not in config — keeps ModuleConfig stable + lets modules
  compute subscriptions from state if needed)
- No existing module opts in yet (Lane D's #1322 PersonaTurnFrame is
  the natural first consumer; once PR-3 lands they can subscribe)

5 tests covering:
- defaults: DefaultsModule sees empty / None / Ok across all 3 methods
- override + trait-object dispatch: OptedInModule sees subscriptions + cadence + custom handler through &dyn ServiceModule
- error propagation: handler Err bubbles up unchanged (PR-3's
  dispatcher will log + continue; pinned shape)
- heterogeneous walk: Vec<Arc<dyn ServiceModule>> with mixed opt-in
  status filters correctly (the exact dispatch shape PR-3 uses)

Validation: cargo test --features metal,accelerate service_module —
5/5 pass. Build clean on continuum-core.

Stacked sequence in flight:
- #1321 (PR-1, types) MERGED
- This (PR-2, trait surface) — opening now
- PR-3 (runtime dispatch wiring) — opens after Lane D consumer pattern
  stabilizes so I can wire to a real subscriber

Co-authored-by: Test <test@test.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant