feat(persona): add turn frame replay seed#1322
Merged
Merged
Conversation
3 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PersonaTurnFrameas the CBAR-style layer abovePersonaInboxFrameRagAssemblySeedwithout performing retrieval or adding fallback routesVerification
cargo test --manifest-path src/workers/continuum-core/Cargo.toml --features metal,accelerate persona::turn_frame --libcargo test --manifest-path src/workers/continuum-core/Cargo.toml --features metal,accelerate persona::inbox --libNotes
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.