Skip to content

DO NOT MERGE — ci-fixer test sandbox#158

Closed
microsasa wants to merge 9 commits intomainfrom
test/responder-sandbox
Closed

DO NOT MERGE — ci-fixer test sandbox#158
microsasa wants to merge 9 commits intomainfrom
test/responder-sandbox

Conversation

@microsasa
Copy link
Owner

Test PR for ci-fixer agent. Contains intentionally broken code (pyright type error). DO NOT MERGE.

@microsasa microsasa added the aw Created by agentic workflow label Mar 19, 2026
Copilot AI review requested due to automatic review settings March 19, 2026 06:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Sandbox PR intended to exercise the ci-fixer/review-responder automation and CI gates by introducing a deliberately failing pyright case and updating gh-aw workflow configurations.

Changes:

  • Added a new test-module “sandbox” file containing intentionally imperfect code, including a pyright type error.
  • Switched the Review Responder workflow to workflow_dispatch with a pr_number input and expanded safe-output targeting/labeling.
  • Updated gh-aw compiled lock workflows (review-responder, ci-fixer) to reflect new checkout/fetch behavior and safe-output configuration.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/test_responder_sandbox.py Adds sandbox functions, including an intentional pyright type error.
.github/workflows/review-responder.md Changes trigger to manual dispatch and broadens safe-output scope.
.github/workflows/review-responder.lock.yml Recompiled workflow reflecting new trigger/concurrency/prompt settings.
.github/workflows/ci-fixer.md Adds checkout fetch settings and broad safe-output targeting/labeling.
.github/workflows/ci-fixer.lock.yml Recompiled workflow adding full-history checkout and an all-branches fetch step.

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

Comment on lines 33 to 39
safe-outputs:
noop:
report-as-issue: false
push-to-pull-request-branch:
target: "*"
labels: [aw]
github-token: ${{ secrets.GH_AW_WRITE_TOKEN }}
return result


def broken_function(value: int) -> str:
Comment on lines +12 to +16
result = ""
for item in data:
suffix = "\n" if verbose else ", "
result = result + str(item) + suffix
return result
Comment on lines 1 to +8
---
if: "contains(github.event.pull_request.labels.*.name, 'aw')"
on:
pull_request_review:
types: [submitted]
roles: all
bots: [Copilot, copilot-pull-request-reviewer]
workflow_dispatch:
inputs:
pr_number:
description: "PR number to address review comments on"
required: true
type: string
Comment on lines +36 to +40
target: "*"
labels: [aw]
github-token: ${{ secrets.GH_AW_WRITE_TOKEN }}
reply-to-pull-request-review-comment:
target: "*"
concurrency:
group: "gh-aw-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}"
cancel-in-progress: true
group: "gh-aw-${{ github.workflow }}"

checkout:
fetch: ["*"]
fetch-depth: 0
Comment on lines +280 to +282
run: |
header=$(printf "x-access-token:%s" "${GH_AW_FETCH_TOKEN}" | base64 -w 0)
git -c "http.extraheader=Authorization: Basic ${header}" fetch origin '+refs/heads/*:refs/remotes/origin/*'
@github-actions
Copy link
Contributor

Commit pushed: 4a29e00

Generated by CI Fixer

Copilot AI review requested due to automatic review settings March 19, 2026 06:42
@microsasa microsasa force-pushed the test/responder-sandbox branch from 4a29e00 to 95597ab Compare March 19, 2026 06:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Test/sandbox PR intended to exercise the ci-fixer/review-responder automation by introducing a new “responder sandbox” test module and adjusting gh-aw workflows to operate via workflow_dispatch with broader checkout/safe-output targeting.

Changes:

  • Added tests/test_responder_sandbox.py with intentionally imperfect helper functions.
  • Switched review-responder to workflow_dispatch and updated safe-outputs/checkout settings (plus regenerated the compiled .lock.yml).
  • Updated ci-fixer safe-outputs/checkout settings (plus regenerated the compiled .lock.yml).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/test_responder_sandbox.py Adds sandbox code intended to trigger automation/lint/type-check behavior.
.github/workflows/review-responder.md Moves responder workflow to workflow_dispatch; broadens checkout + safe-outputs targeting.
.github/workflows/review-responder.lock.yml Regenerated compiled workflow reflecting the responder .md changes.
.github/workflows/ci-fixer.md Adds checkout fetch settings and broadens push safe-output targeting for dispatch use.
.github/workflows/ci-fixer.lock.yml Regenerated compiled workflow reflecting the ci-fixer .md changes.

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

Comment on lines +12 to +16
result = ""
for item in data:
suffix = "\n" if verbose else ", "
result = result + str(item) + suffix
return result


def broken_function(value: int) -> str:
return str(value + 1)
Comment on lines +1 to +8
# Responder Sandbox — intentionally imperfect code for testing


def calculate_total(lst: list[int]) -> int:
total = 0
for i in lst:
total = total + i
return total
Comment on lines +54 to +60
This workflow addresses unresolved review comments on a pull request.

3. Check if the PR already has the label `review-response-attempted`. If it does, add a comment to the PR saying "Review response already attempted — stopping to prevent loops. Manual intervention needed." and stop.
1. Check if the PR already has the label `review-response-attempted`. If it does, add a comment to the PR saying "Review response already attempted — stopping to prevent loops. Manual intervention needed." and stop.

4. Add the label `review-response-attempted` to the PR.
2. Add the label `review-response-attempted` to the PR.

5. Read the unresolved review comment threads on the PR (not just the latest review — get all unresolved threads). If there are more than 10 unresolved threads, address the first 10 and leave a summary comment on the PR noting how many remain for manual follow-up.
3. Read the unresolved review comment threads on the PR (not just the latest review — get all unresolved threads). If there are more than 10 unresolved threads, address the first 10 and leave a summary comment on the PR noting how many remain for manual follow-up.
Comment on lines 60 to 66
3. Read the unresolved review comment threads on the PR (not just the latest review — get all unresolved threads). If there are more than 10 unresolved threads, address the first 10 and leave a summary comment on the PR noting how many remain for manual follow-up.

6. For each unresolved review comment thread (up to 10):
4. For each unresolved review comment thread (up to 10):
a. Read the comment and understand what change is being requested
b. Read the relevant file and surrounding code context
c. Make the requested fix in the code (edit the file locally — do NOT push yet)
c. Make the requested fix in the code
d. Reply to the comment thread explaining what you changed
@microsasa
Copy link
Owner Author

🔍 Quality Gate — Manual Review Required

Impact: HIGH — This PR modifies CI/CD workflow infrastructure and is not eligible for auto-merge.

Why manual review is needed

  1. PR explicitly marked "DO NOT MERGE" — The title and body both state this is a test sandbox PR that should not be merged.

  2. CI/CD workflow changes (.github/workflows/):

    • review-responder: Architecturally significant change — switches trigger from pull_request_review (event-driven) to workflow_dispatch (manual), removes bot filters, removes if: label gate, changes concurrency group. This fundamentally changes how review responses are triggered in the pipeline.
    • ci-fixer: Adds checkout: fetch: ["*"], fetch-depth: 0, target: "*", and labels: [aw] to safe-outputs config. These expand the workflow's access scope.
  3. Test sandbox file (tests/test_responder_sandbox.py): Contains utility functions but no actual test functions (no test_ prefix). Will not be executed by pytest.

What a human reviewer should examine

  • Whether the review-responder trigger change from event-driven to manual dispatch is intentional and desired for production
  • Whether target: "*" on safe-outputs is appropriately scoped
  • Whether this PR was ever intended to be merged, or should remain open only as a test sandbox

Generated by Quality Gate for issue #158 ·

Warning

⚠️ Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • astral.sh
  • pypi.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "astral.sh"
    - "pypi.org"

See Network Configuration for more information.

