Conversation
yxflc11
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
October 3, 2026 07:27
This branch has not been deployed
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.
Problem and change
A client can stop/reset one Bot's profile but cannot measure it without mounting the computer's private volume. Add token-protected
GET /computers/profile-usage, returning only{profileBytes: number | null}for the existing validated Bot identity. It never starts Chromium, creates a session/profile, reads file contents, or grants deletion authority.The Linux implementation counts regular-file logical bytes through open directory descriptors. It skips symbolic links without following their targets (including Chromium singleton links), uses
O_NOFOLLOWwhen opening every child directory, and refuses hardlinks, special files, changed directories, cross-device traversal and unsafe totals. It permits one traversal per process, caps entries at 10,000 and depth at 16, and checks a 2-second cooperative deadline around filesystem operations. A kernel-blocked filesystem call cannot be forcibly interrupted. Missing profiles return 0; refused/incomplete measurements and unsupported platforms return null. No profile paths or partial totals are returned.The route is separate from unauthenticated
/health, rejects query parameters and non-GET methods, and uses no new dependencies.agent-computer/PROFILE_USAGE.mddocuments the exact scope, including Linux-only descriptor traversal and the lack of an atomic live-filesystem snapshot.Verification
Reviewed against upstream commit
cb5dc32a44517622c6db4e527e61d3abb389b43c.