Skip to content

Add Continuum's own .continuum configuration - #22

Merged
joelteply merged 2 commits into
mainfrom
fix/update-readme
Apr 9, 2025
Merged

joelteply merged 2 commits into
mainfrom
fix/update-readme

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

This PR adds self-dogfooding to Continuum:

  • Adds a configuration file for the project itself
  • Creates example adapter files ( and )
  • Updates README to reference the new file format conventions
  • Establishes a recursive self-application of our own principles

By using our own tool to configure how AI should help us build Continuum, we create a perfect recursive example. This configuration provides guidelines for AI assistants working on the Continuum codebase, with proper protocols for development style, modular design, and testing approaches.

Copilot AI review requested due to automatic review settings April 9, 2025 03:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • .continuum: Language not supported
  • examples/continuum.claude: Language not supported
  • examples/continuum.gpt: Language not supported

@joelteply
joelteply merged commit 11832b1 into main Apr 9, 2025
@joelteply
joelteply deleted the fix/update-readme branch April 9, 2025 03:49
joelteply added a commit that referenced this pull request Nov 30, 2025
joelteply added a commit that referenced this pull request Nov 30, 2025
Add Continuum's own .continuum configuration
joelteply added a commit that referenced this pull request Jun 19, 2026
…to a live core (#1690)

Unit tests in mcp_protocol/mcp_transport mock CommandDispatch, so they never
exercise the socket transport reaching a real core — exactly the gap that let
the airc self-peer timeout (continuum-mcp #21) slip past green unit tests.

This integration test rebuilds the EXACT composition the continuum-mcp bin
ships (CoreIpcTransport → Connection → ConnectionDispatch → McpServer) and
round-trips initialize → tools/list → tools/call against a live core:
- initialize handshake survives the real transport (ids line up, serverInfo set)
- tools/list round-trips to the real command catalog (non-empty, meta tools present)
- tools/call maps + dispatches through the socket (well-formed CallToolResult)

Follows the repo's skip-if-no-live-core convention (reuses tests/common; like
call_server_integration / ipc_voice_tests): with `npm start` up it exercises
the live path, otherwise it skips cleanly so plain `cargo test` stays green.

The hermetic in-process-serve variant (boot a minimal runtime on a temp socket
so this runs in CI without npm start) is the tracked depth follow-up (#22).

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Jul 27, 2026
…physical expert paging (#2036)

* feat(inference): cold_expert_offload_ot — the -ot builder for K3 slice-1 physical expert paging

My half of the buft-override relaunch joint (#22, with BigMama's ServingExpertPager). Experts
are STACKED per layer (blk.N.ffn_*_exps is one tensor = all that layer's experts), so
-ot/--override-tensor — which places WHOLE tensors — pages MoE experts at LAYER granularity.
The residency planner owns the VRAM fit and produces PlacementRequest.hot_layers (the real
blk.N indices that fit GPU); this emits the inverse: cold = (0..n_layers) minus hot_layers,
offloaded to CPU as one -ot value `blk\.(c1|c2|..)\.ffn.*_exps=CPU`.

Robustness by construction: dense (non-MoE) blocks in the range are HARMLESS — they have no
ffn_*_exps tensor so their pattern is inert, which is why the builder needs only the hot set
+ the total block count, never the exact MoE-layer set. Block index is `\.`-anchored on both
sides so blk.3 never matches blk.31; the pattern covers all four stacked projections
(gate/up/down/gate_up). Returns None when nothing is cold (never an empty -ot, which
llama-server rejects) — the caller omits the flag.

Pure + unit-tested (mixed hot/cold, all-hot→None, empty-hot→all, out-of-range hot ignored,
zero layers→None). The wiring — ServingTarget.expert_placement + the -ot injection at the
Command build + the relaunch diff beside adapter_paths() — lands when BigMama's
PlacementRequest struct merges. True per-expert paging (no relaunch) is slice-2: a ~5-line
llama.cpp fork exposing the internal llama_model::get_tensor + the already-public
ggml_backend_tensor_set sub-range upload.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(capacity): PlacementRequest + layer-granular residency — the slice-1 buft-override seam

The K3 relaunch places experts via llama.cpp -ot, which places WHOLE stacked
tensors (blk.N.ffn_*_exps = all of layer N's experts in one blob). So slice-1
placement is LAYER-granular, not per-expert (per-expert is slice-2's upload fork).
This lands the pager's half of the seam with M5's -ot builder (#2036):

- plan_layer_residency (expert_residency.rs): aggregates the per-expert priority
  (the ONE ranking authority) to a per-layer score, fits whole layers by
  layer_bytes (= expert_bytes * n_experts_per_layer) within the 0.80 serving VRAM
  budget. Returns real blk.N indices, ascending. Degenerate-safe (unsized → place
  nothing). The pager owns the fit so the launcher never overflows.

- PlacementRequest { gguf_id, n_layers, hot_layers } (placement.rs): the shared
  seam type M5's llama_server.rs consumes — hot_layers = GPU-resident blk.N,
  complement -ot'd to CPU; n_layers = total block count (the -ot ceiling).

- ServingExpertPager::tick_layer_placement + mark_layer_relaunched (serving_pager.rs):
  the slice-1 driver pass — builds the decayed+predicted activation (shared with the
  per-expert tick via current_activation), plans hot layers, and decides relaunch on
  hot-layer-set churn beyond the threshold (a process respawn reloads every weight,
  so a 1-layer flap must not thrash it). LayerPlacementOutcome carries the request +
  needs_relaunch.

Seam locked with M5 on airc: I own the VRAM fit, she owns the -ot args + the
ServingTarget.expert_placement relaunch diff. Two new tests pin the layer fit and
the driver relaunch-signal. cargo check --lib --tests clean on the 5090 (capacity
files); the only build errors are the pre-existing tests/ unix harness (Windows).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc

* feat(inference): wire ServingTarget.expert_placement → -ot at spawn (K3 slice-1 consumer)

Completes my consumer half of the buft-override relaunch joint. ServingTarget now carries
Option<PlacementRequest> (BigMama's #2037 seam type); ServingTarget::expert_ot_value()
delegates to cold_expert_offload_ot(hot_layers, n_layers); and the spawn Command build
injects --override-tensor <value> right after --lora when a placement is present (None /
all-hot → no flag, since llama-server rejects an empty -ot).

The relaunch on a hot-set change is DECIDED by the pager (serving_pager's relaunch_needed),
NOT the probe-based ensure_model_serving diff — there is no API to read a running server's
-ot, so the placement can't be probed; the pager tracks served-vs-desired and drives the
respawn, which rebuilds the ServingTarget with the new placement and this applies it.

All existing ServingTarget construction sites default expert_placement: None (eval lanes run
the whole model; the base serving target starts unpaged). The one remaining bridge — the
ServingExpertPager attaching Some(placement) to the live lane's target — is BigMama's
serving_pager lane; the consumer is ready for it.

NOTE: this branch temporarily merges feat/layer-placement-seam (#2037) for the
PlacementRequest type; rebases onto canary once #2037 lands (dropping the merged commits).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Sep 27, 2026
… allocated only if it fits, under the caller's GPU budget), #22/#24 (lived examples: tools, train:false), #5/#16 (Metal backward). This is what continuum install builds her engine from.

Validated on the 5090 at this tip (test server in a 10 GB job object): window 512 trains (graph
2.58 GB), window 6144 refused before allocating, masked examples 1979/2177 trainable, text path
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
joelteply added a commit that referenced this pull request Sep 27, 2026
…mory budget (+ pin to the trunk with fork #23) (#4458)

* refactor(genome): the engine trainer's /train contract is typed (serde), and the lease goes to the engine as its memory budget

The /train body was assembled field by field with json! and the status read back as raw Value:
no schema, so a renamed or missing field was a silent wrong value. Now:
- TrainRequest / EngineExample (serialize) and TrainStatus / TrainState / EpochReport
  (deserialize) are the one statement of the fork's wire contract. `state` is required (a body
  without one does not parse and is retried, never read as "not ours"); an unknown state is
  TrainState::Unknown and counts as possibly running.
- memory_budget_mib = the job's governed lease: the engine refuses a graph over it BEFORE
  allocating (fork #23), instead of spilling past physical VRAM on Windows.
- the footprint recorded per shape is the engine's own measured graph_mib (exact) instead of a
  sampled VRAM peak; the sampling (ResourceDaemon reads, AtomicU64) is gone.
- a run that reaches done while being cancelled leaves no adapter behind (Fable's note on #4443).

Tests: genome::fine_tuning 113/113; the progress test also pins the schema (no state = no parse,
an unknown state = Unknown).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc

* chore(llama): pin 7772f3f9f — the fork trunk with #23 (training graph allocated only if it fits, under the caller's GPU budget), #22/#24 (lived examples: tools, train:false), #5/#16 (Metal backward). This is what continuum install builds her engine from.

Validated on the 5090 at this tip (test server in a 10 GB job object): window 512 trains (graph
2.58 GB), window 6144 refused before allocating, masked examples 1979/2177 trainable, text path
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply added a commit that referenced this pull request Nov 14, 2026
…oint, Ratio, Result ledger

Review of #5987 (~/.continuum/evidence/js-shaped-rust-2026-11-14/review.md):
- #4 page_store_pool: Ratio newtype built only from a part and a nonzero whole; StorePressure
  { own, volume: Option<Ratio> }; an unread pressure never keeps (ColdPages::Yield); no .max(1)
  or map_or(0.0). The dyno fixture records bytes, not ratios.
- #5 CheckpointFailure<E: Error> (own file, thiserror): Engine(E) | Admission(String) |
  Save { slot, kind: SaveFailure::{Rejected, Unresolved, Uncertain} }; no format! sentences.
  checkpoint_residents returns OwnedCheckpointRefusal variants instead of strings;
  AdoptedCheckpointRefusal::Save carries { slot, kind }.
- #6 page_io::checkpoint_endpoint -> StopCheckpoint { Ended, EngineChanged, Saved,
  Failed(CheckpointFailure) }; no Err(()) -> String, no Option wrapper.
- #7 PageAction { Save, Restore, Erase } (serde lowercase on the wire via .query());
  every kv_page_action / page_action caller, the receipt judge and UnresolvedPage migrated.
- #21 SavedLedger::load -> Result<LoadedLedger, LedgerUnread>; Unreadable(io::ErrorKind).
- #22 CheckpointSave: consuming confirmed()/rejected(); unanswered drop quarantines.
- #23 stop probes keep residents as Probed<u64>.
- #24 broker sorts with total_cmp.
- low: probes record the enums with Debug; the as_str tables are deleted.

Not compiled locally (the M5 is serving); CI is the compiler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 14, 2026
… for a volume others filled, and a cold boot names why (#5987)

* A restart restores every mind warm: the page store keeps minds' pages for a volume others filled, and a cold boot names why

Serves resident minds' speed across a deploy (path step 1, order-of-work line 3b): a
restart should cost a mind a ~1 s page restore, not a full re-prefill of her context.

The save at stop, the format-keyed ledger and the restore before her first act already
exist and are tested (page_io::checkpoint_every_endpoint, SavedLedger fingerprint,
every_mind_resumes_where_she_left_off_across_a_stop_and_a_boot). What failed on the M5
2026-11-13: the KV page store gave 29 paged-out minds' confirmed pages to a High-tier
volume request (volume 0.85, store 3% of its budget) between 22:40Z and 00:50Z, and the
23:45Z boot's ledger restored nothing (ledger_attached loaded=0, every first act
cold_turn cause="no_page"), with no reason anywhere.

- page_store_pool: confirmed minds' pages (rung 3) yield only to the store's own
  budget pressure (High+) or a Critical volume (ColdPages); dead pages still go under
  any pressure; a keep is a typed decline (minds_pages_kept), probed on change only.
- broker: High relieves the first pool, in pressure order, that frees bytes, so a pool
  that keeps what it holds passes the request on (drops the unwrap_or(&[]) fallback).
- saved_ledger: why a ledger restored nothing is a typed LedgerUnread; a missing
  ledger is probed instead of silently returning empty.
- page_io: the stop names every endpoint it did not checkpoint (adopted engine, no
  paged engine) and probes before the drain, so a cut stop still says whom it saved.
- dyno 11 (restart.rs + fixtures/dyno/2026-11-13-restart.json): four recorded residents
  (253,321 tokens) cold: last acting at ~401 s; warm: 0 re-prefilled, ~5.6 s of restores
  plus ~13.5 s in the stop; a paged-out mind keeps her page under the recorded pressure.

Not compiled locally (the M5 is serving); CI is the compiler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The stop saves every resident at once and ends on events, not a stopwatch; ratchets fixed

Joel (2026-11-14): independent work runs concurrently, never serial minutes; RTOS rule 10
(#5986): no timeout or sleep decides flow in the save/restore path.

- engine_generation::checkpoint_pool issues every resident's save at once and joins on
  their receipts (was one await per slot). page_io checkpoints every endpoint at once.
- page_io::settle waits on the admission gate's drain event (new AdmissionGate::drained,
  a Notify fired when the last permit releases) instead of a 50 ms poll under a deadline;
  the stop's checkpoint no longer runs under tokio::time::timeout(cap) and no longer skips
  on a spent budget. A page action that never answers ends through kv_page_action's own
  error events.
- Restores were already per mind: each mind's first act restores her own page inside her
  own admission and waits on that receipt only.
- The fork serializes page tasks: one task loop (tools/server/server-queue.cpp:138-153,
  save server-context.cpp:2809/2960, restore 2996/3076 at cd2e16d87). Measured 00:18:13Z:
  two restores issued at once, Benchy wait_ms 1,024 = Aris engine_ms 1,012.
- dyno 11 models the engine's page lanes: one lane (today) stop 13.5 s, restores to 5.6 s;
  overlapped, stop = largest save 4.9 s and each mind only her own restore (max 2.0 s).
- Ratchets: the ledger writes through durable::write_replace (no fs::write); restart.rs is
  #![cfg(test)] (one test mod in dyno.rs); the broker's unwrap_or carry their reasons.

Not compiled locally (the M5 is serving); CI is the compiler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The dyno table's row 11 is a doc line

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Typed seams for the restart path: PageAction, SaveFailure, StopCheckpoint, Ratio, Result ledger

Review of #5987 (~/.continuum/evidence/js-shaped-rust-2026-11-14/review.md):
- #4 page_store_pool: Ratio newtype built only from a part and a nonzero whole; StorePressure
  { own, volume: Option<Ratio> }; an unread pressure never keeps (ColdPages::Yield); no .max(1)
  or map_or(0.0). The dyno fixture records bytes, not ratios.
- #5 CheckpointFailure<E: Error> (own file, thiserror): Engine(E) | Admission(String) |
  Save { slot, kind: SaveFailure::{Rejected, Unresolved, Uncertain} }; no format! sentences.
  checkpoint_residents returns OwnedCheckpointRefusal variants instead of strings;
  AdoptedCheckpointRefusal::Save carries { slot, kind }.
- #6 page_io::checkpoint_endpoint -> StopCheckpoint { Ended, EngineChanged, Saved,
  Failed(CheckpointFailure) }; no Err(()) -> String, no Option wrapper.
- #7 PageAction { Save, Restore, Erase } (serde lowercase on the wire via .query());
  every kv_page_action / page_action caller, the receipt judge and UnresolvedPage migrated.
- #21 SavedLedger::load -> Result<LoadedLedger, LedgerUnread>; Unreadable(io::ErrorKind).
- #22 CheckpointSave: consuming confirmed()/rejected(); unanswered drop quarantines.
- #23 stop probes keep residents as Probed<u64>.
- #24 broker sorts with total_cmp.
- low: probes record the enums with Debug; the as_str tables are deleted.

Not compiled locally (the M5 is serving); CI is the compiler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* An unread ledger binds nothing in the or-pattern

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The cut-checkpoint test cuts after slot 0's concurrent save is confirmed

Saves are now issued at once, so the cancellation case waits for slot 1's held save
and slot 0's confirmation before it cuts, instead of relying on serial order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The stop's probe reads its typed failure (no dead field)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Tests borrow instead of cloning into calls (contract_shape stays at its base)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The broker test names the clone's type so it coerces at the call

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants