core/core
Shay 18e25580f3 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:37 -07:00
..
capability feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195) 2026-05-23 18:55:34 -07:00
cognition feat(b4): engine-side leeway producer — populate LeewayEvidence (Wave M B4) 2026-06-13 20:22:39 -07:00
comprehension_attempt feat(contemplation): wire CMB into multi-organ router and failure registry (CMB-d) 2026-06-08 13:58:48 -07:00
contemplation feat: add tier2 reasoning evidence spine 2026-06-04 14:12:18 -07:00
demos fix(quarantine): drain all 60 quarantined tests — QUARANTINE=∅ (#267) 2026-05-25 11:22:12 -07:00
epistemic_disclosure fix(ask): canonicalize question/proposal path collision check 2026-06-10 12:44:46 -07:00
epistemic_questions feat(ask): add default-dark ASK serving gate helper 2026-06-09 09:17:14 -07:00
learning_arena feat: add tier2 reasoning evidence spine 2026-06-04 14:12:18 -07:00
physics feat(adr-0206): response-governance bridge scaffold (STRICT-only, inert) 2026-06-03 10:39:12 -07:00
proposal_review feat(proposal-review): pure idle_summary function (IT-a) 2026-06-07 22:25:00 -07:00
protocol feat(protocol): ADR-0140 CORE Trace Protocol v0 (#259) 2026-05-25 06:08:51 -07:00
reasoning feat(reasoning): field-wedge foundation — f64 embedding, lineage firewall, INV-27 2026-06-04 19:22:16 -07:00
reliability_gate feat(adr-0175): wire the PROPOSE step — autonomous loop closes (attempt->tether->ledger->propose) 2026-05-30 13:50:24 -07:00
response_governance feat(determine): calibrated disclosed estimation — the engine earns the right to guess (Step E) 2026-06-06 13:49:07 -07:00
sync feat(sync): export optional S3 adapter 2026-05-29 19:47:24 -07:00
__init__.py chore: fix package name, add core/__init__.py, ADR-0011, session note 2026-05-13 2026-05-13 10:44:42 -07:00
_safe_display.py feat(adr-0051): trust-boundary hardening pass 2026-05-18 07:09:55 -07:00
array_codec.py feat(edge): edge-deployment budget gate — deterministic per-turn persistence cost 2026-06-06 10:27:10 -07:00
cli.py feat(l10): always-on daemon/CLI — the process that runs the continuous-life heartbeat 2026-06-14 17:33:37 -07:00
config.py feat(config): add explicit default-dark serving gate fields 2026-06-09 10:24:28 -07:00
engine_identity.py feat(identity): L11 identity continuity — same identity across reboot, not just same bytes 2026-06-05 13:52:57 -07:00
epistemic_state.py feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00