RQ Controller State Auth and Concurrency
Status: Complete (closed 2026-04-10 22:52 UTC) Timezone: UTC (all dates/times in this package documentation use UTC unless explicitly stated otherwise).
Overview
This package enforces the auth and write-safety contract for controller-state surfaces so autonomous agents can execute safely under concurrent mutation. It hardens read-scope rollout (rq:read), accepted-auth parity, optimistic concurrency preconditions, and idempotency behavior alignment across descriptors, OpenAPI, and live routes.
Objectives
- Enforce
rq:readrollout semantics and plannedrq:statusalias sunset behavior for read-only controller-state surfaces. - Align
accepted_authandauth_requirementsmetadata with actual route behavior. - Implement/finish optimistic concurrency preconditions (
X-Run-State-Match/ expected run-state revision semantics where contract requires). - Implement/finish idempotency behavior and descriptor parity for mutating operations that declare idempotency support.
- Add/extend OpenAPI and route-level tests plus frozen artifact/checklist guards for all auth/concurrency changes.
Scope
This package delivers auth rollout enforcement, concurrency/idempotency behavior alignment, and required tests/docs/checklist updates.
Included
- Route-level auth scope enforcement updates for controller-state surfaces.
- Descriptor/auth metadata parity updates for setup/run-scoped endpoint catalogs and schema payloads.
- Optimistic concurrency precondition enforcement and canonical conflict responses.
- Idempotency policy behavior alignment where declared supported.
- OpenAPI metadata and tests for auth/concurrency/idempotency semantics.
- Frozen artifact updates:
docs/work-packages/20260208_rq_engine_agent_usability/artifacts/endpoint_inventory_freeze_20260208.mddocs/work-packages/20260208_rq_engine_agent_usability/artifacts/route_contract_checklist_20260208.md
Explicitly Out of Scope
- Final contract freeze/cutover reconciliation (
20260410_rq_controller_state_contract_cutover).
Stakeholders
- Primary: rq-engine maintainers and agent-interface implementers.
- Reviewers: API contract/schema maintainers.
- Security Reviewer: independent security subagent review required by package gate.
- Informed: downstream owners for final cutover package.
Success Criteria
- Auth scope behavior for controller-state surfaces matches contract rollout rules (
rq:readwith explicit compatibility boundaries). - Descriptor
accepted_auth/auth_requirementsmatches live route behavior and OpenAPI metadata. - Concurrency precondition behavior (including conflict responses) is enforced where required.
- Idempotency behavior matches declared policy metadata where supported.
- Required validation gates pass (code, QA, security, docs) with no unresolved medium/high findings.
Dependencies
Prerequisites
docs/work-packages/20260410_rq_controller_state_setup_discovery/(complete)docs/work-packages/20260410_rq_controller_state_orchestration_reads/(complete)docs/work-packages/20260410_rq_controller_state_schema_defaults/(complete)docs/work-packages/20260410_rq_controller_state_errors_progress_outputs/(complete)- Canonical route artifacts:
docs/work-packages/20260208_rq_engine_agent_usability/artifacts/endpoint_inventory_freeze_20260208.mddocs/work-packages/20260208_rq_engine_agent_usability/artifacts/route_contract_checklist_20260208.md
Blocks
20260410_rq_controller_state_contract_cutover
Related Packages
- Depends on:
- Related: 20260208_rq_engine_agent_usability
- Follow-up:
20260410_rq_controller_state_contract_cutover
Timeline Estimate
- Expected duration: 1-2 focused sessions
- Complexity: High
- Risk level: High
Security Impact and Review Gate
- Security impact triage:
high - Dedicated security review required:
yes - Triage rationale: This package changes auth/scope and mutation-safety semantics; it directly affects authorization boundaries and concurrent write safety.
- Security review artifact:
docs/work-packages/20260410_rq_controller_state_auth_concurrency/artifacts/2026-04-10_security_review.md
Required Validation Gates
Code Gate
- Implement/extend auth-concurrency/idempotency route and contract tests.
- Update OpenAPI metadata/tests for auth/scope/concurrency/idempotency semantics.
- Update frozen endpoint inventory/checklist artifacts and contract-rule guards.
- Required commands:
wctl run-pytest tests/microservices/test_rq_engine_auth_concurrency_routes.py --maxfail=1wctl run-pytest tests/microservices/test_rq_engine_auth.py tests/microservices/test_rq_engine_session_routes.py --maxfail=1wctl run-pytest tests/microservices/test_rq_engine_openapi_contract.py --maxfail=1python tools/check_endpoint_inventory.pypython tools/check_route_contract_checklist.pywctl run-pytest tests/tools/test_endpoint_inventory_guard.py tests/tools/test_route_contract_checklist_guard.py --maxfail=1
QA Gate
- Run independent
reviewerandqa_reviewersubagent passes. - Capture findings and dispositions in package tracker.
- No unresolved medium/high QA findings at handoff.
Security Gate
- Complete
artifacts/2026-04-10_security_review.mdusing template guidance. - Run independent
security_reviewersubagent pass. - Explicitly review auth/scope/session, concurrency-conflict behavior, and idempotency replay semantics.
- No unresolved medium/high security findings at handoff.
Docs Gate
- Run
wctl doc-linton changed schema/package/tracker/prompt/security docs andPROJECT_TRACKER.md.
References
docs/schemas/rq-controller-state-contract.mddocs/schemas/rq-engine-agent-api-contract.mddocs/work-packages/README.mddocs/prompt_templates/codex_exec_plans.mddocs/prompt_templates/security_review_template.mdwepppy/microservices/rq_engine/AGENTS.mdPROJECT_TRACKER.md
Deliverables
- Auth scope rollout enforcement and metadata parity updates.
- Concurrency precondition enforcement and conflict contract coverage.
- Idempotency behavior alignment where declared supported.
- Updated OpenAPI/frozen inventory/checklist artifacts and guard tests.
- Updated package lifecycle docs and archived ExecPlan on closure.
- Completed security review artifact and reviewer/QA/security finding dispositions.
Kickoff Prompt
- Archived ExecPlan:
docs/work-packages/20260410_rq_controller_state_auth_concurrency/prompts/completed/rq_controller_state_auth_concurrency_execplan.md