feat(resource): aggregate bounded browser process-set RSS - #66
Draft
seonghobae wants to merge 6 commits into
Draft
feat(resource): aggregate bounded browser process-set RSS#66seonghobae wants to merge 6 commits into
seonghobae wants to merge 6 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partial implementation of #28, stacked on PR #51.
Buyer-visible gap
PR #51 can sample exactly one caller-supplied Linux process RSS value, but Chromium is multi-process. A resource governor that accepts only one PID can materially undercount a real Agent Task even when every individual
/proc/<pid>/statussample is valid. This follow-up defines a bounded, duplicate-safe process-set aggregation boundary without pretending to discover or attribute Chromium processes.Dependency
This Draft is stacked on exact PR #51 head
dab26e4e9652408fb67dc8eedf9fd1820e524805. It remains Draft and is not independently integrable before that prerequisite.TDD / RCA sequence
8b1ae110c2a5940e0bf11f1e76a9160dd4b1debdrequiredMAX_BROWSER_PROCESS_SET_SIZE, pure bounded aggregation, exact-set Linux sampling, empty/zero/duplicate/oversized rejection, checked aggregate overflow, and fail-closed partial-set sampling before production implemented that boundary.61ddf7bb085cc91c08ca393efb3da705b45dd6f4exposed one test defect rather than a production aggregation defect: the integration test compared two independent sequential/proc/<pid>/statusRSS reads for byte equality even though process RSS can legitimately change between samples.8958b55d0ef1b135be3d2a48dc61c604447cb01acorrected that race by testing the kernel sample contract directly: the current Linux process must yield a positive byte count in the kernel-kB granularity, while invalid/partial process sets remain fail-closed. CI run31446492816then passed repository contracts, formatting, locked workspace checks/tests, strict Clippy, rustdoc and exact owned production function/line/region/branch coverage.986958ab8a29b3ca708c80e44df45e1ec5f9f868records the bounded process-set behavior in the Unreleased changelog without widening the implementation claim.Implemented boundary
The branch now:
aggregate_browser_process_rss_samplesover explicit(pid, rss_bytes)samples;/proc/<pid>/statusVmRSSparser;Exact-head evidence
On unchanged exact head
986958ab8a29b3ca708c80e44df45e1ec5f9f868, stacked on exact #51 headdab26e4e9652408fb67dc8eedf9fd1820e524805:31446842334: success;93642785102: repository Python contracts, formatting, locked workspace/all-target check, full tests, strict Clippy and rustdoc all success;93642785059: success, including exact owned production function/line/region/branch enforcement;No predecessor-head check, review or mergeability result is transferred to this exact head.
Truth boundary
This lane does not discover Chromium PIDs, prove that supplied PIDs belong to one browser task, walk a browser child-process tree/cgroup, sample GPU/VRAM or JS heap, launch/control Chromium, persist telemetry, alter workflows, or make release claims. Trusted browser/process attribution remains a later adapter responsibility. Canonical whole-product documentation remains owned by PR #44.