Skip to content

feat(env): inter-turn idle instrumentation for LocalREPL (BR002-WO002) - #5

Merged
ITHwang merged 1 commit into
rlm-lab/integrationfrom
feat/local-repl-idle-timing
Jul 26, 2026
Merged

ITHwang merged 1 commit into
rlm-lab/integrationfrom
feat/local-repl-idle-timing

Conversation

@ITHwang

@ITHwang ITHwang commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Ports PyWasmEnv's idle-timing schema to the native LocalREPL env so latency-on idle structure compares directly across envs (RLM Lab, BR002-WO002):

  • execute wall/active accumulation per execute_code
  • inter-turn idle windows backdated to the last execute end (initial root wait uncounted), fired by the existing root-loop getattr hook sites
  • per-request reset via warm_reset
  • runtime_timing() fractions; mid-execute park deliberately NOT instrumented (BR002-CL005) — active_seconds includes nested llm_query waits and is an upper bound

Additive only; stock behavior unchanged. 5 new tests in tests/test_local_repl.py (25 → 30 passing).

Reviewed in rlm-lab's ABR (3 rounds, approve + clean hygiene sweep — record in rlm-lab docs/002-rlm-production-memory-architecture/reviews/); this PR is the fork-side landing per the branch model in rlm-lab docs/permanent/rlm-fork-maintenance.md. Upstream untouched.

Merge with a merge commit (not squash) — the rlm-lab superproject PR alexzhang13#20 pins 9ef1ee5 and will re-pin to this PR's merge commit.

🤖 Generated with Claude Code

Ports PyWasmEnv's idle-timing schema to the native env so latency-on idle
structure compares directly across envs: execute wall/active accumulation,
inter-turn idle windows backdated to the last execute end (initial root wait
uncounted), per-request reset via warm_reset, and runtime_timing() fractions.
Mid-execute park is deliberately NOT instrumented (BR002-CL005) — active is
an upper bound. Additive only; stock behavior unchanged. 5 new tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ITHwang
ITHwang merged commit 91b6eae into rlm-lab/integration Jul 26, 2026
@ITHwang
ITHwang deleted the feat/local-repl-idle-timing branch July 26, 2026 10:09
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