diff --git a/doc/agents/owner-preferences.md b/doc/agents/owner-preferences.md index 23ab81ef4f..0603f4b658 100644 --- a/doc/agents/owner-preferences.md +++ b/doc/agents/owner-preferences.md @@ -13,5 +13,6 @@ - It is acceptable to push and merge code that has been validated with targeted tests without running every single test upfront. - Run long test suites or CI in the background while progressing on other work in parallel. If background jobs or CI fail, double back and address failures while continuing forward. - **CI-first verification:** Review the checks actually triggered on the PR and use [`.github/ci-policy.md`](../../.github/ci-policy.md) to distinguish the basic merge-gating PR tier from the full main tier; formatting is not a merge gate. Run targeted local checks on the laptop when useful; sandboxed workers use CI and must not run builds or tests in the sandbox. If a policy-listed check is missing from the PR, inspect the workflow trigger and report the coverage gap instead of assuming it ran. - - **Build discipline on the laptop (2026-11-10):** Heavy builds/tests (cargo, nix) on the laptop go through `~/tools/fleet-build-lock` (max 2 heavy builds fleet-wide; it also defaults CARGO_BUILD_JOBS to half the cores). Never set `RUSTC_WRAPPER=` empty — that bypasses the shared sccache cache every other lane benefits from. `fleet-build-lock` leases CARGO_TARGET_DIR from the cargo target broker (`~/tools/cargo-target-broker`, code#6797) for cargo builds — a bounded pool of warm per-workspace dirs under `~/build-cache/broker-pool`, held under an exclusive lease for the build and returned warm — instead of a per-worktree target dir: lanes then reuse each other's dependency builds instead of each paying a full ~17-minute compile (measured 2026-11-11 through the broker: a pkgs/id test build from a second worktree compiled 1 of 535 units, and a build returning to its own leased dir compiles none; re-measured 2026-11-11 through the lock, pkgs/atlas-search: 35s isolated target dir -> 1s shared). If the broker cannot lease a dir, the lock falls back to the pre-broker static per-package dir (`~/build-cache/`, e.g. `~/build-cache/id` for pkgs/id). Sessions launched outside the lock run cargo through `~/tools/cargo-target-broker exec --repo --profile -- cargo ...` to land on the same leased dirs. Set CARGO_TARGET_DIR yourself only to override all of that. For Rust verification, run the narrowest build that proves the change: `cargo check` for type-only changes; `cargo test --lib` without `--features web` when the change does not touch web code; named test filters always. The full `--features web` test build of a package like `pkgs/id` costs many minutes of fleet-wide compile and must be justified by the change actually touching that surface. + - **Build discipline on the laptop (2026-11-10):** Heavy builds/tests (cargo, nix) on the laptop go through `~/tools/fleet-build-lock` (max 2 heavy builds fleet-wide; it also defaults CARGO_BUILD_JOBS to half the cores). Never set `RUSTC_WRAPPER=` empty — that bypasses the shared sccache cache every other lane benefits from. `fleet-build-lock` leases CARGO_TARGET_DIR from the cargo target broker (`~/tools/cargo-target-broker`, code#6797) for cargo builds — a bounded pool of warm per-workspace dirs under `~/build-cache/broker-pool`, held under an exclusive lease for the build and returned warm — instead of a per-worktree target dir: lanes then reuse each other's dependency builds instead of each paying a full ~17-minute compile (measured 2026-11-11 through the broker: a pkgs/id test build from a second worktree compiled 1 of 535 units, and a build returning to its own leased dir compiles none; re-measured 2026-11-11 through the lock, pkgs/atlas-search: 35s isolated target dir -> 1s shared). If the broker cannot lease a dir, the lock falls back to the pre-broker static per-package dir (`~/build-cache/`, e.g. `~/build-cache/id` for pkgs/id). Sessions launched outside the lock run cargo through `~/tools/cargo-target-broker exec --repo --profile -- cargo ...` to land on the same leased dirs. Set CARGO_TARGET_DIR yourself only to override all of that. For Rust verification, run the narrowest build that proves the change: `cargo check` for type-only changes; `cargo test --lib` without `--features web` when the change does not touch web code; named test filters always. The full `--features web` test build of a package like `pkgs/id` costs many minutes of fleet-wide compile and must be justified by the change actually touching that surface. + - **Resource defaults (provisional, 2026-11-22; evidence: [#7011](https://github.com/developing-today/code/issues/7011)):** On a sandbox exec cell, limit CPU-bound subprocess parallelism to **2 workers**. The recorded synthetic per-cell sweeps repeatedly show throughput reaching a plateau from 2 workers onward; this is not a cap on independent queue lanes. Before starting new heavy sessions on the shared sandbox VM, check `MemAvailable` and do not start below **1.5 GiB**. Use available memory as the admission gate rather than load average alone: recorded ramp windows showed memory headroom falling while load remained below the VM's vCPU count. On the laptop executor, keep CPU-bound parallelism at or below the logical-core count and reduce it under mixed load; measured results show that the unloaded peak is not stable under concurrent builds. Do not run fleet-wide concurrency sweeps as part of ordinary work. These are conservative operating defaults, not a substitute for a representative lane-level benchmark; revise them when such measurements exist. - Document unresolved ambiguities, design concerns, or known gaps by creating GitHub issues instead of blocking progress.