Repository navigation
Description
What and why
Lazy open, idle eviction with checkpoint and a bounded memory budget per world, measured against 1,000 idle and 100 active (20 ev/s, p99 < 50 ms) targets with the F11.8 harness. Lazy open, eviction and per-guest memory caps exist, but nobody has measured the targets and a world's total memory is not bounded.
Source
.opencode/plans/phase-12-platform-flexibility.md:51.opencode/plans/phase-12-platform-flexibility.md:19-20
Current status
Partial. Mechanisms exist from Phase 9/10: pkgs/id/src/world_hub.rs:7-15 (lazy single-flight open, session and open-world ceilings, idle eviction), and a per-guest linear memory cap of 16 MiB (pkgs/id/src/sandbox.rs:25-36). The per-world total memory budget with refusal tests landed in #4628. The F11.8 many-world measurement now exists; its p99 is 5,650.792 ms versus the 50 ms target, so that performance criterion remains open. The checkpoint/eviction/reopen integrity assertion passed for all 100 active worlds.
Acceptance criteria
- A per-world total memory budget is enforced, with refusal tests
- 1,000 idle and 100 active worlds (20 ev/s each, p99 < 50 ms) are measured with the F11.8 harness and the results recorded (measured p99: 5,650.792 ms; target missed)
- Idle eviction checkpoints and reopens without loss under that load
Size
L
Prerequisites
- id(ci): F11.8 benchmark harness with committed baselines #539 — D1-008 F11.8 Benchmark harness with committed baselines
Activity
dezren39 commentedon Oct 26, 2026
Intake review
Fleet-monitor intake pass (2026-10-26). Body already carries a full
## Acceptance criteriasection, so this pass is label normalization plus a liveness check — no body edit.Verified live on main
e3467560(2026-10-26): no per-world total memory budget exists —git grep -i 'memory_budget\|per-world.*memory' origin/main -- pkgs/id/srcfinds nothing; the per-guest linear-memory cap the body cites is still the only memory bound. The measurement half is also untouched (no harness run recorded). Still live; the body's "Partial" status assessment still holds.Related: prerequisite #539 (F11.8 benchmark harness with committed baselines) is still open and unenriched — the 1,000-idle/100-active measurement cannot be recorded without it. The metrics from #553 would make the budget observable once enforced.
Risks / notes: a per-world budget needs a defined refusal behavior when a world exceeds it (refuse new allocations vs. evict vs. poison) — that semantic choice should be made in the implementation plan, mirroring how the sandbox handles guest memory exhaustion.
Suggested approach: define and enforce the per-world budget with refusal tests first (verifiable without the harness), then run the scale measurement once #539's harness exists and record the numbers on this issue.
416 remaining items
dezren39 commentedon Nov 23, 2026
Progress from
felix: ack modes implemented on branch felix/557-ack-modes (design doc + JournalAckMode + FileJournal modes + WorldLimits plumbing + tests + BASELINES note). Laptop test run queued on the fleet build lock; PR follows once the journal suites pass.dezren39 commentedon Nov 23, 2026
agent-note:v1
event: slice-landed
by: agent felix (kind muse, Muse sandbox seat)
at: 2026-11-23
Landed for review: #12746 — selectable journal ack modes, per Drewry's 2026-11-22 decision (comment 7087900634). NOT merged; Felix reviews.
What it is:
JournalAckModeon the journal —Sync(default; the documented durability-before-ack contract, byte-for-byte the old behaviour),Batched(one sync per 64 appends; loss bounded to the unsynced tail),Async(no sync on the ack path; durability at sync points only). Selected per world viaWorldLimits::journal_ack_mode, plumbed throughopen_worldtoFileJournal::open_with_ack_mode; observable viaWorldJournal::ack_mode()andFileJournal::unsynced_appends(). Tradeoffs for all three levers (ack timing, the fdatasync primitive, and the rejected syncfs/fdatasync group-commit axis) are documented on the enum where the modes are defined and in the design recorddoc/2026-11-23T00-24-00Z_design_journal_ack_modes/. Transactions and compaction stay full sync points in every mode; the journal format and recovery scan are unchanged, so a mode switch on reopen replays identically. No new dependencies.Evidence (laptop, fleet-build-lock): fail-before — the six new tests alone on pristine origin/main fail to compile (26 errors, the whole mode surface missing). Pass-after —
cargo test -p id-worlds --lib journal_66 passed / 0 failed (incl. the five new mode tests);world_store::51 passed / 0 failed;world_limits_default1 passed; rustfmt clean. Clippy is environment-blocked on the laptop's shared target dir (E0514, the same failure the #1062 lane recorded); no new warnings touch the changed code.What remains on #557, unchanged by this slice: the unloaded laptop re-run of the many-worlds harness is still the deciding measurement and still outstanding — the modes are opt-in and the default path is untouched, so no existing baseline moves. A BASELINES.md section records the landing with no new number, per the decision's terms.
dezren39 commentedon Nov 23, 2026
Released by
felix(outcome: free). Selectable ack modes landed as PR #12746 (unmerged, for Felix's review): JournalAckMode sync/batched/async, WorldLimits plumbing, design doc, 6 tests green on laptop; #557 stays open for the unloaded re-run.dezren39 commentedon Nov 23, 2026
agent-note:v1
event: slice merged
by: agent felix (kind muse, Muse sandbox seat)
at: 2026-11-22
Merged: PR #12746 (2026-11-23T00:58:39Z) — selectable journal ack modes, implementing Drewry's 2026-11-22 ruling (comment 7087900634). Sync remains the default with byte-for-byte the old contract; Batched (one sync_data per 64 appends, loss bounded to the unsynced tail) and Async (durability only at sync points) are opt-in per world via WorldLimits::journal_ack_mode. The running mode is observable (ack_mode(), unsynced_appends() — always 0 in Sync), journal bytes and recovery are mode-independent (pinned by the cross-mode reopen test), and transactions/compaction stay full sync points in every mode. The tradeoff documentation sits on the enum and in doc/2026-11-23T00-24-00Z_design_journal_ack_modes/, with all three durability levers side by side including the fsync/syncfs group-commit axis (measured-and-rejected numbers carried from the Fix 2 record). Evidence: fail-before compile failure on pristine main (26 errors, surface missing); 66/66 journal tests + 51/51 world_store on the laptop under the build lock. No new dependencies.
Still outstanding on #557, unchanged: the unloaded laptop re-run of the many-worlds harness — the deciding measurement. No baseline number moves until a world runs in a relaxed mode and is measured.
dezren39 commentedon Nov 24, 2026
Fresh check: #557 is still OPEN. The only unmet criterion remains the reference-laptop p99 <50 ms measurement; the latest deciding run is 426.224 ms under heavy shared load. PR #12746 merged selectable Sync/Batched/Async journal ack modes with Sync still the default, so that does not resolve the criterion or change production behavior. Routed the next bounded slice as queued task 22182: expose benchmark-only ack-mode selection and measure the full workload in all three modes on an otherwise idle reference laptop, recording conditions and durability assertions. Keep #557 open; if all measurements remain >=50 ms, route the next optimization from the measured profile. Task: 22182 (repo-health-code-pilot).
dezren39 commentedon Nov 26, 2026
Merge-watch progress for PR #14233: the branch now includes current
main(a5c26fc17d77) via merge commit43fdcdd321f; its unique diff is limited to the benchmark selector, world-bench wiring, and per-mode results. The PR'sCloses #557reference has been corrected toRefs #557: the loaded 9–13 venue does not satisfy the outstanding idle reference-laptop p99 criterion, so this issue stays open. Current PR mergeability is clean. Targeted Fleet validation is running at 45832216915.dezren39 commentedon Nov 26, 2026
Base refresh correction for PR #14233:
mainadvanced again after the prior note. The PR branch now includesa965f0300c41via merge commit0b0b7436b2a; its four-file diff and non-closingRefs #557link remain intact. GitHub reports a clean merge state. The final-head Fleet follow-up is 45836271733; I will verify its checkout SHA and terminal result before merge.developing-today-fleet commentedon Nov 26, 2026
🤖 Agent note · verify-and-route verdict (queue task 24977, lane code-h, 2026-11-27)
Fresh state verified this pass:
Refs #557, not a closing keyword.Verdict: stays open; no new packet enqueued. Per the prior note (2026-11-24), the next step is the idle-laptop measurement; if all modes remain >= 50 ms, the next optimization routes from the measured profile. That routing happens once the measurement exists, not now.
developing-today-fleet commentedon Nov 27, 2026
Idle reference-laptop measurement — task 25926 (oc-code-03, 2026-11-27)
The laptop is reachable, but the required idle-machine gate is not met. Fresh check at 03:37 local: load average 7.78 / 6.11 / 6.71 on 16 threads, with multiple rustc compiler processes using roughly 90–151% CPU, active git work, Python, OpenCode, and codedb. I did not start any benchmark runs, so no results are claimed or fabricated.
Task 25926 is parked until the reference laptop is reachable and has no competing build or benchmark load. At that point, recheck processes/load and run the full Sync, Batched, and Async matrix; #557 remains open pending accepted idle measurements.
dezren39 commentedon Nov 27, 2026
Stand-down — lane 0437-A-C, queue task 25926, 2026-11-27. Premise check confirms this task is already parked (oc-code-03, 09:39Z): the measurement requires an idle reference laptop, the idle gate is not met, and this seat runs builds/tests by remote dispatch only — a hardware-specific idle-laptop benchmark cannot be satisfied from a GitHub-hosted runner. No duplicate attempt made. Wake condition unchanged: reference laptop verifiably idle, then run the Sync/Batched/Async matrix per the task acceptance.
developing-today-fleet commentedon Nov 28, 2026
Lane 1222-J (delta PRESS, 2026-11-28) — queue task 25926 gate re-verified, parking unchanged.
dezren39 commentedon Nov 29, 2026
Census 2026-11-29 (lane CEN-C01) — body + all 100 comments re-read. The body is accurate and current; consolidating the remainder so nobody has to re-derive it:
pkgs/id/benches/BASELINES.md). Prerequisite id(ci): F11.8 benchmark harness with committed baselines #539 is closed — the F11.8 harness exists.target_met=false, improved from 5,650.792 ms). Profiled dominant phase: per-append journalfdatasyncqueueing in the world actor persist path.append_batch+ actor-side drain), open andqueue/queuedbut unclaimed at last check. This issue closes when a recorded many-worlds run showstarget_met=true(or the target is formally renegotiated with evidence).small_fixbut the work is size L (a performance investigation) — it should be re-scoped/re-typed so a pickup lane is not handed an L investigation as a small fix.priority/normal→priority/high. Rationale: a ~91× miss on the id programme's headline scale target, with profiling complete and the fix phase (impl(id): group-commit batching for world journal appends — one sync per queued input batch (#7064 follow-on) #8239) already designed — this should sit above routine normal work.developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Gaps found: None material. Labels are complete and an
## Acceptance criteriasection is present. Priority was raised frompriority/normal(at enumeration) topriority/highbefore this census; that fits Phase-12-path work and was left as-is.Strengths: Quantified target in the title itself (1,000 idle / 100 active worlds with a per-world memory budget),
meta/enrichedbody, and full label coverage (kind, priority, status, queue, app, effort, source).Actions taken by this census: Verified complete — no changes needed.
developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix): full re-read (body, labels, all comments, edges) in the CODE-6 recovery pass. STRENGTHS: criteria accounting is exact — the per-world memory budget with refusal tests landed (#4628) and the checkpoint/eviction/reopen integrity assertion passed for all 100 active worlds; the sole open criterion is p99 latency (latest merged measurement 4,549 ms vs the 50 ms target, PR #10002, recorded in pkgs/id/benches/baseline.txt). PRIORITY VALIDATION: priority/high kept — this is a Phase-12 gate metric, important by the programme's own ordering (the
nowlabel agrees); not an age escalation. GAPS: the queue packet was typed small_fix for what is a size-L performance investigation — recorded in-thread as a packet defect (2026-11-17); a pickup must re-scope, not re-file. FIXES I APPLIED: none needed (the legacyenhancementlabel duplicates kind/feature but is harmless; left in place). REMAINS: the p99 investigation at size L; no Drewry decision needed.developing-today-fleet commentedon Nov 29, 2026
Gate recheck — lane code-h (2026-11-29, task 25926)
The reference laptop is reachable, but is not otherwise idle, so the accepted benchmark was not started. Fresh read via Fleet laptop shell: load average 6.90/16.47/16.29 on 16 logical cores; active CPU consumers include nix (60%), codedb (52%), gh (42%), find (36%), two OpenCode wrappers (~24% each), postgres, nix-daemon, and bun. Disk has 336 GB free (90% used). This does not satisfy the packet's idle-laptop requirement; another target would not satisfy it either.
No benchmark or file changes. Resume after competing work subsides; recheck load, then run the full Sync/Batched/Async matrix and record the requested distributions and integrity assertions. #557 remains open.