Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
auto-closed-staleClosed by stale automation; reopening grants a permanent exemptionClosed by stale automation; reopening grants a permanent exemptionfeatureneeds-triagepending-maintainer
Description
Description
Non-blocking hardening items recorded during the round-3 self-review of #1528 (Agent Control Plane v1). None is a correctness, auth, or data-loss defect on a conforming deployment; they were classified SCOPE EXPANSION under docs/review-contract.md and deferred here rather than blocking the roll-up.
- Verify a pre-existing managed parent dir.
prepare_socket_dir_with_managed_parent(crates/openab-core/src/control_plane/local.rs,NotFoundarm): when$HOME/.openabalready exists butrun/does not, the intermediate dir is not run through the sameis_dir/uid == getuid()/mode & 0o077 == 0checks the final dir gets. Reuse theOk(meta)verification on the managed parent beforecreate_dir(run). - Duplicate guard on the spawn-ack path.
primary.rson_reply(Spawn ack) inserts intotracked/tracked_orderwithout thecontains_keyguardon_delegate_resulthas. A non-conforming CP replaying(delegation_id, admission)would orphanaccounted_bytesand leave a permanent duplicate intracked_order. Reject withCommandError::Internalandwarn!. - Read the cap under the lock.
executor.rsadmit()readseffective_max()beforelock_inflight(), so a concurrent re-register ack can decide one admission against a stale ceiling (off-by-one at most). Move the read below the lock. - Single source of truth for the deadline window.
1..=1800is repeated as literals inlocal.rs,src/main.rs(clap range) and the MCP JSON schema insrc/cp_tools.rs. Export onepub constfromopenab_core::control_plane::localand assert the schema against it in a test. - Garbled
bail!string.crates/openab-cp/src/config.rsmax_frame_bytesvalidation message contains a long literal run of spaces (missing\continuation); the test only assertscontains("bundled runtime minimum")so it hides the defect. Fix the string and tighten the test. - Heartbeat test margin.
crates/openab-core/tests/cp_client.rs::heartbeats_keep_the_lease_aliveassertsexpired(2s).is_empty()after a 3.5 s real sleep with a 1 s heartbeat cadence — ~1 s margin under CI load. Widen the ratio or drive the sweep deterministically like the re-register test does.
Use Case
Keeps the CP runtime client at the verify-never-modify / bounded-state standard the v1 contract set, and removes a flake-prone timing assertion from the default cargo test loop. Refs #1528, #1474, #1475.
Metadata
Metadata
Assignees
Labels
auto-closed-staleClosed by stale automation; reopening grants a permanent exemptionClosed by stale automation; reopening grants a permanent exemptionfeatureneeds-triagepending-maintainer
Activity
fix(cp): close round-4 review findings F1–F6 on the runtime client
chaodu-agent commentedon Sep 10, 2026
Items 2 (spawn-ack duplicate guard) and 3 (
admit()reads the cap under the lock) were closed in #1528c061158alongside the round-4 fixes; regression testa_repeated_admission_in_a_delegate_ack_is_rejected_not_overwrittencovers item 2. Items 1, 4, 5, 6 remain open here.github-actions commentedon Sep 25, 2026
This issue has been open for more than 14 days with no linked pull request, so it is being closed as not planned.
If this is still needed, please open a new issue with updated context and reference this closed issue instead of reopening it. A linked PR is the strongest signal that the work matters.