Repository navigation
feat(conduct): configure execution limits and reconcile owner policy safely - #3211
Conversation
The keeper's admission limits were literals in code: one active run in recovery (two otherwise), 1800 s attempts, a 7200 s outcome budget, a 600 s verification window and two root attempts. The live policy already carries an `execution_limits` block, but nothing read it, so no owner policy could change them. Add executionLimits() (Worker) and execution_limits() (CLI mirror) and route every site through them: concurrency, outcome budget, corrective-retry ceiling, attempt deadline and reservation, recorded verification window, the allowance report's limit_seconds, and the verification-reservation deadline. Keys: max_active_runs, attempt_seconds, verification_seconds, cumulative_seconds, max_root_attempts. An absent key keeps today's default (and the mode-keyed active-run cap), so an unmodified policy admits exactly as before. A present key that is malformed or out of bounds fails closed as execution_policy_invalid; unknown keys are ignored so a newer policy cannot brick admission. Host admission, the storage latch and the other fail-closed rails are separate and unchanged; raising max_active_runs does not raise what the host will admit. Verified: 421/421 Worker tests (8 new, including a fifth concurrent run admitted and a sixth refused at max_active_runs=5), 34 CLI tests across the new file and the existing admission/policy files, and the cheap scoped wave. The cap-of-5 scenario was A/B'd against the parent commit: refused there, admitted here. Heavy wave (python-typecheck, pytest-cli, pytest-api) was refused by host admission and is not claimed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAB98KVPv8punwxd1dpmgm
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideThe PR introduces owner-configurable execution admission limits through the live policy’s execution_limits block, implements identical validated readers in the Worker and CLI, routes all relevant admission and allowance behavior through those readers, and adds documentation plus comprehensive parity tests while leaving host admission controls unchanged. Sequence diagram for owner-configured execution admissionsequenceDiagram
participant Owner
participant Policy as LivePolicy
participant Worker
participant Limits as executionLimits()
participant Admission as executionAdmission()
participant Kernel as ConductKernel
Owner->>Policy: Install execution_limits via reconcile route
Worker->>Policy: Read execution policy
Worker->>Limits: executionLimits(policy)
Limits-->>Worker: Validated limits or execution_policy_invalid
Worker->>Admission: executionAdmission(policy, state, packet, now)
Admission->>Admission: Apply max_active_runs
Admission->>Admission: Apply attempt_seconds and cumulative_seconds
Admission->>Admission: Apply max_root_attempts
Admission-->>Worker: Admission record with deadlines and reservations
Worker->>Kernel: Reserve verification
Kernel->>Limits: Read configured cumulative_seconds
Kernel-->>Worker: Allowance with limit_seconds
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…-configurable-20261024
…-configurable-20261024
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Execution admission limits were hardcoded, and the owner controls lived in a local-only script. This makes all five limits owner-configurable in the Worker and Python mirror, and moves the limit/resource/lane flags into scripts/reconcile-execution-policy.py. Policy installation uses shared validation, generation fencing, immutable private rollback, exact-runtime fencing and bounded propagation readback.
The schedule-census aggregate fixture now uses explicit launchd observations and verifies that absent fixture labels still make the report fail. The original owner script is archived byte-for-byte in the delivery evidence directory before local retirement.
Exact-head local validation
Head: 33825a3.
env LIMEN_GATE_PYTHON=CHECKOUT_LOCAL_PYTHON LIMEN_HOST_ADMISSION_SWAP_FRACTION=0.60 LIMEN_HOST_ADMISSION_DISK_MIB_PER_SECOND=1024 LIMEN_VITALS_WARN_SUSTAIN=10 LIMEN_VERIFY_JOBS=2 PYTEST_XDIST_AUTO_NUM_WORKERS=4 bash scripts/verify-scoped.sh --total-timeout-seconds 1200 --require-base
Exit 0. CLI: 9717 passed, 60 skipped, 10 subtests passed. API: 52 passed. Worker: 421 passed. All 35 cheap gates passed, including both type-check groups, lint/format, schedules, the eight offline reconciler tests, and implicated governance gates. No persistent host setting changed; the human authorized these process-local overrides and all continuation through completion. Remote checks remain advisory on this fast lane.
Related completed work
ACE #13 was already merged by a peer via ACE #15 and retained in #16; fresh verification at e29015f passed 20 path tests, catalog validation and all 73 tools tests. Domus #563 is merged/applied, with 137 template checks passing and both global instruction surfaces verified identical.
Rollout
After exact-head squash merge, deploy the merged source with its runtime Git SHA, authenticate readback, dry-run then install max_active_runs=5 through the canonical CLI, verify containment and unrelated fields are preserved, then retire only custody-qualified scratch state. Deployment and cleanup receipts are owned by docs/continuations/execution-limits-20261025.
Summary by Sourcery
Make execution admission limits owner-configurable and reconcile them safely through the canonical policy CLI.
New Features:
Bug Fixes:
Enhancements:
CI:
Deployment:
Documentation:
Tests: