Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d14ef19
Replace work-queue protocol v3 with time-free v4
elefthei Nov 21, 2026
e62ef64
Mark work-queue v3 ADRs superseded by protocol v4
elefthei Nov 21, 2026
cc0b513
Expose a worker's assigned Claims through work_queue_read
elefthei Nov 21, 2026
357a3e4
Give worker Process Safe Outputs the compiled work queue policy
elefthei Nov 21, 2026
4095044
Judge the smoke dispatcher by the Claims it granted
elefthei Nov 21, 2026
1f28aae
fix(work-queue): isolate checkpoint replay and harden smoke gates
elefthei Nov 22, 2026
5f8982b
fix(cli): read gh dispatch stderr at the Output call site
elefthei Nov 23, 2026
8ee7685
fix(scripts): allow 30s per JS test in the agent-report-progress gate
elefthei Nov 23, 2026
b16761a
feat(request-continuation): route requests to queue successors, appro…
elefthei Nov 22, 2026
08b56fd
fix(work-queue): address review of launch provenance, maintenance, v3…
elefthei Nov 23, 2026
b1c9e88
test(object-pack): report the recovery stage when the limits test fails
elefthei Nov 23, 2026
a203276
Simplify work-queue model to one Claim per Dispatch
elefthei Nov 24, 2026
eade375
Fix v4 CI regressions and port the queue smoke test
elefthei Nov 24, 2026
2b9b630
Port work-queue tooling to v4
elefthei Nov 24, 2026
1f5d7d0
Bound work-queue checkpoints by the live set
elefthei Nov 24, 2026
72cf7c3
Format the shared work-queue fixture
elefthei Nov 24, 2026
becfe31
Apply filtered changes
github-actions[bot] Nov 24, 2026
03a5f5e
Address review: sanitize delivered continuations, fix smoke monitor h…
elefthei Nov 24, 2026
cf5f2e9
docs: synchronize queue and continuation specifications
github-actions[bot] Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .changeset/major-work-queue-v4-timeless.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .changeset/minor-request-continuation-routes.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/aw/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Use as `${{ <name> }}`, e.g. `${{ github.event.issue.number }}`.
- **`${{ steps.* }}`** - Any outputs from previous steps (e.g., `${{ steps.my-step.outputs.result }}`)
- **`${{ github.event.inputs.* }}`** - Any workflow inputs when triggered by workflow_dispatch (e.g., `${{ github.event.inputs.environment }}`)

`aw_context` is reserved and injected by the compiler into supported dispatch and reusable-workflow triggers; do not declare it as a user input. Workflows with `tools.work-queue` receive a compiler-managed `work_queue_assignment` dispatch input. It is a version-3 immutable assignment containing a `claims` array; do not declare or construct it as a user input.
`aw_context` is reserved and injected by the compiler into supported dispatch and reusable-workflow triggers; do not declare it as a user input. Workflows with `tools.work-queue` receive a compiler-managed `work_queue_assignment` dispatch input: `{"version":4,"dispatch_id":"d_…"}`. The worker reads its Claims from the queue snapshot; do not declare or construct this input.

### Sanitized Context Text (`steps.sanitized.outputs.text`)

Expand Down
4 changes: 2 additions & 2 deletions .github/aw/debug-live-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ branches, memory, issues, PRs and other outputs can still be shared with
production. Retain the approved effect scope and required protections; use a
reviewed dry-run lock when testing startup without compiler-managed mutations.
Dry-run suppresses queue writes and worker launches, so it cannot verify live
dispatch. Under the [work-queue protocol](work-queue.md), the first accepted
producer submit bootstraps Policy and Work automatically — do not demand
dispatch. Under the [work-queue protocol](work-queue.md), the first trusted
producer submit creates the queue branch with its Work — do not demand
administrator seeding or repository-rule inventories for queue use.

If another gate blocks execution, state the specific blocker and the smallest
Expand Down
57 changes: 19 additions & 38 deletions .github/aw/debug-playbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,47 +224,28 @@ Check current PR head/base/checks/reviews/guards; diagnosis isn't merge authoriz
## Work-queue codes

Read-only: [queue playbook](work-queue.md).
Check repo/branch/tip, epoch/fingerprint, Work/Claim/Delivery IDs, run binding/receipts.
Never rewrite history, fabricate evidence, reuse cross-work credentials/request IDs,
or bypass profiles/effect-scopes.
Check repo/branch/tip, request ID, Work/Claim/dispatch IDs, run binding, receipts.
Never rewrite history, fabricate commits, reuse request IDs for different intent,
or bypass profiles/effect scope.

| Codes|Check|Remedy|
| ---|---|---|
| `ERR_WORK_QUEUE_DELIVERY_READBACK_REQUIRED`|Trusted readback.|Require independent verifier; otherwise block delivery.|
| `unsupported_protocol`, `codec_invalid`, `invalid_json`, `invalid_utf8`, `invalid_unicode`, `duplicate_key`, `noncanonical_number`|Version/canonical bytes/keys/Unicode/numbers.|Align producer/reader; regenerate input, not history.|
| `ledger_invalid`, `ledger_foreign`, `ledger_nonextending`|Queue/DAG/ancestry.|Stop publication; recover trusted tip via protocol.|
| `queue_missing`, `policy_missing`, `work_queue_pool_not_installed`|Queue/pool; compiled/installed policy.|Bootstrap queue/policy; absent pool: quiesce, admin-authorized Policy addition.|
| `repository_unavailable`, `repository_scope_invalid`, `branch_invalid`, `git_transport_failed`|Repo/branch/credentials/Git.|Restore authorized transport; reread uncertain tip.|
| `actor_unauthorized`, `admission_unauthorized`, `unauthorized_operation`, `ownership_unauthorized`, `work_unauthorized`, `dependency_unauthorized`, `projection_unauthorized`, `resource_unauthorized`|Principal/role/profile/effect scope.|Authorized actor/path only; no impersonation.|
| `policy_invalid`, `policy_epoch_invalid`, `policy_proposal_mismatch`, `work_queue_policy_proposal_mismatch`, `profile_invalid`, `pool_invalid`, `dispatcher_invalid`|Schema/revision/epoch/pools/dispatcher.|Update trusted config via protocol.|
| `work_queue_profile_not_approved`, `work_queue_worker_not_compiler_approved`, `work_queue_dispatch_credential_identity_unavailable`|Installed profiles/dispatch allowlist.|Quiesce; update Policy/allowlist/credentials; reject unverified.|
| `work_queue_dispatch_broker_identity_unavailable`|Unverified broker App.|Configure verified dispatch credentials; never infer.|
| `deployment_invalid`, `deployment_conflict`|Schema/revision/tip.|Fix trusted deployment; reconcile before CAS retry.|
| `policy_not_quiescent`, `admission_paused`, `grants_paused`|Claims/dispatches; pause controls.|Respect pause; reconcile before authorized Policy change.|
| `work_expired`|Deadline/queue time.|Refresh fair prefix; never revive expired Work.|
| `hard_clear_snapshot_invalid`, `hard_clear_conflict`|Preview/tip/receipt.|Reconcile; reauthorize fresh preview; preserve newer snapshots.|
| `hard_clear_not_paused`|Admission/grant controls.|Pause both before authorized hard clear.|
| `hard_clear_unresolved`, `hard_clear_uncertain`|Reservations/Claims/barriers/effects/receipt.|Reconcile trusted evidence before retry; preserve unresolved effects.|
| `graph_invalid`, `graph_pool_conflict`, `node_conflict`, `replacement_invalid`, `work_conflict`, `work_identity_invalid`, `work_invalid`, `identity_invalid`|Graph/node/pool/payload/fingerprint/replacement.|Fix submission; retain accepted identity.|
| `dependency_cycle`, `dependency_duplicate`, `dependency_invalid`, `dependency_missing`, `dependency_result_unavailable`, `dependency_credentials_missing`|DAG/dependency/receipt/scoped credentials.|Fix graph/result/access; never fabricate completion.|
| `dependency_verifier_required`, `delivery_verifier_required`, `nonlaunch_verifier_required`, `remediation_verifier_required`|Verifier/evidence type.|Require approved verifier; otherwise block effects.|
| `ERR_WORK_QUEUE_CLAIM_SCOPE`, `assignment_invalid`, `assignment_immutable`, `claim_invalid`, `claim_missing`, `claim_conflict`, `claim_ineffective`|Immutable 1-16 Claims; owner/epoch/deadline.|Fix producer/reconcile; keep effective Claim identities/scopes.|
| `claim_scope_invalid`, `claim_scope_required`, `claim_effects_unauthorized`, `claim_control_delivery_invalid`|Claim handle/factory/scope/control.|Retain original write scope/validated control intent.|
| `child_entitlement`, `run_binding_conflict`, `run_invalid`|Parent/child/workflow/run/attempt identity.|Fix authorized binding; reject reused/mismatched authority.|
| `condition_invalid`, `control_invalid`, `packing_invalid`, `selection_invalid`, `priority_conflict`|Policy/control/scheduler inputs.|Recompute authoritative state; allowed transitions only.|
| `request_invalid`, `request_missing`, `request_fingerprint`, `request_reuse`, `request_reused`, `reason_invalid`, `timestamp_invalid`|Identity/fingerprint/schema/reason/timestamp.|Retry identical intent only; otherwise fresh ID.|
| `publication_conflict`, `publication_invalid`, `publication_unresolved`|Git tip, CAS, published commit.|Reread/reconcile before retry; publication may have succeeded.|
| `checkpoint_invalid`, `credential_generation_reused`|Checkpoint proof/ancestry; credential uniqueness.|Recover verified checkpoint/authorized fresh generation; no stale authority.|
| `dispatch_invalid`, `dispatch_missing`, `launch_started`, `launch_unresolved`|Reservation, receipt, possibly started child.|Reconcile immutable identity; no duplicate launch.|
| `claim_delivery_unverified`, `delivery_failed`, `verification_unresolved`, `delivery_conflict`, `delivery_barrier_conflict`, `delivery_contract_required`, `delivery_evidence_required`, `evidence_invalid`, `evidence_required`, `terminal_evidence_required`, `nonlaunch_evidence_required`|Claim state/effects, independent receipts, barrier/contract.|Reconcile before retry; no forced terminal state.|
| `result_invalid`, `completion_conflict`, `cancellation_conflict`, `ownership_terminal`, `work_terminal`, `work_missing`|Work/ownership/finish/result.|Respect terminal transitions; reconcile duplicate/conflicting completion/cancellation.|
| `retry_invalid`, `retry_exhausted`, `release_invalid`, `release_open_claims`, `remediation_invalid`|Retry/release policy, attempts, open claims.|Stop exhausted retries; reconcile claims; authorized recovery only.|
| `ERR_WORK_QUEUE_RECONCILIATION`, `observation_invalid`, `observation_conflict`, `reconciliation_invalid`, `reconciliation_pending`, `inspection_invalid`, `resource_unverified`|Reason/binding/provenance/freshness.|Bounded trusted reconciliation; block unverified; never force release.|
| `resource_invalid`, `resource_limit`, `assignment_limit`, `evidence_limit`, `graph_limit`, `work_queue_graph_limit`, `ledger_limit`, `observation_limit`, `operation_limit`, `payload_limit`, `pending_limit`, `projection_limit`, `reconciliation_limit`, `obsolete_limit`|Named limit; count.|Bound/batch/compact; keep limits.|
| `issue_binding_invalid`, `issue_binding_conflict`|Queue-issue binding/ownership.|Fix authorized binding; never adopt another Work's issue.|
| `projection_invalid`, `projection_journal_invalid`, `projection_journal_conflict`, `projection_scope_changed`, `projection_write_ambiguous`|Journal/ack/target/CAS.|Reconcile receipts; preserve uncertain writes/locks/history; no duplicates.|
| `projection_target_unavailable`, `projection_unavailable`|Failure; safe status/request ID.|Diagnose; preserve mirrors and locks.|
| `projection_receipt_pending`, `projection_comment_pending`, `projection_label_pending`, `projection_coordination_pending`, `projection_pagination_pending`, `projection_rate_pending`|Checkpoint/pacing/mirrors/receipts.|Reconcile exact request; never recreate mirrors or mistake pending for terminal failure.|
| `unsupported_protocol`|Ledger head version.|v3 head: dispatcher/producer/maintenance converts it; workers wait.|
| `codec_invalid`, `invalid_json`, `invalid_utf8`, `invalid_unicode`, `duplicate_key`, `noncanonical_number`|Canonical bytes/keys/Unicode/numbers.|Fix producer input; never edit history.|
| `ledger_invalid`, `checkpoint_invalid`, `ledger_limit`|Commit chain, checkpoint position, 64 MiB cap.|Stop publication; `compact` for size; restore from Git ancestry.|
| `queue_missing`, `policy_missing`, `policy_invalid`, `pool_invalid`|Branch exists; compiled `GH_AW_WORK_QUEUE_POLICY`; pool in `aw.json`.|First producer submit creates branch; fix `aw.json`, recompile.|
| `repository_unavailable`, `repository_scope_invalid`, `branch_invalid`, `git_transport_failed`|Repo/branch, credentials, Git failure.|Restore transport; reread tip.|
| `actor_unauthorized`, `unauthorized_operation`, `resource_unauthorized`|Actor repository, role vs operation, effect scope.|Use the role that owns the operation.|
| `cas_exhausted`, `publication_conflict`, `publication_invalid`|8 CAS attempts lost to writers.|Rerun; reread first, publication may have committed.|
| `request_invalid`, `request_reused`, `reason_invalid`|Kind/parameters/operations, request ID, reason enum.|Fix request; same intent retries are idempotent.|
| `graph_invalid`, `work_identity_invalid`, `work_invalid`, `resource_invalid`|Graph/node identity, Work fields, resource refs.|Fix submission; keep admitted identity.|
| `dependency_cycle`, `dependency_invalid`, `dependency_pending`, `observation_invalid`|DAG edges, predecessor state, Observation fields.|Fix graph; never fabricate completion.|
| `resource_limit`, `assignment_limit`, `work_queue_pending_limit`|GRAPH_NODES/MAX_PENDING_WORK, 48 KiB assignment, `pending_limit`.|Wait for drain or batch; keep limits.|
| `ownership_conflict`, `claim_conflict`, `claim_missing`, `work_missing`, `work_terminal`|Work state/owner, Claim ID reuse.|Release before cancel; respect terminal Work.|
| `ERR_WORK_QUEUE_CLAIM_SCOPE`, `claim_scope_invalid`, `claim_ineffective`, `work_queue_claim_handle_required`|Claim open, handle, dispatch bound to this run+attempt.|Use original `claim_handle`; no effects after Claim closes.|
| `dispatch_missing`, `dispatch_state_conflict`, `run_binding_conflict`, `work_queue_assignment_unknown`|Dispatch state; bound workflow/run/attempt.|Rerun only the bound run; else `release`.|
| `work_queue_effect_scope_denied` (E004)|Target repo vs profile `effect_scope`.|Target the worker's repository.|
| `issue_binding_conflict`|One Work per Issue; immutable link.|Never adopt another Work's Issue.|

## Unmapped codes

Expand Down
8 changes: 4 additions & 4 deletions .github/aw/otel.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ Resource attributes identify the service and workflow run, for example `service.
| Work queue | `gh-aw.work_queue.*` |

See the [OpenTelemetry attribute reference](../../docs/src/content/docs/reference/open-telemetry-attributes.mdx) for attribute descriptions and availability.
For work-queue operation names and instrumentation availability, see [OpenTelemetry queue health](../../docs/src/content/docs/reference/work-queue.md#open-telemetry-queue-health).
For work-queue operation names and instrumentation availability, see [OpenTelemetry queue health](../../docs/src/content/docs/reference/work-queue.md#opentelemetry-queue-health).

AI credits (`gh-aw.aic`) and token usage belong to the span that owns the usage: usually the dedicated agent span, or the executing job's conclusion span when no dedicated agent span is emitted. A run can have other conclusion spans that do not own that usage. Deduplicate records by trace ID and span ID before aggregating mirrored data. Explicit numeric zero is a measured value; missing cost or token data is not zero.

Work-queue attributes are point-in-time snapshots on operation spans. They are not counters and should not be summed across operations. Queue identifiers are hashed; treat remaining high-cardinality values as trace data rather than default metric dimensions.
Work-queue spans carry projection counts (point-in-time, do not sum across operations) and per-operation publication/commit counts. Queue identifiers are hashed; treat remaining high-cardinality values as trace data rather than default metric dimensions.

## Export and local artifacts

Expand Down Expand Up @@ -86,7 +86,7 @@ Choose the owning span first, then the attribute. Missing attributes mean unknow
| Outputs | `gh-aw.output.item_count`, `gh-aw.output.item_types` | Conclusion span |
| Graders | `gh-aw.graders.count`, `passed`, `failed`, `errors`, `unavailable`, `other`; `grader.result` events | Conclusion span for the job that owns the results. Includes operational-value grader results |
| Evals | `gh-aw.evals.count`, `yes`, `no`, `unknown`; `eval.result` events; `gh-aw.evals.status` for not-evaluated | Evals job span |
| Work queue | `gh-aw.work_queue.*` on `work_queue.<op>.run` spans | Point-in-time snapshots on operation spans. Do not sum |
| Work queue | `gh-aw.work_queue.*` on `work_queue.read` and `work_queue.publish` spans | Projection counts are point-in-time; do not sum |
| Adoption evaluation | No OTLP producer in this checkout | `gh-aw.adoption.*` is documented in the public reference. Spec §13 describes a downstream `gh-aw.adoption.evaluate` span; no `gh-aw.outcome.*` attribute exists in the spec or public reference |

Use `gh-aw.run.attempt` and `github.run_id` to correlate spans from re-runs. Do not use identifiers, error messages, or URLs as metric dimensions.
Expand Down Expand Up @@ -129,7 +129,7 @@ Source evidence is limited to implementation and tests; this table lists emitter
| Evals | `eval.result`, `eval.status` events; `gh-aw.evals.*` | `send_otlp_span.cjs` `buildEvalTelemetry` | Signals |
| Experiments | `gh-aw.experiment.<name>`, `gh-aw.experiments` | `send_otlp_span.cjs` `buildExperimentAttributes` | Identity |
| Admission | `gh-aw.admission`, `gh-aw.admission.http` (HTTP spans carry `traceparent`) | `actions/setup/js/check_admission.cjs` `main` | Signals |
| Work queue | `work_queue.<op>.run`, where `<op>` is `read`, `compact`, `publish`, `dispatch`, `reconcile`, or `reconcile_dispatch` | `actions/setup/js/work_queue_telemetry.cjs` `observeQueueOperation` (via `otlp.cjs` `logSpan`) | Work-queue attributes |
| Work queue | `work_queue.read`, `work_queue.publish` (nested operations fold into the outer span) | `actions/setup/js/work_queue_telemetry.cjs` `observeQueueOperation` (via `otlp.cjs` `logSpan`) | Work-queue attributes |
| Custom spans | `<toolName>.run` | `actions/setup/js/otlp.cjs` `logSpan` | Signals |
| Session logs | `otel.log` records in the `gh-aw.session` scope | `actions/setup/js/send_otlp_session_logs.cjs` `sendSessionLogs` | Signals |
| Usage and firewall | `gh-aw.aic`, `gen_ai.usage.*`, `gh-aw.firewall.*`, `gh-aw.mcp.*` on the owning span | `send_otlp_span.cjs` `sendJobConclusionSpan` | Measurements |
Expand Down
Loading
Loading