Skip to content

test(browser): measure bounded Chromium process-tree RSS - #73

Draft
seonghobae wants to merge 13 commits into
test/agent-task-resource-evidencefrom
test/agent-task-process-set-evidence
Draft

test(browser): measure bounded Chromium process-tree RSS#73
seonghobae wants to merge 13 commits into
test/agent-task-resource-evidencefrom
test/agent-task-process-set-evidence

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #28, stacked on PR #72.

Buyer-visible gap

PR #72 measures the ChromeDriver-reported browser root PID, observation bytes, action latency and task duration, but explicitly does not attribute Chromium renderer/GPU/utility descendants. Chromium is multi-process, so root-only RSS materially undercounts the controlled Agent Task.

Dependency

This Draft remains stacked on unchanged exact PR #72 head 1a7186085abe926c1d0e5b22c36760965d6e237b and must remain Draft while #72/#71/#70/#65 are active.

TDD / RCA sequence

  1. Earlier test-first work established bounded Linux /proc process-tree discovery, one sampled PID/PPID/RSS snapshot, strict process identity parsing, bounded process-set aggregation, and chromium_process_count / chromium_process_set_rss_bytes evidence.
  2. Exact head ec5a34ad7ef453879847182e357380dfb8e1312a passed CI but failed Manifest V3 Compatibility run 31458268547: Agent Task repeatability was only 1/3; trials 2–3 surfaced a caught ValueError.
  3. Exact test-only head 85df93827e187865a136facb6a2fe37e265d4df2 added a focused regression for a sampled descendant without resident RSS. CI run 31460350048, Rust contracts job 93682461842, failed precisely at the new regression with ValueError: Linux process set contained unavailable sampled RSS.
  4. Head cbf922fccc83782d3e114ed65afbeb6d84ef5ce6 corrected aggregation: a sampled PID with rss_bytes=None remains part of process-tree membership/count but contributes no resident bytes; unknown/duplicate/invalid IDs, tree-size overflow, and u64 aggregate overflow remain rejected.
  5. A subsequent audit found a narrower ambiguity: the snapshot path normalized both legitimate absent/nonresident VmRSS and strict parser failures such as duplicate VmRSS fields to None.
  6. Test-only head 015e4a5f79c0abee40c6807b481d3afce613c6c4 required an optional-RSS parser with the exact contract: absent/zero VmRSS -> None, one positive VmRSS -> bounded bytes, duplicate/malformed VmRSS -> fail closed. CI run 31462156163, Rust contracts job 93687687157, produced the intended RED at the missing parser boundary (KeyError).
  7. The focused regression was restored on head ceb1c72cf0f91ca8723bb5b3029044dae5d185b5; it requires absence and zero to remain representable while malformed units/shape/value, duplicate fields, and overflow are rejected.
  8. Current exact head e5fabfd57387ec7d2db692961eda93c95cf8d886 implements _parse_linux_proc_status_optional_rss_bytes and makes _snapshot_linux_process_evidence use it directly. The previous string-matching exception normalization is removed, so ambiguous/malformed sampled evidence fails closed instead of becoming a false nonresident state.

Current exact-head proof

On exact current head e5fabfd57387ec7d2db692961eda93c95cf8d886 against unchanged exact prerequisite #72 head 1a7186085abe926c1d0e5b22c36760965d6e237b:

  • CI run 31464241922: success;
  • Rust contracts job 93693702956: success, with the job log confirming checkout of exact head e5fabfd57387ec7d2db692961eda93c95cf8d886; repository Python contracts, formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc all passed;
  • Production coverage job 93693703022: success, including exact owned production function/line/region/branch enforcement;
  • Manifest V3 Compatibility run 31464241924: success on the same exact head;
  • no formal reviews or inline review threads are currently returned; and
  • GitHub reports the Draft mergeable against its unchanged prerequisite base.

No predecessor-head result is transferred to this exact head. The earlier RED evidence remains part of the TDD lineage; the current exact head separately supplies the source correction and fresh GREEN proof.

Remaining dependency before Ready

The parser-integrity defect is closed on this branch, but the PR remains Draft because it is stacked on still-active #72/#71/#70/#65. Do not mark this branch Ready or integrate it independently until those prerequisite identities are resolved in dependency order and this head is revalidated against the resulting live base.

Truth boundary

This remains controlled Linux CI evidence, not product process-attribution authority. The metric sums resident RSS only for processes present in one bounded /proc lineage snapshot under the ChromeDriver-issued browser root. A sampled descendant with no resident RSS may remain counted as process-tree membership rather than making the whole fixture nondeterministically fail; malformed or ambiguous sampled evidence fails closed. This does not prove per-tab/task CPU or RSS ownership, cgroup ownership, GPU/VRAM, JS heap, cross-platform semantics, or compose the product #51/#66 resource contracts. No whole-task RSS claim is permitted until a trusted product adapter owns process attribution.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 04009071-77ba-4e35-8ec1-47a7fea04958

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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