microsasa pushed a commit that referenced this pull request Mar 19, 2026
MCP tools intermittently return empty results for review data.
The agent sometimes falls back to REST API on its own (PR #152)
but not always (PR #158). Explicitly instruct it to use the
REST API endpoints for comments and reviews.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsasa microsasa force-pushed the test/responder-sandbox branch from 95597ab to 8f0d9f9 Compare March 19, 2026 07:02
@microsasa
Copy link
Owner Author

CI fix already attempted once — stopping to prevent loops. Manual intervention needed.

Generated by CI Fixer ·

@github-actions
Copy link
Contributor

Commit pushed: 2cb0807

Generated by CI Fixer

Copilot AI review requested due to automatic review settings March 19, 2026 07:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Test/sandbox PR intended to exercise the ci-fixer/review-responder automation by introducing a new sandbox test module and modifying gh-aw agent workflow configs (including switching review-responder to workflow_dispatch and widening safe-output targets).

Changes:

  • Add tests/test_responder_sandbox.py sandbox module (non-test helper functions).
  • Update gh-aw workflow markdown configs to fetch full history/refs and set safe-outputs target: "*" (and add aw labeling on push).
  • Regenerate corresponding compiled .lock.yml workflows to match the updated .md definitions.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/test_responder_sandbox.py Adds a sandbox Python module under tests/ for responder/ci-fixer experimentation.
.github/workflows/review-responder.md Converts responder trigger to workflow_dispatch, adds checkout fetch config, widens safe-output targeting, and updates instructions.
.github/workflows/review-responder.lock.yml Compiled workflow updates reflecting the responder markdown changes.
.github/workflows/ci-fixer.md Adds checkout fetch config and widens safe-output targeting (plus aw label on push).
.github/workflows/ci-fixer.lock.yml Compiled workflow updates reflecting the ci-fixer markdown changes.

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

Comment on lines 36 to 39
push-to-pull-request-branch:
target: "*"
labels: [aw]
github-token: ${{ secrets.GH_AW_WRITE_TOKEN }}
Comment on lines +62 to 66
4. For each unresolved review comment thread (up to 10):
a. Read the comment and understand what change is being requested
b. Read the relevant file and surrounding code context
c. Make the requested fix in the code (edit the file locally — do NOT push yet)
c. Make the requested fix in the code
d. Reply to the comment thread explaining what you changed
report-as-issue: false
push-to-pull-request-branch:
target: "*"
labels: [aw]
2. Add the label `review-response-attempted` to the PR.

5. Read the unresolved review comment threads on the PR (not just the latest review — get all unresolved threads). If there are more than 10 unresolved threads, address the first 10 and leave a summary comment on the PR noting how many remain for manual follow-up.
3. Read the unresolved review comment threads on the PR using the GitHub REST API: fetch `https://api.github.com/repos/$OWNER/$REPO/pulls/$PR_NUMBER/comments` and `https://api.github.com/repos/$OWNER/$REPO/pulls/$PR_NUMBER/reviews`. If there are more than 10 unresolved threads, address the first 10 and leave a summary comment on the PR noting how many remain for manual follow-up.
Comment on lines +54 to +58
This workflow addresses unresolved review comments on a pull request.

3. Check if the PR already has the label `review-response-attempted`. If it does, add a comment to the PR saying "Review response already attempted — stopping to prevent loops. Manual intervention needed." and stop.
1. Check if the PR already has the label `review-response-attempted`. If it does, add a comment to the PR saying "Review response already attempted — stopping to prevent loops. Manual intervention needed." and stop.

4. Add the label `review-response-attempted` to the PR.
2. Add the label `review-response-attempted` to the PR.
Sasa Junuzovic and others added 9 commits March 19, 2026 07:24
Exact match to the version that successfully addressed review
threads (run 23117978475, 2026-03-15), with only two changes:
1. Added if: label gate for aw PRs
2. Removed resolve-pull-request-review-thread safe-output and
   step 6e (orchestrator handles resolution)

No other changes. This commit should not be modified.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace pull_request_review trigger with workflow_dispatch + pr_number
input. No more loops from stray review events. Orchestrator or
manual dispatch controls when responder runs.

Removed aw label check and triggering review check — no longer
applicable with workflow_dispatch. Renumbered steps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
If CI checks fail after addressing review comments, fix the
issues and re-run until they pass. Do not push broken code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reply-to-pull-request-review-comment and push-to-pull-request-branch
safe output handlers default to target 'triggering' which requires a
pull_request event context. Setting target to '*' lets the agent
specify the PR number in each message, enabling workflow_dispatch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Same fix as the responder: set target '*' on push-to-pull-request-branch
so the agent specifies the PR number in its message (no event context
needed). Added labels: [aw] to restrict pushes. Added checkout fetch
config so all remote branches are available.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MCP tools intermittently return empty results for review data.
The agent sometimes falls back to REST API on its own (PR #152)
but not always (PR #158). Explicitly instruct it to use the
REST API endpoints for comments and reviews.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Intentionally imperfect code for testing the review-responder agent.
DO NOT MERGE this branch to main.
Fix broken_function return type mismatch: wrap int result with str()
to match declared return type.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsasa microsasa force-pushed the test/responder-sandbox branch from 2cb0807 to 81ef7b1 Compare March 19, 2026 07:24
@microsasa
Copy link
Owner Author

Quality Gate — Closing PR

This PR is being closed because it fails quality evaluation:

  1. Explicit "DO NOT MERGE" directive — Both the title ("DO NOT MERGE — ci-fixer test sandbox") and body ("Contains intentionally broken code... DO NOT MERGE") explicitly state this PR should not be merged.

  2. Test sandbox code — The added tests/test_responder_sandbox.py contains intentionally imperfect functions (broken_function, calculate_total) created solely for testing the ci-fixer and review-responder agents, not as production code.

  3. HIGH impact infrastructure changes — The PR modifies critical workflow files (.github/workflows/ci-fixer.md, review-responder.md, and their compiled .lock.yml files), including trigger type changes (pull_request_reviewworkflow_dispatch) and safe-output configuration changes (target: "*"). These require careful human review.

  4. Documentation removal — Removes substantive documentation sections from docs/agentic-workflows.md and historical entries from docs/changelog.md without clear justification in a test sandbox PR.

The source issue (if any) remains open for proper implementation. If the workflow infrastructure changes are intended to land, they should be submitted in a dedicated PR with appropriate review.

Generated by Quality Gate for issue #158

@microsasa microsasa closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants