This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Epiphany/notes/fresh-workspace-handoff.md

8.4 KiB

Fresh workspace handoff

Updated: 2026-08-14

Current state

The five-day shakedown remains paused for architectural consolidation. The latest behavior cut is clean and pushed on codex/epiphany-shakedown-live at exact f90f1186.

The active campaign is now the hard Decision-Auditable Concurrent Mind migration. Its first foundation is implemented locally: typed content-addressed reasoning bases preserve exact source envelopes and a closed projection; terminal decision contexts preserve the exact native request, the provider request derived from it, and every ordered governed tool intent/receipt actually fed to the model. Worker model requests require a sealed basis, and structured role/reorient results plus their generic job result bind the terminal context. Tool-round-limit and repeated-tool-loop failures seal the last request context before worker failure. Model-session archives preserve their basis/context IDs, and fulfilled worker-attempt tombstones preserve and revalidate the exact decision context instead of collapsing it to a digest. Exact-envelope batch CAS merges disjoint Mind documents and explicitly refuses same-identity or changed-strong-read conflicts. Model failures, Persona stages, the remaining provider-error/timeout failure edges, Persona stages, Persona retention, keyed canonical Mind state, and keyed RepoModel remain to be cut.

Operational correction: the original c011 resident and Heartbeat containers are not alive; both exited 255 on 2026-08-11. Their named volumes are quiescent and remain untouched. Historical c011 zero-zombie and organ-circuit evidence is still valid, but it is not current liveness. Every copied public-Eyes body is braked and stopped. Yggdrasil remains the public crossing and never builds Epiphany.

Consolidation cut

The shakedown found the same missing invariants in different clothes. The consolidation now gives each repeated invariant one named owner.

  • causal_work_identity is the single pure derivation owner for Proposal Modeling, Research, frontier Planning, PlanMind, and Admitted Model Direction request identities. Runtime plus immutable admitted cause determine identity. Coordinator thread and timestamps are provenance only.
  • Coordinator launch cannot restore a superseded request thread into canonical state. The current admitted thread owns transport; the request's creation thread remains inspectable provenance.
  • ImmutableGithubSource is the single parser, validator, canonicalizer, and renderer for immutable public GitHub identities. Modeling selection, Eyes execution, and Mind receipt authentication use the same type.
  • Mind now independently rejects a malformed but internally self-consistent public-source receipt. Provider validation is no longer trusted as a substitute for admission validation.
  • runtime_worker_attempt owns the complete typed request-family association and process-status classification for one launch/process/result/archive family.
  • Self decides Research launch currency from the exact current causal frontier; a stale terminal Research role projection cannot suppress new Eyes work.
  • The typed RepoFrontierResearchRequest owns the exact allowed public-source set. One launch-to-request derivation is shared by Self coverage, Research acceptance, and final Mind revalidation. Capability grants, prompts, and locally inspected files are not substitutes for exact requested receipts.
  • RepoFrontierResearchLifecycle owns the exact current Research continuation. Resident Self, coordinator policy, and status consume its typed Launch/Review action. A completed superseded role lane is display history, not a launch suppressor or compensating repair path.
  • Worker reaping consumes the full ProcessInstanceIdentity, not a PID. The kernel wait occurs only after that exact incarnation is observed exited. A historical claim cannot reap a reused coordinator child.

Core passes 687 active tests with one intentional ignored cross-process helper. The packaged no-grant execution gate passed under --network none with byte-identical state and no receipt. Exact packaged f90f1186, release sha256-0e41c9106eb0e37a9cf3e7a4b67671d494b880b7e71fec65336a8c3e7e1129b4, witness sha256-a310c72292a44f950ce7b0ab469779d02e6edd1068670fe37f990f7d82846ee4, then completed two copied immutable-public-source Research/Mind acceptance cycles. Public tool receipts advanced from 53 to 61, Hands stayed false, and both daemons stopped braked with exit zero.

The preceding 08383c6d run is retained as falsification evidence: it proved the typed Research lifecycle cut, then died with ECHILD because PID-only reaping let a historical worker claim steal a reused coordinator child's wait status. f90f1186 removes the PID-only API and survived the same process turnover.

Authority map

  • Owner: causal work identity owns deterministic request identity.

  • Inputs: runtime identity plus the immutable proposal, admitted model/frontier, accepted result, candidate digest, or admission receipt appropriate to the explicit request family.

  • Outputs: deterministic typed request IDs.

  • Derived state: creation thread and timestamps are provenance; job, process, grant, model execution, and tool IDs own attempts beneath the request.

  • Forbidden writers: current coordinator thread, resident projection, launch callback, retry loop, and worker output cannot fork or repair request identity.

  • Shared paths: direct and resident launches consume the same derived identity; current admitted thread carries the launch without rewriting request provenance.

  • Cut line: family-local hash formulas, current-thread selection gates, and downstream thread-restoration behavior are removed or demoted.

  • Owner: immutable public-source identity owns GitHub identity grammar and canonical rendering.

  • Inputs: owner, repository, exact 40-hex commit, and bounded repository path.

  • Outputs: canonical lowercase revision, repository ref, and source ref.

  • Derived state: provider URL and receipt display fields.

  • Forbidden writers: tool output and mutually consistent JSON strings cannot define source identity.

  • Shared paths: Modeling, Eyes, and Mind call the same typed owner.

  • Cut line: the runtime composite parser and provider-local validators are gone.

Deliberately separate lifecycle authorities

Do not collapse these into one enum or service:

  • Heartbeat schedules and consumes acknowledgements.
  • Resident Self owns grants, leases, cooldown, cancellation, and requeue.
  • Coordinator owns one process incarnation and its terminal receipt.
  • Runtime worker attempt owns launch, exact process claim, result, and archive.
  • Mind decides adoption; fulfillment is evidence, not admission.

The narrow runtime_worker_attempt module now owns the serialized process-status vocabulary, live/fulfilled/failed/retry classification, and the complete set of typed request families carried by one launch. Runtime, resident, and coordinator consumers call those predicates and accessors instead of maintaining local string sets and parallel family arrays. Persisted documents and transactions are unchanged; the lifecycle authorities above remain separate.

Acceptance gates before shakedown resumes

  1. Every model-authored terminal decision or typed failure recovers its exact reasoning basis and terminal request after transcript/session retention.
  2. Persisted thread state, aggregate RepoModel revision/hash, timestamps, events, and role lanes can no longer manufacture or suppress current work.
  3. Concurrent disjoint Persona, Hands, Modeling, evidence, and Verification mutations merge; same semantic identity and changed strong reads refuse without partial writes or silent model-output rebasing.
  4. Run the fresh-store concurrent decision-audit capstone, including Body -> Modeling without Eyes and Eyes only for explicit external-evidence work.

Immediate next action

Finish decision-context ownership before normalizing state: bind model-backed failures and all three Persona stages, make their terminal commits atomic, and make session/worker/Persona retention preserve the Basis -> Context -> decision route after streams and transport scaffolding disappear. Then delete persisted thread-state authority and split canonical Mind and RepoModel into semantic-key documents under exact-envelope batch CAS. There is no writable-store migrator or compatibility read path. Do not touch the original c011 volumes, resume the shakedown, add capability surfaces, or build on Yggdrasil.