core/.gitignore
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

80 lines
2.2 KiB
Text

__pycache__/
.pytest_cache/
.hypothesis/
*.pyc
.DS_Store
*.egg-info/
traces/
.formation_cache/
workbench_data/*
!workbench_data/
!workbench_data/README.md
core-rs/target/
core-rs/Cargo.lock
uv.lock
# Environment secrets — never commit real keys
.env
.env.local
.env.*.local
# Benchmark report output
reports/
frontier_wave1.json
# Workbench UI browser-test artifacts
workbench-ui/test-results/
workbench-ui/playwright-report/
# Claude Code local session artifacts (per-developer, never tracked)
.claude/
# Local macro->micro system map — a per-developer NAVIGATION INDEX (like an IDE
# symbol index), NOT a project artifact. Regenerated on demand; never tracked.
.system-map/
# Runnable audit-passed showcases (ADR-0112 + ADR-0113) are generated on
# demand from the signed claim + on-disk lane result files. The inputs
# are committed; the renders are not.
evals/audit_passed/
evals/expert_demos/
# ADR-0119.7 — GSM8K sealed-holdout discipline. Only the encrypted
# .age file may be tracked; plaintext companions must never land in git.
evals/gsm8k_math/holdouts/v1/cases.jsonl
evals/gsm8k_math/holdouts/v1/cases_plaintext.jsonl
evals/gsm8k_math/holdouts/v1/cases-train*
# ADR-0172 W3 — math-contemplation proposals are generated on demand; the
# directory skeleton (.gitkeep) is committed, the generated JSONL is not.
teaching/math_proposals/proposals.jsonl
# ADR-0146 — engine_state/ is per-session mutable checkpoint state; only the
# module itself (engine_state/__init__.py) is tracked. Runtime-generated files
# are not source artifacts.
engine_state/manifest.json
engine_state/recognizers.jsonl
engine_state/discovery_candidates.jsonl
engine_state/lived_life.json
engine_state/always_on.lock
# ADR-0219 generation-dir checkpoint layout (the committed gen dir + pointer)
# and the CL proposal log — also runtime-generated, not source.
engine_state/current
engine_state/gen-*/
engine_state/session_state.json
engine_state/proposals.jsonl
# per-life idle frontier-contemplation runs — any engine-state root (incl. CORE_ENGINE_STATE_DIR).
contemplation_runs/
# Private outreach / personal packet — never tracked
01_Anthropic/
# Agent working directories
.agents/
# Cowork/Claude tooling artifacts
skills-lock.json