core/workbench
Shay 512453b6fc
feat(identity): split engine identity from build provenance (ADR-0220 PR C) (#774)
Removes code_revision from the engine-identity hash: engine_identity is now the
sha256 of the 5 ratified packs ONLY. The build revision is provenance (the
manifest's written_at_revision), not identity — so a behavior-neutral rebuild is
the SAME identity and the always-on daemon no longer flag-day strict-breaks on
every commit (the ADR-0220 defect).

Core:
- core/engine_identity.py: ratified_substrate/compute_engine_identity drop the
  git_revision arg (packs-only); add compute_legacy_engine_identity (reproduces
  the pre-split packs+rev hash, for migration verification), ENGINE_IDENTITY_SCHEME=2,
  IdentityReconciliation enum, and reconcile_loaded_identity — the single source of
  truth for the runtime guard AND the workbench reader.
- chat/runtime.py: the load guard reconciles via scheme. Current scheme -> direct
  packs-only compare. Legacy (code_revision-folded) stamp -> a VERIFYING migration:
  reconstruct the legacy hash from the persisted written_at_revision; a match proves
  packs unchanged (warn + re-stamp, resume, no break) — a mismatch means the packs
  genuinely changed (DIVERGED -> strict-refuse). Preserves 'distinct packs => refuse'.
- engine_state/save_manifest: stamp identity_scheme alongside engine_identity
  (additive-optional; no schema_version bump).
- workbench/readers.py: continuity reader uses the same reconcile (no phantom break
  on legacy checkpoints). cli.py break message reworded (packs, not 'build revision').

Callsite cleanup: drop the now-unused git_revision arg + imports across
always_on.py, evals/l10_always_on/runner.py, workbench/readers.py.

Tests:
- test_identity_provenance_split.py (new): 5 reconcile unit proofs + 3 runtime
  integration proofs incl. the wrong=identity defense (legacy stamp of DIFFERENT
  packs still strict-refuses) and the re-stamp migration.
- test_engine_identity.py: invert the code-revision test (rev no longer changes
  identity); assert the substrate is packs-only.
- Restore 3 lineage tests silently red since ADR-0219 (flat-path _manifest helper
  now resolves the gen-dir).
- Update remaining callsites/monkeypatches for the new signature.

Hygiene: .gitignore now covers the ADR-0219 gen-dir runtime files
(current, gen-*/, session_state.json, proposals.jsonl).

Verified: 59 identity/migration/lineage/workbench + 32 L10 + 76 invariants/cli +
34 smoke pass; serving lane SHAs unchanged (no derivation/reliability_gate touch).
2026-06-15 11:38:04 -07:00
..
__init__.py feat(W-026): read-only workbench API (ADR-0160 Phase 1) (#292) 2026-05-26 10:16:35 -07:00
api.py workbench(vault): exact-CGA recall evidence for persisted entries (#766) 2026-06-15 02:28:37 -07:00
calibration.py feat(workbench): land B3.5-b/c/d/e — calibration evidence subject, B4a leeway gate, docs; runner-reproducible practice artifact 2026-06-13 07:36:44 -07:00
evidence_bundle.py feat(workbench): Wave M D3 — shareable evidence bundles (reproducibility as a deliverable) 2026-06-13 17:26:26 -07:00
field_evidence.py feat(workbench): Wave M C3 field substrate — persist-first field evidence 2026-06-13 16:26:46 -07:00
journal.py feat(workbench): Wave M C3 field substrate — persist-first field evidence 2026-06-13 16:26:46 -07:00
lived_life.py feat(workbench): Lived Life surface — the always-on heartbeat made felt (read-only, persist-first) 2026-06-14 16:45:03 -07:00
logos.py feat(workbench): add read-only core-logos readers 2026-06-14 11:43:39 -07:00
pipeline_record.py feat(workbench): Wave M Phase C legibility — pipeline record, contemplation, identity continuity 2026-06-13 15:44:31 -07:00
readers.py feat(identity): split engine identity from build provenance (ADR-0220 PR C) (#774) 2026-06-15 11:38:04 -07:00
replay.py feat(workbench): Wave M C3 field substrate — persist-first field evidence 2026-06-13 16:26:46 -07:00
schemas.py workbench(vault): exact-CGA recall evidence for persisted entries (#766) 2026-06-15 02:28:37 -07:00
server.py feat(workbench): Wave M Phase C legibility — pipeline record, contemplation, identity continuity 2026-06-13 15:44:31 -07:00
tour.py feat(workbench): Wave M D1+D2 — guided determinism tour (provider-agnostic) 2026-06-13 19:39:41 -07:00