Skip to content

doctor.sh never examines the effective merge_autonomy_protected_paths list, so an empty or inert override weakens gate 4 with no warning

Id: TD-PPagop-26082425 · Status: resolved · Filed: 2026-08-24 · Resolved: 2026-09-08 · Ref: #1252

What. PR #727 (agent-ops#724) made the routine landing class’s protected paths configurable, which makes an empty effective list expressible for the first time: the schema sets items: {type: string, minLength: 1} but no minItems, so "merge_autonomy_protected_paths": [] — top-level or as a repos[] override — is schema-valid, and _landing_protected_paths (lib/landing.sh) honours it as ‘no path is protected’ (verified directly: an explicit [] override returns [], it does not fall through to the default, and //empty treats [] as present). scripts/doctor.sh says nothing: its D18 section warns on landing_cool_off_hours 0 at a landing-capable level and on merge_autonomy_routine_sources naming a never-gathered source, but never looks at the protected-path key at all.

Why it matters. An empty list disarms gate 4 — the answer to risk-register item 1 in docs/reviews/2026-08-14-autonomy-investigation.md §7 — for that repository entirely, and unlike the cool-off case there is no doctor signal that the compensating control is gone. lib/landing.sh’s own new header concedes the broader version: ‘a repository that overrides merge_autonomy_protected_paths takes over the job of covering whatever gates its own routine-tier landings — nothing here checks that an override actually does.’ The exposure is bounded (the config lives in agent-ops’s own config.json, which is itself on agent-ops’s protected list and human-reviewed), so this is a missing warning, not a live hole — the same class as the existing cool-off-0 warning, which is why the asymmetry is the surprising part.

Where. scripts/doctor.sh (D18 autonomy-readiness section, beside the landing_cool_off_hours 0 and routine-sources checks); config.schema.json if minItems is preferred; docs/IMPLEMENTATION-PIPELINE-SPEC.md’s doctor requirement moves with it.

Suggested fix. For each repository whose effective merge_autonomy is agent-merges-routine or above, resolve the effective protected-path list the way _landing_protected_paths does and warn when it is empty — mirroring the existing landing_cool_off_hours 0 warning’s wording and severity. A step further, if wanted: warn when an override names no entry that could match anything (all entries exact paths absent from the repository), though that needs a tree read the doctor may not want. Add the doctor check to the spec’s doctor requirement and its acceptance check, per the as-built rule.

Noticed while approving PR #727 (agent-ops#724), which introduced the first way for the effective list to be anything other than the nine hard-coded literals.

Originally filed as TD-PPagop-26082322 (pull request #730). That ID collided: PR #737 added a different record under the same ID via the “Filing alongside other work” path and merged it on 2026-08-23, after #730 was already open, and .github/workflows/release-td-branch.yml then deleted the td/TD-PPagop-26082322 reservation that #730 still depended on. This record carries the same content under a freshly reserved ID; #730 is closed as superseded.

Migrated to https://github.com/Poetic-Poems/agent-ops/issues/980.