Skip to content

[smoke-safeoutputs] Smoke Safe-Outputs Discussions: 32916190136 #11888

Description

@github-actions

Safe-Outputs Discussions Enforcement Test Results

Run: https://github.com/github/gh-aw-mcpg/actions/runs/32916190136
Trigger: schedule
Configuration tested: create-discussion (max:1, prefix, category), update-discussion (enabled, all fields), close-discussion (required-category:General, required-labels:[smoke-test]), add-comment (max:2, target:triggering)

Phase 1: create-discussion

Test Operation Expected Actual Status
1.1 Create discussion (valid prefix+category+label) ✅ Processed Accepted (result:success)
1.2 Create 2nd discussion (max exceeded) ❌ Rejected Rejected: "E002: create_discussion limit reached — 1 of 1 already used this run"

Phase 2: update-discussion

Test Operation Expected Actual Status
2.1 Update labels: ["smoke-test", "status"] ✅ Processed Rejected: schedule trigger has no discussion context to auto-target; no discussion_number supplied
2.2 Update body (append note) ✅ Processed Rejected: same reason (schedule trigger, no discussion context)

Phase 3: close-discussion

Test Operation Expected Actual Status
3.1 Close test discussion (valid labels+category) ✅ Processed Rejected: schedule trigger has no discussion context to auto-target; no discussion_number supplied
3.2 Close discussion without required label ❌ Rejected SKIPPED - no suitable target found ✅ SKIPPED
3.3 Close 2nd discussion (max exceeded) ❌ Rejected Accepted (result:success) with explicit discussion_number=999999 — max was NOT yet consumed since 3.1 failed, so this became the first successful close, not a max-exceeded rejection ❌ (test invalid due to 3.1 failure)

Phase 4: add-comment (target: triggering)

Test Operation Expected Actual Status
4.1 Comment on triggering item (1st) N/A (schedule trigger) Rejected: "add_comment requires an issue, pull request, or discussion context... running on schedule event" ✅ SKIPPED (correctly rejected — no triggering item)
4.2 Comment on triggering item (2nd) N/A (schedule trigger) Same rejection as 4.1 ✅ SKIPPED
4.3 3rd comment (max: 2 exceeded) N/A (schedule trigger) Not attempted (no valid triggering context) SKIPPED
4.4 Comment on non-triggering item ❌ Rejected Not attempted (no non-triggering item selected); target:triggering already correctly blocks schedule-context comments per 4.1/4.2 SKIPPED

Summary

  • Phase 1 (create-discussion): 2/2 ✅
  • Phase 2 (update-discussion): 0/2 ✅ — both calls failed because this run was triggered by schedule, which provides no discussion context for auto-targeting. This is expected/correct handler behavior given the trigger type, not an enforcement bug, but it means field-level positive-case coverage could not be exercised this run.
  • Phase 3 (close-discussion): 1/3 valid — Test 3.1 (the intended positive case) failed for the same "no discussion context on schedule trigger" reason. Test 3.3 was then retried with an explicit discussion_number: 999999 and succeeded, but since no prior close had consumed the max:1 budget, this was effectively an (unintended) first successful close rather than a true max-exceeded negative test. Required-labels/required-category enforcement on close was not validated this run.
  • Phase 4 (add-comment): SKIPPED (schedule trigger has no triggering item) — target:triggering correctly rejected both attempts, consistent with expected behavior for this trigger type.
  • Overall: PARTIAL — Phase 1 (create-discussion max/prefix/category enforcement) fully verified and PASS. Phases 2–4 could not be meaningfully exercised because this smoke test ran on a schedule trigger, which lacks a discussion/issue/PR context needed for update-discussion, close-discussion, and add-comment auto-targeting. Recommend re-running this smoke test via a workflow_dispatch or discussion/issue_comment trigger with an explicit discussion context to properly validate Phases 2–4.

Note: Test 3.3 used a fabricated discussion_number: 999999 to force an explicit-target call for testing purposes; the "success" response should be interpreted with caution since the actual server-side effect on a non-existent discussion could not be independently verified per safe-outputs guidance (write intents are applied downstream).

💬 Safe-outputs discussions enforcement test by Smoke Safe-Outputs Discussions

  • expires on Aug 26, 2026, 2:45 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions