3.7 KiB
3.7 KiB
Task Admission Bootstrap P0 Runbook
Goal
Repair the Task-admission bootstrap chain without enabling legacy/global writes.
Preconditions
Re-read live authority, runtime mode, OpenAPI, capabilities and current Task API. Do not assume the package source paths are current.
Required invariants:
AIOS_GITOPS_WRITES_ENABLED=false
legacy_global_writes_enabled=false
18893=IMMUTABLE_STAGING
main/tag/baseline/production writes=false
Semantic-port sequence
- Locate the live Agent Task create/admission implementation.
- Locate the current Owner/delegation signature verifier.
- Port
aios_task_admission_bootstrap.pyas the common substrate. - Implement
TaskAdmissionPort.admit()with the official Agent Task API. - Implement
OwnerAuthorizationBackendwith the current trusted verifier. - Wire the three task-admission operations into the existing Bridge.
- Keep TaskPrincipal issuance downstream of real Task claim/TaskLease.
- Merge the OpenAPI fragment only after the live handlers are wired.
- Run impacted Linux/POSIX, TaskPrincipal, Bridge and writer regression.
- Create the bootstrap-repair governed commit through the existing sanctioned recovery path.
- Use the repaired admission path to create the Repository Discovery P0 Task.
- Claim/heartbeat -> TaskLease -> TaskPrincipal -> WriterLease.
- Commit only the existing Repository Discovery allowlist through
commitFilesGoverned. - Reconcile ambiguous outcomes before any retry.
Admission uses a per-envelope, crash-releasing SQLite lock under the
admission state path's
.locksdirectory. It persists the immutable grant before an effect, then the official Task API GET reconciles any crashed or ambiguous effect before a POST is permitted. - Replays revalidate the supplied proof, policy, expiry and revocation before reading a receipt. A different otherwise-valid proof conflicts with the persisted authorization digest; it never becomes a harmless receipt replay.
- The Task API adapter must receive a server-resolved trusted execution plan
for the signed execution digest. It supplies
metadata.executionwith the exact repository, branch, generation, digest and nonempty external job identifier. Do not derive a job identity from request JSON or generate one. - Require Authority / remote Git / API OID equality and idempotent replay.
- Publish immutable staging artifact and run Repository Discovery live E2E.
Never do
- direct Task DB inserts/updates;
- direct bare-repo/ref changes;
- raw Git push as a substitute for governed publication;
- borrow SSH/Gitea/service credentials as Owner authorization;
- disable TaskPrincipal verification;
- issue TaskPrincipal without a live TaskLease;
- set global writes true;
- turn 18893 into a writer;
- include production/tag/baseline/main permissions in a task grant.
Acceptance
Bootstrap repair:
ENVELOPE_EXACT_REPLAY=PASS
SCOPE_NARROWING=PASS
DELEGATION_REVOKE_EXPIRY=PASS
OWNER_SIGNATURE_VERIFY=PASS
CONCURRENT_ADMISSION_SINGLE_TASK=PASS
TASK_DB_DIRECT_WRITE=false
TASKPRINCIPAL_BYPASS=false
GLOBAL_WRITES=false
CRASH_AFTER_EFFECT_REPLAY=PASS
CRASH_BEFORE_EFFECT_REPLAY=PASS
CHANGED_VALID_PROOF_CONFLICT=PASS
TASK_API_EXACT_IDENTITY=PASS
These are implementation and test acceptance conditions only. They are not evidence of a live claim, governed publication, remote OID equality, or staging E2E execution; obtain those independently through the sanctioned live runbook.
Repository Discovery publication:
TASK_CREATED=PASS
TASK_CLAIMED=PASS
TASK_HEARTBEAT=PASS
TASK_LEASE=PASS
TASK_PRINCIPAL=PASS
WRITER_LEASE=PASS
COMMIT_FILES_GOVERNED=PASS
AUTHORITY_REMOTE_API_OID_EQUAL=PASS
IDEMPOTENCY_REPLAY=PASS
STAGING_LIVE_E2E=PASS
TASK_VERIFIED=SUCCEEDED