Skip to content

Tighten reference docs for artifact compatibility, audit JSON contracts, and safe-output safeguards#47117

Merged
pelikhan merged 3 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-07-21
Jul 22, 2026
Merged

Tighten reference docs for artifact compatibility, audit JSON contracts, and safe-output safeguards#47117
pelikhan merged 3 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-07-21

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This updates the SPDD reference pages that had gaps in safeguards, norms, and sync coverage. The changes make legacy behavior, missing-field conditions, experimental status, and cross-spec linkages explicit in the high-traffic docs most likely to be consumed directly.

  • Artifacts reference

    • Added a deprecation notice for legacy safe-output and agent-output artifacts, including migration guidance toward the unified agent artifact and a removal floor.
    • Added sync notes pointing doc maintenance back to the artifact-name constants in pkg/constants/....
    • Annotated the agent and firewall-audit-logs rows with their implementation source.
  • Audit reference

    • Moved the --json stability contract next to the --json flag docs for both gh aw audit and gh aw logs.
    • Documented when ambient_context is absent instead of leaving it as an implicit “when available” field.
    • Kept the contract scoped to stable top-level fields and extensible nested payloads.
  • Billing reference

    • Added a pre-run estimation pattern based on recent runs and published model tables.
    • Clarified that gh aw compile does not auto-inject permissions.copilot-requests: write; authors must declare it unless a higher-level authoring flow adds it explicitly.
  • GH-AW as MCP server

    • Documented --validate-actor behavior when GITHUB_ACTOR is unset: privileged tools remain mounted but return permission errors.
    • Documented permission-cache invalidation semantics: in-memory only, 1h TTL, restart clears cache, no manual flush.
  • Safe outputs / pull requests

    • Added explicit graduation criteria for experimental merge-pull-request.
    • Added the missing cross-repository linkage for head-repo / fork flows.
    • Added a Related Documentation section that points back to cross-repo and safe-output references.
  • Cross-repository reference

    • Added the reverse link back to the PR safe-outputs reference to make the fork/target-repo docs bidirectional.

Example of the clarified JSON contract placement:

| `--json` | off | Output report as JSON to stdout |

Top-level fields in `--json` output are stable; nested sub-fields may be extended but are not removed without deprecation.

Copilot AI linked an issue Jul 21, 2026 that may be closed by this pull request
11 tasks
Copilot AI and others added 2 commits July 21, 2026 16:29
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update reference documentation for correctness and safeguards Tighten reference docs for artifact compatibility, audit JSON contracts, and safe-output safeguards Jul 21, 2026
Copilot AI requested a review from pelikhan July 21, 2026 16:47
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

Field Value
Category docs
Risk low
Score 28 / 100
Action batch_review
Batch

Score breakdown: Impact 12 · Urgency 8 · Quality 8

Draft PR with documentation-only changes (6 reference docs + 1 lock file). Low urgency; no CI data. Recommend batching with other docs PRs.

Generated by 🔧 PR Triage Agent · sonnet46 43.3 AIC · ⌖ 5.33 AIC · ⊞ 5.6K ·

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Excellent Work!

This PR is well-aligned with the project's contribution standards. The documentation updates are focused, comprehensive, and improve clarity across multiple reference pages:

  • Artifact compatibility — Deprecation notices and migration guidance for legacy artifacts
  • Audit JSON contracts — Explicit stability guarantees and field availability documentation
  • Billing & MCP server docs — Practical patterns and permission semantics
  • Safe-output safeguards — Graduation criteria and cross-repository linkage

The changes are focused, coherent, and thoroughly documented in the PR body. The implementation is ready for review by maintainers.

Generated by ✅ Contribution Check · sonnet46 59 AIC · ⌖ 11.2 AIC · ⊞ 6.2K ·

@pelikhan
pelikhan marked this pull request as ready for review July 22, 2026 05:48
Copilot AI review requested due to automatic review settings July 22, 2026 05:48
@pelikhan
pelikhan merged commit 359147c into main Jul 22, 2026
@pelikhan
pelikhan deleted the copilot/spdd-daily-spec-work-plan-2026-07-21 branch July 22, 2026 05:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Tightens reference documentation around compatibility, JSON contracts, billing, MCP safeguards, and cross-repository safe outputs.

Changes:

  • Documents legacy artifacts and JSON field availability.
  • Adds billing estimation and MCP permission-cache guidance.
  • Expands safe-output stability criteria and cross-reference links.
Show a summary per file
File Description
artifacts.md Adds compatibility and source annotations.
audit.md Clarifies JSON contracts and ambient context.
billing.md Adds billing permission and estimation guidance.
gh-aw-as-mcp-server.md Documents actor validation and caching.
safe-outputs-pull-requests.md Adds graduation criteria and related links.
cross-repository.md Adds reverse PR safe-output linkage.
smoke-call-workflow.lock.yml Reduces reusable-workflow Actions permission.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 7/7 changed files
  • Comments generated: 3
  • Review effort level: Medium


```bash
gh aw logs my-workflow --last 5 --json \
| jq '.per_run_breakdown[] | {run_id, aic, action_minutes}'
The report output includes an executive summary, domain inventory, metrics trends, MCP server health, and per-run breakdown. It detects cross-run anomalies such as domain access spikes, elevated MCP error rates, and connection rate changes.

For each run in detailed logs JSON output, an `ambient_context` object is included when token usage data is available. It reflects only the first LLM invocation in the run (`input_tokens`, `cached_tokens`, and legacy `effective_tokens`).
For each run in detailed logs JSON output, an `ambient_context` object is included when token usage data is available. It reflects only the first LLM invocation in the run (`input_tokens`, `cached_tokens`, and legacy `effective_tokens`). It is absent when the downloaded artifacts do not contain usable `token-usage.jsonl` or fallback `agent_usage.json` data for that run.
| `agent` | `constants.AgentArtifactName`<br/>Source: `pkg/constants/job_constants.go` | Multi-file | Unified agent job outputs (logs, safe outputs, token usage summary) |
| `activation` | `constants.ActivationArtifactName` | Multi-file | Activation job output (`aw_info.json`, `prompt.txt`, rate limits) |
| `firewall-audit-logs` | `constants.FirewallAuditArtifactName` | Multi-file | AWF firewall audit/observability logs (token usage, network policy, audit trail) |
| `firewall-audit-logs` | `constants.FirewallAuditArtifactName`<br/>Source: `pkg/constants/constants.go` | Multi-file | AWF firewall audit/observability logs (token usage, network policy, audit trail) |
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[spdd] Daily spec work plan - 2026-07-21

3 participants