-
Notifications
You must be signed in to change notification settings - Fork 2
feat(seidroid-review): add the agentic pull request reviewer as a reusable workflow #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| name: Workflow tests | ||
| # The shell and jq inside seidroid-review.yml, run against a gh stub, and its job | ||
| # conditions evaluated against synthetic payloads. Nothing here reaches the GitHub | ||
| # API, so this needs no token and no permissions. | ||
| # | ||
| # Five jobs, so each check in the list names the step it covers. A job that ran two | ||
| # harnesses would report one name for two things, and one check would go red for the | ||
| # other's failure. | ||
| # | ||
| # `Place findings and resolve threads` covers a pair of steps rather than either half: | ||
| # placement records which thread each posted comment replaced, and the resolve step | ||
| # closes on that record. `The reaction steps` covers which of the three runs in which | ||
| # job state, and what each leaves on the trigger comment. `Guard the request` covers | ||
| # the admission path, from the event the workflow accepts to the collection the | ||
| # acknowledgement reaches. | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/seidroid-review.yml' | ||
| # run-guard.sh asserts what ai-assistant.yml claims of the same comment, so an | ||
| # edit there can break an invariant stated here. Without this the break lands | ||
| # on the next unrelated pull request that touches the file above, pointing at | ||
| # the wrong change. | ||
| - '.github/workflows/ai-assistant.yml' | ||
| - '.github/workflows/workflow-test-self.yml' | ||
| - 'test/seidroid-review/**' | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - '.github/workflows/seidroid-review.yml' | ||
| # run-guard.sh asserts what ai-assistant.yml claims of the same comment, so an | ||
| # edit there can break an invariant stated here. Without this the break lands | ||
| # on the next unrelated pull request that touches the file above, pointing at | ||
| # the wrong change. | ||
| - '.github/workflows/ai-assistant.yml' | ||
| - '.github/workflows/workflow-test-self.yml' | ||
| - 'test/seidroid-review/**' | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| place-findings: | ||
| name: Place findings and resolve threads | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install the YAML reader | ||
| run: python3 -m pip install --quiet pyyaml | ||
| - name: Run the placement and resolve harness | ||
| run: test/seidroid-review/run.sh | ||
|
|
||
| reactions: | ||
| name: The reaction steps | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install the YAML reader | ||
| run: python3 -m pip install --quiet pyyaml | ||
| - name: Run the reaction harness | ||
| run: test/seidroid-review/reactions.sh | ||
| # Which step runs in which job state, which is where the cancellation behaviour | ||
| # lives and which the shell harness above cannot see. | ||
| - name: Check the step conditions | ||
| run: python3 test/seidroid-review/conditions.py .github/workflows/seidroid-review.yml | ||
|
|
||
| review-position: | ||
| name: The review's position | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install the YAML reader | ||
| run: python3 -m pip install --quiet pyyaml | ||
| # Which review event the step records, per decision the driver wrote. Its own | ||
| # header says what it guards: the step used to derive the event from the | ||
| # conclusion instead, and a run whose driver recorded `approve` beside a neutral | ||
| # check posted a comment saying "Approving" and no review at all. | ||
| - name: Run the decision harness | ||
| run: test/seidroid-review/decision.sh | ||
|
|
||
| verdict-destination: | ||
| name: Where the verdict goes | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install the YAML reader | ||
| run: python3 -m pip install --quiet pyyaml | ||
| # One verdict, in one place. The review carrying the inline comments holds it | ||
| # where that review landed, and a comment of its own holds it where none did. | ||
| # Both at once is the duplication this workflow was changed to remove; neither | ||
| # is a review the author cannot read. | ||
| - name: Run the verdict harness | ||
| run: test/seidroid-review/verdict.sh | ||
|
|
||
| review-limits: | ||
| name: The review's time limits | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install the YAML reader | ||
| run: python3 -m pip install --quiet pyyaml | ||
| # The driver's budget and the job cap, against each other and against a measured | ||
| # review. Neither a budget the reviews of the day already reach nor a cap under | ||
| # it stops the workflow parsing, and both publish nothing a reader can act on. | ||
| - name: Check the review's time limits | ||
| run: python3 test/seidroid-review/deadline.py .github/workflows/seidroid-review.yml | ||
|
|
||
| guard-admission: | ||
| name: Guard the request | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install the YAML reader | ||
| run: python3 -m pip install --quiet pyyaml | ||
| - name: Run the guard harness | ||
| run: test/seidroid-review/run-guard.sh | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Written by run.sh: the two steps extracted from the workflow, the fixtures it | ||
| # generates, and one directory of output per case. | ||
| place.sh | ||
| resolve.sh | ||
| fx/gen/ | ||
| out/ | ||
| # Written by reactions.sh: the three reaction steps, and one directory per case. | ||
| ack.sh | ||
| answer.sh | ||
| withdraw.sh | ||
| out-reactions/ | ||
| # Written by run-guard.sh: the five steps it extracts from the workflow. Two of | ||
| # them are steps reactions.sh also extracts, under names of their own so neither | ||
| # harness can overwrite the other's extraction. | ||
| refuse.sh | ||
| parse.sh | ||
| admit.sh | ||
| guard-ack.sh | ||
| guard-answer.sh |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] "Five jobs" — there are six (
place-findings,reactions,review-position,verdict-destination,review-limits,guard-admission). Worth correcting since the sentence's point is that the job count and the check list line up one-to-one.