Repository navigation
[Safe Outputs Conformance] REQ-002: Complete required spec sections for 12 safe output types - #78954
Conversation
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved specification mismatches can produce invalid workflows and misrepresent supported authentication, repository authorization, and staged-mode mutation behavior.
12 open issues
Qualify commit-message preservation when signed commits are enabled · New Measure patch size on uncompressed and expanded content, not the bundle · New Allow documented PAT authentication for project operations · New Staged view creation can still create configured fields on the live project · New Require an explicit project in each update message · New Document target-repo and allowed-repos authorization checks · New Document required project and inherited global safe-output settings · New Document release body-footer and token as global settings · New Document the generated workflow tool interface, not the internal message · New Clarify validation for omitted refs versus explicit ref overrides · New Document context-sensitive base branch resolution · New Document body-footer as an inherited global setting · New
What changed in this PR
This documentation-only PR addresses REQ-002 by completing the required specification sections for 12 safe output types in gh-aw.
Changes:
- Adds MCP schema descriptions, operational semantics, and security requirements.
- Adds missing configuration parameter sections while retaining existing permission documentation.
- Leaves runtime code and workflows unchanged.
| File | Description |
|---|---|
docs/src/content/docs/specs/safe-outputs-specification.md |
Expands 12 safe output entries to cover the five required specification sections. |
Review effort: Balanced (adaptive)
|
|
||
| **Operational Semantics**: | ||
|
|
||
| 1. **Required Message**: `message` is required on every call and is not read from git. Existing local commits keep their own commit messages. |
| 6. **Size Limit**: A patch or bundle larger than `max-patch-size` (default 4096 KB) MUST fail the item. | ||
| 7. **No Changes**: When there is nothing to push, the outcome follows `if-no-changes` (`warn` by default, `error`, or `ignore`). | ||
| 8. **Staged Mode**: In staged mode the handler previews the push and performs no mutation. | ||
|
|
||
| **Security Requirements**: | ||
|
|
||
| - The privileged handler MUST NOT accept concurrency-control or head-pinning parameters from the agent; the pull request head is pinned by the handler. | ||
| - Patch or bundle size MUST be validated against `max-patch-size` before it is applied. |
|
|
||
| - The owner MUST be resolved from the message or configuration; creation without an owner MUST fail. | ||
| - Temporary IDs MUST match `aw_` followed by 3 to 12 alphanumeric or underscore characters. | ||
| - Project creation requires a GitHub App token; see Required Permissions. |
| 4. **Field Updates**: `fields` values are applied to the project item after it is added. | ||
| 5. **Configured Fields and Views**: `field_definitions` and `views` from configuration are created even when the agent does not request them, and configured field definitions fill in when `create_fields` omits its own. | ||
| 6. **View Validation**: A view MUST have a non-empty `name` and a `layout` of `table`, `board`, or `roadmap`. | ||
| 7. **Staged Mode**: In staged mode the handler previews the update and performs no mutation. |
| **Configuration Parameters**: | ||
|
|
||
| - `max`: Operation limit | ||
| - `project`: Default project URL |
| - `body-footer`: Deterministic body footer template | ||
| - `github-token`: Handler-level token override |
| **MCP Tool Schema**: | ||
|
|
||
| ```json | ||
| { | ||
| "name": "dispatch_workflow", | ||
| "description": "Dispatch an allowed workflow via workflow_dispatch.", | ||
| "inputSchema": { | ||
| "type": "object", | ||
| "required": ["workflow_name"], | ||
| "properties": { | ||
| "workflow_name": {"type": "string"}, | ||
| "inputs": {"type": "object"}, | ||
| "ref": {"type": "string"} | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| > **Note**: The schema above is abbreviated; the compiled tool definition also carries the `secrecy` and `integrity` provenance fields used by all safe output tools. |
|
|
||
| 1. **Per-Run Limit**: Once `max` dispatches have been made, further items MUST be rejected. | ||
| 2. **Workflow Allowlist**: `workflow_name` MUST appear in `workflows`; otherwise the item fails with an error that lists the allowed workflows. | ||
| 3. **Repository and Ref Validation**: Cross-repository targets MUST satisfy `target-repo` and `allowed-repos`. A per-call `ref` MUST match `allowed-refs`, or the default branch when `allowed-refs` is omitted. |
|
|
||
| 1. **Empty Task**: An empty or whitespace-only `body` MUST fail the item without calling the API. | ||
| 2. **Repository Validation**: The target repository MUST be the configured `target-repo` (or the current repository) or appear in `allowed-repos`; otherwise the item fails. | ||
| 3. **Base Branch**: `base` from configuration is used when set; otherwise the repository default branch is resolved. |
| - `base`: Base branch for the session | ||
| - `target-repo`: Cross-repository target | ||
| - `allowed-repos`: Cross-repo allowlist | ||
| - `body-footer`: Deterministic footer appended to the task description |
|
🎉 This pull request is included in a new release. Release: |

Conformance Check Failure
Check ID: REQ-002
Severity: MEDIUM
Category: Specification
Problem Description
The conformance checker reported 12 safe output types in the specification with fewer than the 5 required sections (MCP Tool Schema, Operational Semantics, Configuration Parameters, Security Requirements, Required Permissions). This leaves implementers without normative behavior for these types.
Affected Components
docs/src/content/docs/specs/safe-outputs-specification.mdCurrent vs Expected Behavior
Current Behavior
The 12 types documented only 1-2 of the 5 required sections (typically only Required Permissions).
Expected Behavior
Each type documents all 5 sections, consistent with types such as
add_labelsandassign_to_user.Remediation Steps
pkg/workflow/js/safe_outputs_tools.json(and thedispatch_workflowhandler message fields, which has no static tool entry).actions/setup/js/.This is a documentation-only change; no code or workflows changed.
Validation
bash scripts/check-safe-outputs-conformance.sh: REQ-002 now passes. Critical 0, High 0, Medium 0 (was 12), Low 3 (unchanged USE-001 findings, not addressed here).make agent-report-progress-no-test: passed. It reported no Go/JS/JSON changes and no workflow recompilation needed.make agent-report-progress(unit tests) was not run. The change is Markdown-only and there are no impacted tests.push_to_pull_request_branchanddispatch_workflowsemantics.References
🤖 Generated with [Claude Code]((claude.com/redacted)