fix(activities): durable state machine across segment subprocesses
Realizer has produced zero records since 2026-04-04 because
ActivityStateMachine was constructed fresh per `sol think --segment`
subprocess, so self.state was always empty and the four ended-change
paths (gap-reset, idle, facet-gone, type-change) never fired.
Make ActivityStateMachine durable across subprocess boundaries: hydrate
self.state, last_segment_key, and last_segment_day from
<journal>/awareness/activity_state.json at __init__ when journal_root is
provided, and rewrite the snapshot in-place after each finalization.
Live single-segment construction passes journal_root=Path(get_journal());
batch (--segments) construction stays in-memory and does not touch the
awareness file.
Also: rename state-entry keys (_facet → facet, _segment → segment,
_segments → segments) consistently across stored state and the runtime
changes stream; _change stays runtime-only. Capture routing_day =
state_machine.last_segment_day or day before update() at both
finalization blocks so cross-midnight ended records land in the prior
day's <facet>/activities/<D>.jsonl. Tolerate the production legacy
flat-list shape on first hydration (one-shot promotion).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>