Skip to content

engine: assemble the facade cold-start identity derivation and live-session wiring #752

Description

@FSM1

Umbrella for completing the facade cold-start sequence — deriving the session identity and key material at login and assembling the live session behind the Engine::start surface.

Context

Engine::start is currently the frozen facade skeleton (#623 scaffolded it; lib.rs / facade.rs note that "the full cold-start sequence … lands with the pipeline slices"). It authenticates and wires background work, but it does not yet derive the session identity/key material or assemble the live-session data paths. #739 (Closes #697) wired the liveness re-PUT loop into start but had to defer every piece that needs derived session key material or the live resolve path — see the dependent issues below.

Scope

The cold-start sequence, end to end:

  • Challenge-signature login → Web3Auth key derivation (per the auth pillar; api: build identity auth, refresh rotation, and the ops baseline #624 landed identity auth + refresh rotation).
  • Session key material: per-scope read/write keys, per-name Ed25519Signers, writer pseudonym signers — the seeded per-scope derivation with key-regression epochs.
  • Live-session wiring: the resolve path, the held-record set, liveness-loop composition, and rehydrate-on-boot.
  • Determinism preserved: entropy/time enter via seam traits, never a direct clock/RNG.

Dependencies

Depends on (upstream):

Blocks

Notes

Part of the v2 build (v2-build), tracked in #655.


Remaining work (after #789 landed #748/#751/#750): the live-session resolve-tick driver

#789 landed the facade reads/command/events (#748), the held-record population logic (#751), and the EOL-renewal pass (#750) — all test-proven but dormant until a production driver populates the held set. This umbrella stays open for that live-session wiring:

  • Spawn the production resolve-tick loop (focus-window polling) that calls resolve_and_hold so the held set is populated from live resolves in start().

  • API base-URL config: the loop's ApiClient is currently built with an empty base URL (harmless while dormant). Wire the real API base (part of the auth/config surface, still Unimplemented) so EOL republication actually publishes.

  • Write-seed plumbing: resolve_and_hold needs the unsealed write_scope_seed in HeldMaterial, but the Adopted resolve outcome does not yet carry it — thread it through the resolve/gate path.

  • Surface renewal outcomes: the liveness loop currently drops eol_renew_pass's Vec<EolRenewResult> (marked #[must_use] in feat(engine): wire the facade cold-start pipeline and live resolve-tick driver #789 with an explicit call-site suppression), so a LostRace/PublishError is computed but invisible. When this driver wires the held set live, surface those (Event / dead-letter / retry) so a name can't silently lapse toward EOL.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp:enginecrates/engine — the stateful client brainv2-buildv2 rewrite build slice

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions