Skip to content

[spec-review] Update Safe Outputs conformance checker for recent spec changes - #78256

Merged
pelikhan merged 3 commits into
mainfrom
safe-outputs-conformance-1-29-26-de1722ca1851eee6
Nov 16, 2026
Merged

pelikhan merged 3 commits into
mainfrom
safe-outputs-conformance-1-29-26-de1722ca1851eee6

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

This PR updates scripts/check-safe-outputs-conformance.sh to cover Safe Outputs spec versions 1.29.22 through 1.29.26. The script previously covered up to 1.29.21. It adds 5 checks and changes no existing ones. The current code passes every new check, and the script exits with code 0. The 22 MEDIUM and 2 LOW warnings were already present before this change.

Specification Changes Reviewed

No steering comments were present on #78251.

📋 Script Updates & Testing Details

New Checks Added

  • TYPE-019 (HIGH): checkBranchPushable inspects active rules, uses GraphQL refUpdateRule and never the REST /protection endpoint. Only an explicit null allows the push. A missing field or a failed rules or GraphQL query blocks it.
  • TYPE-020 (HIGH/CRITICAL): evaluateProtectedFiles reuses checkFileProtectionPostApply and enforces the 3000-file limit. It includes rename sources, rejects incomplete or duplicate file evidence, and runs again during final revalidation. The compiler defaults to blocked and accepts only blocked or allowed.
  • SEC-013 (CRITICAL/HIGH/MEDIUM): the shared, cached createAuthenticatedLoginResolver resolves the login through the handler client and logs the bot fallback. add_comment and comment_memory call it only when candidates exist. They match user.login exactly, or fall back to user.type === "Bot", and never use github.actor / context.actor.
  • CFG-001 (HIGH): an explicit local steer removes the imported value. Imported create-pull-request expires / draft apply only when the local field is omitted.
  • TYPE-021 (HIGH): update-issue.operation is parsed and emitted as default_operation, and the schema enum is exactly replace/append/prepend/replace-island. The operation is resolved as agent value, then workflow default, then append, and only when the body is enabled and supplied.

Header metadata now lists Spec Version 1.29.26.

Checks Modified / Removed

None.

Testing

bash -n scripts/check-safe-outputs-conformance.sh   # OK
[PASS] TYPE-019 ... [PASS] TYPE-020 ... [PASS] SEC-013 ... [PASS] CFG-001 ... [PASS] TYPE-021
Critical Failures: 0
High Failures: 0
Medium Failures: 22   (pre-existing)
Low Failures: 2       (pre-existing)
exit=0

Negative tests: I temporarily changed comment_memory.cjs to use a [bot] suffix, and SEC-013 reported CRITICAL. I temporarily changed the refUpdateRule undefined check in pr_helpers.cjs, and TYPE-019 reported HIGH. Both files were restored.

Related Files

  • Specification: docs/src/content/docs/specs/safe-outputs-specification.md
  • Conformance Script: scripts/check-safe-outputs-conformance.sh

Next Actions

  • Review the new grep anchors. They follow the current code closely, so refactors to these handlers may require updating the checks.

Generated by 🔒 Weekly Safe Outputs Specification Review · pi · opus55 · ~83 AIC · ⌖ ~55 AIC · ⊞ 1.5K · ◷

  • expires on Nov 22, 2026, 8:36 PM UTC-08:00

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.

🟡 Changes recommended

TYPE-020 can pass despite a weakened file-count limit or removed duplicate-filename rejection because its text anchors match unrelated code, leaving fail-closed regressions undetected.

2 open issues
What changed in this PR

Updates the Safe Outputs conformance checker to cover specification versions 1.29.22–1.29.26, extending automated checks for recent runtime and compiler safeguards.

Changes:

  • Adds checks for branch protection, protected-file merge validation, and authenticated comment selection.
  • Adds checks for imported configuration precedence and default issue body operations.
  • Updates version metadata without modifying existing checks.
File Description
scripts/​check-safe-outputs-conformance.sh Adds five conformance checks and updates specification version metadata.

Review effort: Balanced (dynamic)

log_high "TYPE-020: protected-files: allowed is not the only configuration that disables the changed-file gate"
failed=1
fi
if ! echo "$fn" | grep -q '3000'; then

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.

Updated TYPE-020 to match the actual pr.changed_files > 3000 guard and added a negative fixture for a weakened limit. Commit: 6556717.

log_high "TYPE-020: Rename/copy source paths are not included in protected-file evaluation"
failed=1
fi
if ! echo "$fn" | grep -q 'pr.changed_files' || ! echo "$fn" | grep -q 'new Set'; then

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.

Updated TYPE-020 to require the filename-set size and changed-file count comparisons, with a negative fixture that removes duplicate-filename rejection. Commit: 6556717.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (scripts/check-safe-outputs-conformance.sh:3563): address unresolved feedback - Review comment
  3. Review (scripts/check-safe-outputs-conformance.sh:3571): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "9a69bfafe4b6798235c418aafd041f7ca87ff4c2",
  "kind": "requested",
  "schema_version": "1",
  "state": "0f8a7b0f2c0b90534326185a5b4c95f9fcefc90afa61c2188a9fa6698278f8f4",
  "work": [
    "1d2f5e13079ab6f75f0c5fb7c482ed3b03a38008bf1f52ed7af32214459b5b77",
    "2ef79765c2cab5f2dc222c63f9cf80108e72676d75cf0a29dcf220bed8b7c03d"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

gh-aw-bot and others added 2 commits November 16, 2026 05:14
…nce-1-29-26-de1722ca1851eee6

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Triage

  • Category: feature
  • Risk: medium
  • Score: 65/100 (impact 29 + urgency 20 + quality 16)
  • Recommended action: fast_track
  • Notes: Safe Outputs conformance update, important for spec compliance and automation health.

Generated by 🔧 PR Triage Agent · copilot · mai11 · ~9 AIC · ⌖ ~2 AIC · ⊞ 15.3K · ◷

@github-actions

Copy link
Copy Markdown
Contributor Author

Category: feature
Risk: medium
Total score: 65/100
Score breakdown: impact 35 + urgency 19 + quality 11 = 65
Recommended action: fast_track
Batch: none

Generated by 🔧 PR Triage Agent · copilot · mai11 · ~6 AIC · ⌖ ~2 AIC · ⊞ 15.3K · ◷

@pelikhan
pelikhan merged commit 740c9e8 into main Nov 16, 2026
62 checks passed
@pelikhan
pelikhan deleted the safe-outputs-conformance-1-29-26-de1722ca1851eee6 branch November 16, 2026 15:08
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.3.1

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.

4 participants