feat: autonomic wakeup + single-file config headroom + self-improving-memory design (foundation for the system-aware catalog) - #2019
Open
joelteply wants to merge 4 commits into
Open
Conversation
…op — no more amnesiac/blind wakeups The pain, glass-boxed live: after a machine restart the core was down, so the agent woke AMNESIAC (recall returned nothing) and personas were absent (they exist only while the core runs). Wakeup + join were not yet autonomic. Slice 1 — agent wakeup self-heal (memory-bridge plugin): - lib.sh: new wait_for_core — bounded (CONTINUUM_WAKE_WAIT_SECS, default 4s) wait for the core to answer ping before recall, so an agent waking DURING a supervised restart window recalls instead of forgetting. Never starts the core (that REBUILDS — the supervisor's job); genuinely-down → degrade, exit 0, inject nothing. - session-recall.sh: gate recall on wait_for_core; ALSO fixes a live regression — the committed hook still called the dead `cu` binary (renamed → continuum in #2010), making agent recall a silent no-op on canary. Restores resolve_continuum + compact-source tuning + per-bullet MAX. lib.sh was untracked; now committed. Validated live: core-up emits the recall envelope; core-down waits the budget then exits 0 with zero output (never breaks a session). Slice 2 — supervisor honors explicit stop (install-service.sh): - macOS KeepAlive true → {Crashed: true}; Linux Restart=always → on-failure. Crash + reboot recovery preserved, but a clean `continuum stop` now STAYS down so a dev can take the core down freely and an operator can drain a grid node. plutil-lint + bash -n validated. Doc: docs/architecture/WAKEUP-AND-JOIN.md — the four-guarantee contract, the agent/persona asymmetry, and the pending follow-ups (install+validate on the dev box needs a clean cutover; reconcile continuum reboot with the supervisor). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… everyone goes through Making the VRAM/disk headroom fraction operator-settable WITHOUT the scatter it would otherwise cause. Recon found config_env::read/std::env::var already sprawled to 161 sites / 14 files with NO config manager — the anti-pattern the CONCURRENCY- STYLE-GUIDE forbids (per-module 'read(KEY).unwrap_or(default)' re-derivation). The fix (Joel: 'one concern, one file everyone goes through, it's fine'): typed getters in the ONE existing config file, config_env.rs — config_env::vram_headroom() (CONTINUUM_VRAM_HEADROOM) config_env::disk_headroom() (CONTINUUM_DISK_HEADROOM) both default 0.8 (leave 20% headroom for governor + peers; for disk the 20% doubles as the disk-full safety guard). A dedicated deep-learning FOUNDRY overrides to 1.0. Read-once (OnceLock, no file I/O on a hot budget tick — matches the guide's 'config loaded once at boot'), clamped to [0,1] so a fat-fingered 1.5 can't over-commit, garbage → warn + default. Pure parse_fraction is unit-tested (absent/empty/1.0/1.5/ -0.3/NaN/inf). Consumers call the getter; the ~160 legacy reads migrate boy-scout. NOT a ConfigDaemon: reading the guide corrected my first instinct — config is a load-once concern, and a watch-daemon trips forbidden-move #6 (parallel managers). Doctrine reconciled in the same commit: added the 'single-source exception (operator capacity policy)' carve-out to the guide's §'What lives in code, not env vars' + amended forbidden-move #2, so the next session reads the getter as correct, not slop to const-ify back. The sin is the scatter, not the override. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…hrough existing verbs The being-axis magic: a persona consolidates its OWN lived engrams in self-directed sleep, forgets the stale, generalizes into a LoRA, wakes up measurably better. NOT a parallel build — a loop through verbs that already exist (dream_consolidation + experience salience + dataset::from_turns + the L1-L3 flywheel + cognition/eval's humane snapshot #59 + genome page-in). The magic is the trigger + wiring + the lift>0 gate, not new cognition logic. VDD-gated slices, non-negotiables from the pipeline doc (measure a copy never the living persona; LLM decides; the fade is necessary; exam integrity; fail loud; non-directed lane so it never starves reactive responding — the coma-fix lesson). Slice 1 keystone: one persona, one self-directed cycle, PROVEN lift on a held-out probe against a snapshot copy. Design-first because this is the moat code — the pipeline STOP-doc + the personas-comatose memory both say don't reflex-code the brain at the tail of a long session (that's when the will_respond chatbot slop gets written). This doc makes the code a careful gated pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…mpletes the config slice
The config getter (config_env::vram_headroom()) now has its live consumer. The pin
fit-gate ('can this model physically fit', via live_host_budget/governed_host_budget
→ host_budget_from) reads the operator headroom instead of a hardcoded 0.80 const.
Default 0.80 = byte-identical behavior; a dedicated foundry sets 1.0 → bigger models
pass the fit check. BigMama's SystemProfile.serving_budget_bytes reuses
host_budget_from, so it inherits the override transitively (config-read-free).
Kept host_budget_from PURE: the fraction is threaded as an INPUT (budget_fraction on
HostBudgetInputs — the struct's own doc blesses 'a new input = one added field'), read
via the getter at the live call sites, explicit in tests. So a test can't go
environment-dependent (the #72 anti-pattern). Removed the SERVING_BUDGET_FRACTION const
(single source now the config getter); all 6 construction sites updated; host_budget
test green.
SCOPED, not over-reached: the AUTONOMIC tick sizes serving by the pressure-adaptive
drive-mode fraction (mode.serving_fraction(): Performance 1.0 / Comfort 0.80 / Eco 0.55),
NOT this const — so this touches ONLY the fit-gate. Whether a foundry's headroom should
also lift the drive-mode CEILING is a real governor-policy question (careful not to
double-discount, per the #56/G8 comment) — that's the SystemProfile/governor follow-up,
coordinated with BigMama, not a naive same-edit here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Foundation slices from this session, all validated (cargo check green, unit tests pass). Unblocks BigMama's PR #2018 rebase (the config getters + the budget_fraction field on HostBudgetInputs).
Commits
cu→continuumrecall regression; KeepAlive crash-only so a cleancontinuum stopstays down. + docs/architecture/WAKEUP-AND-JOIN.md.config_env::vram_headroom()/disk_headroom()(default 0.8, foundry 1.0, cached, clamped), the ONE config concern everyone goes through; CONCURRENCY-STYLE-GUIDE reconciled (the sin is the scatter, not the override).SERVING_BUDGET_FRACTIONconst →config_env::vram_headroom()threaded asbudget_fractiononHostBudgetInputs(host_budget_from stays pure); all 6 sites updated. This is the field BigMama's serving_budget_bytes needs.Coordination
BigMama's #2018 (system-aware catalog) rebases on this + adds
budget_fraction: config_env::vram_headroom()to serving_budget_bytes → green. Reviewed #2018: strong LGTM.🤖 Generated with Claude Code