core/chat
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
__main__.py
always_on.py feat(identity): split engine identity from build provenance (ADR-0220 PR C) (#774) 2026-06-15 11:38:04 -07:00
always_on_daemon.py feat(l10): always-on daemon/CLI — the process that runs the continuous-life heartbeat 2026-06-14 17:33:37 -07:00
anaphora.py feat(adr-0066): session-thread context + opt-in anaphora prefix (Phase 3.1 + 3.2) 2026-05-18 17:01:34 -07:00
articulation_telemetry.py feat(contemplation): Phase 5 — articulation-quality miner closes the loop 2026-05-21 10:55:39 -07:00
ask_runtime.py feat(ask): add runtime-facing ASK helper module 2026-06-10 03:34:02 -07:00
atom_equivalence.py feat(telemetry): ADR-0078 Phase 1 — composer/graph atom equivalence (observational) 2026-05-20 06:14:25 -07:00
cross_pack_grounding.py feat(register): R1–R4 register pack subsystem — deterministic surface variation 2026-05-19 16:52:36 -07:00
dispatch_trace.py chore(chat): dispatch trace for grounding-source dispatcher (ADR-0142 debt #2) (#233) 2026-05-24 15:22:02 -07:00
example_surface.py feat(register): R1–R4 register pack subsystem — deterministic surface variation 2026-05-19 16:52:36 -07:00
narrative_surface.py feat(register): R1–R4 register pack subsystem — deterministic surface variation 2026-05-19 16:52:36 -07:00
oov_surface.py feat(adr-0066): NARRATIVE + EXAMPLE intents with multi-clause composers (Phase 3.3 + 3.4) 2026-05-18 17:01:55 -07:00
pack_grounding.py feat: ADR-0086 + ADR-0087 + 100-register catalog — cognition lane closure 2026-05-21 00:08:12 -07:00
pack_resolver.py feat(packs): reland en_core_syntax_v1 foundation vocabulary (collision-audited) 2026-05-31 16:18:26 -07:00
pack_surface_candidate.py feat(pack-grounding): selector-ready gloss wiring via PackSurfaceCandidate 2026-05-19 07:26:46 -07:00
partial_surface.py feat(adr-0065): OOV cliff → five-tier honesty gradient (Phase 2.1 + 2.2) 2026-05-18 16:41:45 -07:00
refusal.py
register_substantive.py feat(register): ADR-0077 — substantive register knobs + layering boundary (R6) 2026-05-19 23:39:11 -07:00
register_variation.py feat(register): R5 — operator-visible register telemetry + tour demo 2026-05-19 19:03:07 -07:00
runtime.py feat(identity): split engine identity from build provenance (ADR-0220 PR C) (#774) 2026-06-15 11:38:04 -07:00
teaching_grounding.py feat(adr-0083): transitive (multi-hop) teaching-grounded surface (#63) 2026-05-20 14:11:40 -07:00
telemetry.py feat(W-024): reboot_event audit trail entry (L10b.3, ADR-0158) (#284) 2026-05-25 20:37:00 -07:00
thread_context.py feat(adr-0066): session-thread context + opt-in anaphora prefix (Phase 3.1 + 3.2) 2026-05-18 17:01:34 -07:00
verdicts.py feat(adr-0039): audit completeness — TurnVerdicts bundle, stub TurnEvent, hedge_injected 2026-05-17 21:32:46 -07:00