feat(kvb-org-organize): hold heavy jobs back on memory pressure with one shipped default config
watch.py admits heavy work only while PSI, swap-out rate and RAM forecast stay under the configured limits; config.default.json is the single default the install writes once (mode 600, no clobber) and every hook, admit and queue command falls back to. Browser runners and package-manager script forms count as heavy, preflight derives its probes from the light and heavy tool lists, and the shipped default carries no prune command, buildx path or host-specific key. Tests run once on unify/skills-20261114 after the merge (operator order 2026-11-14). 🎯 Fix: 85 % 💥 Break: 8 % 💸 Tokens: 99 % ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 79 🚦 Gate: ⛔ fix 85 % < 90, break 8 % > 5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a2a03995cb
commit
8e2db852e5
27 files changed
+2795
-207
No files matched your search
@@ -37,8 +37,13 @@ ends or goes stale, or after a restart.
|
||||
|
||||
## Capacity
|
||||
|
||||
- Light runs (no Docker, about a minute: one test file or module, ruff)
|
||||
self-admit: `watch.py admit --kind test-nostack`, start on `grant`.
|
||||
- Light runs self-admit: `watch.py admit --kind test-nostack -- <command>`,
|
||||
start on `grant`. Light is only ruff, shellcheck, markdownlint, lizard, jq,
|
||||
py_compile, cargo fmt, `env CARGO_BUILD_JOBS=4 cargo build|check|clippy|test`,
|
||||
or one test file or module outside `e2e/` that reaches no Playwright;
|
||||
anything else: `queue.py hold --kind test`.
|
||||
- Memory stop (also PSI or swap-out) blocks every admit and grant; running
|
||||
jobs go on.
|
||||
- Other test runs, `make test`, `make test-lint`, quality gates, deploys,
|
||||
iteration loops, swarm, image builds, cloud, shared-data cleanup, anything
|
||||
with Docker or over a few minutes: run through `queue.py hold`
|
||||
|
||||
@@ -63,3 +63,16 @@ and stays silent below the thresholds.
|
||||
|
||||
`watch.py status` shows the stage computed from the live free space and the
|
||||
stored samples, and the age of the stored measurement.
|
||||
|
||||
An unusable config (broken JSON, wrong types, a regex refusing a light
|
||||
probe such as `grep` or freeing a heavy one such as `make swarm-deploy`, a
|
||||
dangling link, a directory) makes the hooks, admit, status and the queue
|
||||
warn and use `config.default.json`, which the install writes when no config
|
||||
exists; without that file every command, teardown included, is refused.
|
||||
The probes are samples, so a pattern hitting only other commands passes. A
|
||||
package script is read from the nearest package.json, a named workspace
|
||||
only from a folder of that name. The light-run check misses
|
||||
`sys.path.insert` in a conftest, editable installs without pytest
|
||||
`pythonpath`, browser libraries outside its list and generic third-party
|
||||
fixtures such as pytest-selenium's `driver`, browsers started by a
|
||||
subprocess, and `git bisect run` or a suite script behind `bash`.
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"disk": "/",
|
||||
"thresholds_gb": {"warn": 40, "stop": 15, "critical": 12},
|
||||
"projection_minutes": 30,
|
||||
"interval_seconds": 120,
|
||||
"cache_interval_seconds": 1800,
|
||||
"heavy_commands": [
|
||||
"\\bmake\\s+(-C\\s+\\S+\\s+)?(compose-deploy|compose-up|compose-playwright|roundtrip|quality|quality-high|test|test-integration|test-unit\\S*|swarm-\\S+|act-workflow|act-runner-image|build\\S*|worktree-up|store-\\S+)(\\s|$)",
|
||||
"\\bdocker\\s+(build|pull|load)\\b",
|
||||
"\\bdocker\\s+buildx\\s+build\\b",
|
||||
"\\brun\\.sh\\s+local\\b"
|
||||
],
|
||||
"never_block": [
|
||||
"\\bmake\\s+(-C\\s+\\S+\\s+)?(swarm-down|swarm-clean|swarm-clean-stale-nfs|swarm-diagnostic|compose-down|compose-entity-purge|worktree-down|store-host-down)(\\s|$)",
|
||||
"^\\s*git\\s+commit\\b.*\\s--no-verify\\b",
|
||||
"\\bmake\\s+swarm-exec(\\s|$)"
|
||||
],
|
||||
"queue_enforce": true,
|
||||
"cleanup": [],
|
||||
"worktree_cleanup": [],
|
||||
"worktrees_command": "true",
|
||||
"worktree_marker": ".git",
|
||||
"busy_processes": ["make"],
|
||||
"cache_dirs": ["~/.cache/pip", "~/.npm", "~/.cache/pre-commit", "~/.cache/act", "~/.cache/ms-playwright"],
|
||||
"cache_budget_percent": 3,
|
||||
"slot_need_gb": {"quality-high": 15, "test": 15, "test-nostack": 0, "iteration": 20, "swarm": 30, "gui-dind": 65, "operator": 10},
|
||||
"notify": ["notify-send", "-u", "critical", "Agents council"],
|
||||
"load_limits": {"cpu_percent": 90, "mem_percent": 85, "sample_seconds": 5, "kinds": ["test", "test-nostack", "quality-high"]},
|
||||
"memory_limits": {
|
||||
"warn": {"available": 15, "swap_free": 40, "psi_some": 10, "psi_full": 5, "swap_out_mb_min": 64, "container_swap_gb": 4},
|
||||
"stop": {"available": 8, "swap_free": 10, "psi_full": 5, "swap_out_mb_min": 256, "container_swap_gb": 16}
|
||||
},
|
||||
"budget_percent": {"ram": 75, "cpu": 100},
|
||||
"light_kinds": ["test-nostack"],
|
||||
"exclusive_kinds": ["quality-high", "test"],
|
||||
"gate_excluded_targets": ["test-oracle"]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user