core/.gitignore
Shay f96bc2be43 feat(l10): always-on daemon/CLI — the process that runs the continuous-life heartbeat
The L10 heartbeat loop (run_continuous) had no process to drive it; `core always-on`
is that process — the T-experience spine made runnable. It ticks idle_tick on a wall-clock
cadence so the engine LIVES and LEARNS with no user turn, persists lived_life.json (the
workbench Lived Life surface) + the checkpoint, and resumes the SAME life on restart.

- chat/always_on.py: run_continuous gains unbounded operation (heartbeats=None, runs until
  stop) + an interruptible inter-beat wait (_sleep_until_stop) so shutdown latency is one
  slice, not the cadence interval. Persists the run's identity pack ids (resume-verdict
  faithfulness). on_heartbeat is now best-effort (a broken log pipe can't kill the life).
- chat/always_on_daemon.py (new): the daemon shell — a single-instance OS lock (fcntl.flock:
  kernel-held, atomic, auto-released on death — no stale window, no PID-reuse, no half-written
  race), SIGINT/SIGTERM -> graceful stop (handlers saved/restored), the continuous-life config
  FORCED on, ephemeral (--no-load-state) writes no durable artifact. Foreground + explicit:
  no hidden background execution (CLAUDE.md); only writes the engine-state dir it was given.
- core/cli.py: `core always-on [--interval --max-beats --no-load-state --quiet]` with per-beat
  + summary logging; validates --interval; reports IdentityContinuityError / IncompatibleEngine
  StateError (the "different life / newer build" cases) as clean refusals, not tracebacks.
- workbench/readers.py: ENGINE_STATE_ROOT now honors CORE_ENGINE_STATE_DIR (= the daemon's
  resolved dir), so the workbench can't be split-brained (reading REPO_ROOT/engine_state while
  the daemon writes elsewhere); the Lived Life resume verdict recomputes from the persisted
  pack config, not a default config (no false substrate_changed for a non-default-pack life).
- Lived Life absence state now points at the real `core always-on` command (loop closed).

Adversarial 4-lens review (lock/concurrency, signals/shutdown, invariants/trust-boundary,
test-vacuity/CLI) caught 16 findings; this fixes all real ones — the HIGH lock races (two
daemons over one life), the env split-brain, the IO-kill, the uncaught identity/schema errors,
the unvalidated interval, the ephemeral-artifact shadow, and the resume-verdict pack-id bug —
and closes the two test-coverage gaps it flagged (real SIGTERM path + config-forcing-at-the-
runtime boundary).

Tests (non-vacuous): 11 daemon (flock live-holder refusal, leftover-lock reclaim, unbounded+
stop, interruptible sleep, forced-config-at-boundary, no-load-state guard, REAL SIGTERM
subprocess) + the reader pack-id discrimination test (fails under the old default-config bug).
245 workbench+invariants+always-on Python green; frontend tsc + vitest green; `core always-on`
verified end-to-end (bounded, real SIGTERM graceful stop, interval rejection).

engine_state/always_on.lock is runtime state (gitignored, ADR-0146 pattern).
2026-06-14 17:33:16 -07:00

72 lines
1.8 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
# Private outreach / personal packet — never tracked
01_Anthropic/
# Agent working directories
.agents/
# Cowork/Claude tooling artifacts
skills-lock.json