Repository navigation
fdev host hygiene: browser-run and /tmp holds, disk-backed TMPDIR, dead-run temp cleanup (Refs #5240) - #5242
Merged
Merged
Conversation
…ad-run temp cleanup (Refs #5240) - scripts/fdev-lane-capacity.py: hold at >=2 headless Chromium main processes (children count once) and when /tmp has under 3 GiB free; both configurable, reported as browsers.* and tmp_free_gib. - deployment/fdev-chromium/fdev-chromium-env: the wrapper now has a repository source; it defaults TMPDIR to a short disk path unless already set. - scripts/fdev-tmp-cleanup.py: dry-run-by-default removal of known harness temp directories whose owner is dead and idle over an hour; never follows a symlink. Hourly user timer templates and install.py tmp-cleanup and chromium-env effects; nothing is installed by this change. - docs/coordination/fdev-host-hygiene.md and fixture tests for all of it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…unt and TMPDIR work (Refs #5240) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…fest (Refs #5240) prepare-registry --write: seed catalogs and records for .agents and .claude, registry/driver-skill-manifest.json. No authored registry row changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nup safety (Refs #5240) Review response (REQUEST_CHANGES at 41673b0): - probe: Chromium rewrites its process title, so /proc/<pid>/cmdline is one space-joined string; split it and take argv[0] from exe. Fixtures captured from a real Playwright chrome-headless-shell; verified live: 1 browser -> count 1, 2 browsers -> hold. - fdev-chromium-env: mkdir -p then chmod 0700 (shellcheck SC2174); MSBuild node-reuse caveat. - cleanup: drop playwright-artifacts and fsgg-gate-*; PID-less patterns need 6 h idle; refuse to delete while a same-user process cannot be inspected (allowlist: systemd --user, (sd-pam), sshd); relative and symlink-alias references; iterative removal (1,100-level test); refuse euid 0. - docs: rollback with a wrapper backup step, socket budget from the real SDD race test, corrected non-dumpable-process wording. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(Refs #5240) The earlier record was never in a baseline; replaced because its pattern list, idle periods and verification no longer matched the code. Seeds and driver manifest regenerated by prepare-registry --write. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts: # .agents/skills/atlas/assets/seed/catalog.json # .claude/skills/atlas/assets/seed/catalog.json # docs/atlas/catalog.json # registry/driver-skill-manifest.json
Contributor
Author
|
Root/fdev: the delta review APPROVED
Non-blocking, carried into the ops note after install:
|
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.
Refs #5240, Refs #4730, Refs #5172
fdev host hygiene, from process problem 4 of the 2026-11-02 progress report: the quiet-host bench probe never admitted for 60 minutes,
/tmp(a 16 GB tmpfs) filled and failed 38 SDD tests, and many browser smokes ran at once. Source only: nothing is installed on the host by this PR; Root installs after merge with the steps indocs/coordination/fdev-host-hygiene.md.What changed
scripts/fdev-lane-capacity.py): two new holds. At least--browser-hold-at(default 2, 0 disables) active headless Chromium main processes (Chromium-familyargv[0],--headless,--remote-debugging-pipe|port, no--type=; renderer, GPU, zygote, utility, crashpad children andnode/timeoutlaunchers do not count). Free space at--tmp-path(default/tmp) below--min-tmp-gib(default 3). JSON:browsers.count,browsers.pids,tmp_free_gib,tmp_path,thresholds.browser_hold_at,thresholds.tmp_free_gib_min;/tmpis reported apart fromdisk_free_gb. Unreadable inputs hold. Chromium rewrites its process title, so/proc/<pid>/cmdlineis one space-joined string; the probe splits it (fixtures captured from a real Playwrightchrome-headless-shell; verified live: one browser readscount 1, two hold).fdev-chromium-envhad no repository source (it was only~/.local/bin, from Supported headless Chromium on fdev: vetted runtime-lib/font bundle + one wrapper (no borrowed lane dirs) #5193). Its source of truth is nowdeployment/fdev-chromium/fdev-chromium-env, installed byinstall.py chromium-env. It defaultsTMPDIRto$HOME/.cache/fsgg-tmp(mkdir then chmod 0700) unless already set; the default is refused above 32 bytes because a Unix socket path is at most 107 bytes and harness trees nest under it.--print-tmpdirgives .NET runs the directory without the Chromium library path.scripts/fdev-tmp-cleanup.py): dry run unless--apply. Known names only (playwright-artifactsandfsgg-gate-*are not swept); owner dead (PID in the name absent, and no live process references the path through cmdline, environ, cwd, fd, maps or/proc/net/unix, with relative words resolved against the process cwd and symlink aliases byrealpath); idle over 1 h for PID-named runs and 6 h for PID-less patterns by the newest mtime in the tree; never follows a symlink (iterative directory-fdO_NOFOLLOWwalk, no recursion, no mount crossing); refuses to delete if the process table is unreadable or a same-user process cannot be inspected (allowlist:systemd --user,(sd-pam), sshd); refuses euid 0; re-reads the table before the first deletion. Hourly user timer templates (minute 37) indeployment/fdev-board-tend/, installed by their owninstall.py tmp-cleanupeffect, so the existing board-tendunitseffect and its rollback are unchanged.docs/coordination/fdev-host-hygiene.md, pointers from the two existing fdev notes, one Atlas record (environment/fdev-host-hygiene), and workflowfdev-host-hygiene-selftest.Review response (REQUEST_CHANGES at 41673b0): M1 cmdline parsing, M2 SC2174, M3
playwright-artifactsdropped, and Root's rulings 1 to 9 (6 h PID-less idle, uninspectable-process refusal, iterative removal,fsgg-gate-*dropped, relative and alias references, rollback with a wrapper backup step, socket budget from the real SDD race test, MSBuild node-reuse note, euid 0 refused). Decisions kept for Root: the cleanup timer is a separate unit pair beside the board-tend units; PID-less patterns rely on the live-reference test plus the 6 h idle rule. The Atlas record was re-captured (the first one was never in a baseline).Tests (local, exact output)
bash tests/fdev-lane-capacity/run.sh:Ran 37 tests ... OK(13 new, incl. real-shaped one-field cmdline fixtures for the main process and--type=children).bash tests/fdev-tmp-cleanup/run.sh:Ran 30 tests ... OK(incl. 6 h vs 1 h idle, relative and symlink-alias references, uninspectable same-user process blocks--apply, allowlist, 1,100-level tree, euid 0).bash tests/fdev-chromium-env/run.sh:Ran 13 tests ... OK(modelled SDD race socket path: default 104 bytes, a 39-byte lane TMPDIR exceeds 107).bash tests/fdev-board-tend/run.sh:Ran 43 tests ... OK.scripts/lint-shell.shwith the pinned shellcheck 0.11.0:224 file(s) and 721 workflow-embedded step(s) clean.tests/atlas/check.pyandprepare-registry --check: current.check-v1-writer-census --structural: PASS.check-prose-citations: ok.Live verification of the browser count (real Playwright, no fixtures)
With one real Playwright
chrome-headless-shell1243 launched throughfdev-chromium-env:browsers {"count":1}, verdict unaffected. With two:browsers {"count":2},verdict hold, reasonbrowser runs 2 >= 2 (headless Chromium main processes).Dry run on the real host (default dry run;
--applywas never run on the real/tmp)python3 -I scripts/fdev-tmp-cleanup.py --list-limit 3, exit 0:processes_read 376, unreadable [], entries_matched 1077, would_remove 874, would_free_bytes 3569328128, removed 0, kept {young: 203}; by pattern (removable/matched) browser-smoke 14/14, chromium-temp 444/492, fsgg-sdd-run 124/237, fsgg-test-root 219/261, playwright-profile 73/73.Fixtures: clock, source and sandbox
Cleanup tests use the real wall clock (
--nowis passed explicitly and mtimes are set relative to it), a temp-dir root and a fake procfs; no real/tmp, no systemd exceptsystemd-analyze verify, no network, no credentials. Probe tests use--proc-root/--cgroup-rootfixtures and point--tmp-pathat the fixture directory. The wrapper tests use a fake bundle and fake$HOME.🤖 Generated with Claude Code