Skip to content

Final interpreter memory profile on current main (post #5910): measure floor self-RSS + cgroup peak + whole-tree resolve RSS, chronicle vs memory PRs - #5919

Merged
briansrls merged 6 commits into
mainfrom
session/calm-ram-408
Jun 29, 2026
Merged

briansrls merged 6 commits into
mainfrom
session/calm-ram-408

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Execution-grounded interpreter memory snapshot on main post-#5910 (529fd65044 base). Adds claim_batch RSS probes (getrusage RUSAGE_CHILDREN + VmHWM), a measure_whole_tree_resolve bin, and docs/plans/interpreter-memory-chronicle.md with measured receipts vs the 14.2→5.5→5.1 GiB arc.

Canonical 8 GiB docker floor (spawn_width=1):

  • floor peak RSS: 5,495,361,536 B (5.12 GiB) — +0.7% vs 5.08 GiB target
  • cgroup peak: 5,699,862,528 B (5.31 GiB) < 8 GiB cap
  • no exit-137

Per-resolve probes: mock-precompute 32 MiB (#5833 held); first-entry resolve ~158 MiB; serial discovery corpus per-shard peak ~4.82 GiB. No regression vs #5867/#5833/#5878/#5893/#5910 structural prizes.

Test plan

  • ctrl-build --local release build of claim_executor, claim_batch, measure_whole_tree_resolve
  • Canonical floor: claim_executor in docker --memory=8g (log: calm-ram-408-floor-8g-v2.log)
  • claim_batch RSS probes on floor_effect_gate_witness.dag and --roster-from-discovery
  • measure_whole_tree_resolve on dsl production modules (468 modules, ~262 MiB)
  • CI (instrumentation-only; no behavior change expected)

Instrument claim_batch with getrusage children-max RSS probes, add
measure_whole_tree_resolve bin, and record canonical 8 GiB floor receipts
(spawn_width=1, ~5.12 GiB peak) vs the 14.2→5.5→5.1 GiB arc.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/calm-ram-408 branch from 4bd0865 to d7dbbb8 Compare June 28, 2026 22:04
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 28, 2026 22:05
Unblocks rust_tests fmt gate on PR #5919.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (claude-opus-4-7 APPROVE): Verified against current code — finding is valid, no code changes required. The instrumentation matches the review: claim_batch emits [measurement] RSS lines via /proc/self/status VmHWM and a Linux-gated getrusage(RUSAGE_CHILDREN) shim (144-byte rusage buffer, lp64 offset comment); measure_whole_tree_resolve is a thin whole_tree_resolved_ctx wrapper; chronicle doc has the named dissolution trigger. No substrate / .dag / fail-open paths touched.

Prior rust_tests failure (run 28337539256): Reproduced locally — cargo fmt --all --check failed on claim_batch.rs line wrapping only (not compile/clippy/sccache). Fixed in d495ec47f0; run 28337805113 rust_tests is green. Full ci floor job still running on that commit.

— sent from calm-ram-408

@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (cursor/composer-2.5 APPROVE): Verified against current code — finding is valid, no code changes required.

The chronicle matches the ci-floor-fractal-gantt.md receipt pattern: authority disclaimer in the header (DESIGN.md + ci_floor_measurement.dag remain authority), execution-grounded numbers only, and a named dissolution trigger toward PerformanceReceipt / resource-aware scheduler Node A (§4 of chronicle). Rust diff is probe transport in existing seed bins (claim_batch, measure_whole_tree_resolve, wiring_liveness_whole_tree RSS line) — no new substrate authority or .dag units. No merge-blocking DESIGN violations found.

CI status on d495ec47f0: rust_tests green (run 28337805113); full ci floor job still in progress.

— sent from calm-ram-408

…nt getrusage layout.

measure_whole_tree_resolve now extends cli_run::FLOOR_DISCOVERY_EXCLUDES
instead of copying the floor roster; claim_batch documents the Linux lp64
ru_maxrss offset assumption per opus-4-7 review.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (claude-opus-4-7 APPROVE w/ two non-blocking notes): Both findings valid; addressed in d495ec47f0 follow-up commit.

  1. measure_whole_tree_resolve exclude list — was a parallel copy of cli_run::FLOOR_DISCOVERY_EXCLUDES (+ probe-specific extras). Fixed: base excludes now sourced from FLOOR_DISCOVERY_EXCLUDES; only the five whole-tree-probe extras (test/fixture/, /test/, nat_semiring_rung, two lens/application scaffolds) remain local with an explicit comment. Continuity debt in discover_owned_data.rs etc. unchanged (pre-existing).

  2. claim_batch getrusage shim — layout assumption documented (Linux lp64 x86_64/aarch64, 144-byte buffer, ru_maxrss @ offset 32; syscall failure → None). No libc dep added — acceptable for phase-0 scaffold per review.

Verdict: APPROVE stands; no substrate changes.

CI: awaiting green on new commit.

— sent from calm-ram-408

@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Correction: fixes are in 17b1d3d48d (not d495ec4). — sent from calm-ram-408

Fixes doc_graph_has_no_orphan_docs floor failure on PR #5919 — the
chronicle was an unreachable docs/plans orphan without an inbound link.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (cursor/composer-2.5 APPROVE, no findings): Verified against 6e5d8b8e79 — finding valid, no code changes required.

  • Chronicle follows ci-floor-fractal-gantt.md receipt pattern; dissolution trigger at interpreter-memory-chronicle.md:101 maps to ROADMAP 1-sched-resource-aware row (ROADMAP.md:112).
  • ROADMAP inbound link + roadmap_authority.dag authored_doc present (6e5d8b8e79) — clears doc_graph_has_no_orphan_docs (witness PASS locally).
  • measure_whole_tree_resolve sources excludes from FLOOR_DISCOVERY_EXCLUDES + probe extras; getrusage lp64 layout documented at claim_batch.rs:51-53.
  • ci_floor_measurement.dag carrier rows intentionally unchanged (chronicle is receipt-only).
  • Honest +20% vs pinned CI floor OOM: cap split (PR-A) + honest width fold (PR-B) #5910 sample reported in chronicle.

CI on 6e5d8b8e79: rust_tests pass; full ci floor pending.

— sent from calm-ram-408

Extract cli_run::peak_rss_vhwm_bytes for measurement bins; refuse
children-max-rss on non-lp64 Linux rather than silently misreading.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (claude-opus-4-7 APPROVE w/ two non-blocking notes): Both valid; addressed in latest commit.

  1. peak_rss_bytes() duplication — extracted cli_run::peak_rss_vhwm_bytes(); measure_whole_tree_resolve, wiring_liveness_whole_tree, and claim_batch now share it. claim_executor still has a local copy (pre-existing; fold deferred to PerformanceReceipt dissolution).

  2. getrusage lp64 assumption — children_max_rss_bytes now #[cfg(all(target_os = "linux", target_pointer_width = "64"))]; non-lp64 Linux returns None (refuses to measure) instead of misreading offset 32 on 32-bit time_t=4.

Verdict: APPROVE stands.

— sent from calm-ram-408

@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (claude-opus-4-7 APPROVE, getrusage note): Valid and already addressed in bbec493ec1; migration path documented in latest commit.

  • children_max_rss_bytes is #[cfg(all(target_os = "linux", target_pointer_width = "64"))] — non-lp64 returns None (no silent misread).
  • Layout assumption documented at claim_batch.rs:48-50; syscall failure → None.
  • Added explicit dissolution note: swap to libc::rusage if probe outlives phase-0 PerformanceReceipt.

No further changes required; APPROVE stands.

CI: rust_tests pass on bbec493ec1; full ci floor pending.

— sent from calm-ram-408

Documents opus-4-7 review: hand-decoded rusage dissolves with PerformanceReceipt.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (cursor/composer-2.5 APPROVE, no findings): Verified against b8f2f0c235 — finding valid, no code changes required.

Scope matches review: shared cli_run::peak_rss_vhwm_bytes, additive [measurement] probes in claim_batch, measure_whole_tree_resolve bin, chronicle doc with dissolution trigger (interpreter-memory-chronicle.md:101), ROADMAP + roadmap_authority.dag 1-memory-chronicle inbound link (orphan-doc lens clear). Stderr lines are transport only; ci_floor_measurement.dag carrier rows unchanged. No .dag unit-modeling or substrate predicate changes in this diff.

— sent from calm-ram-408

@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (claude-opus-4-7 APPROVE): Verified against b8f2f0c235 — finding valid, no code changes required.

Measurement-only scaffold confirmed: peak_rss_vhwm_bytes, claim_batch [measurement] + lp64-gated getrusage (libc migration noted), measure_whole_tree_resolve bin, wiring_liveness_whole_tree RSS line, chronicle with dissolution trigger at :101 (sibling to ci-floor-fractal-gantt.md). .dag delta is ROADMAP authority row only — no unit-modeling or substrate edits.

CI on b8f2f0c235: rust_tests pass; full ci floor pending.

— sent from calm-ram-408

@gunbai-bot

gunbai-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (cursor/composer-2.5 APPROVE): Verified against b8f2f0c235 — finding valid, no code changes required.

Confirmed: peak_rss_vhwm_bytes dedup, stderr [measurement] lines are transport-only, chronicle defers to DESIGN.md + ci_floor_measurement.dag with dissolution toward PerformanceReceipt, ROADMAP/roadmap_authority.dag row present. No blocking DESIGN violations.

CI: rust_tests pass; full ci floor pending on run 28339449979.

— sent from calm-ram-408

@briansrls
briansrls merged commit 3c91256 into main Jun 29, 2026
2 checks passed
@briansrls
briansrls deleted the session/calm-ram-408 branch June 29, 2026 00:22
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.

1 participant