Skip to content

PR Review and mention in PR fixes#459

Merged
strawgate merged 5 commits intomainfrom
self-code-review
Feb 27, 2026
Merged

PR Review and mention in PR fixes#459
strawgate merged 5 commits intomainfrom
self-code-review

Conversation

@strawgate
Copy link
Collaborator

@strawgate strawgate commented Feb 27, 2026

Summary

  • Added a self-review readiness gate to PR create/push flows: ready_to_make_pr now generates unpushed diff/stat artifacts in /tmp/self-review and adds explicit guidance to run a code-review sub-agent before proceeding when changes are present.
  • Added review-thread comment databaseId to PR context and clarified ID mapping for reply_to_pull_request_review_comment (use numeric REST ID / GraphQL databaseId, not GraphQL node IDs).
  • Added reply_to_pull_request_review_comment support and guidance in mention-in-PR workflows, including explicit per-thread replies for addressed or disagreed feedback.
  • Updated review-thread resolution guidance to cover unresolved threads from other reviewers and prior self-reviews, including isOutdated threads when new changes actually address them.
  • Updated PR-review-addresser instructions to use pre-fetched /tmp/pr-context/* artifacts (with fallback guidance) instead of relying only on live API calls.
  • Added automated pytest coverage for ready_to_make_pr safe-input logic, plus test tooling support (ci-tests workflow, Makefile target, and test dependencies in pyproject.toml).

Scope

These behavior changes were made in workflow source fragments/templates and then propagated to compiled .lock.yml workflows.

Generated by Update PR Body for issue #459

Generated by Update PR Body for issue #459

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds subprocess-based git diff generation to many inlined workflow Python scripts, writing /tmp/self-review/diff.patch and /tmp/self-review/stat.txt, computing diff_line_count, and exposing that field in readiness JSON. When diffs exist the workflows append a checklist item instructing spawning a code-review sub-agent to review the saved diff and fix issues before proceeding. It also adds a Safe Outputs tool to reply to pull request review comments (reply_to_pull_request_review_comment) and surfaces numeric review comment IDs (databaseId) in review data and documentation.

Possibly related PRs

  • Change name of PR Reviewer #378 — Overlaps changes to the gh-aw-pr-review-addresser workflow and related prompt/manifest content, including reply/resolve guidance and PR-context handling.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding a self-review step to PR workflows and enhancing the mention-in-PR functionality with reply capabilities.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch self-code-review

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

…ew-addresser fixes

- Use `git diff --merge-base @{upstream}` to capture committed + staged + unstaged
  changes (not just committed) for self-review diff generation
- Add try/except for subprocess.TimeoutExpired with 60s timeout
- Save diff to /tmp/self-review/ files instead of inlining in prompt
- Add pr-context.md import to pr-review-addresser so /tmp/pr-context/ exists
- Clarify Step 4 to skip for fork PRs where no push occurred
- Add inline reply instruction for actionable threads in pr-review-addresser

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Requesting changes due to a functional bug in the new self-review diff generation.

ready-to-make-pr falls back from git diff --merge-base @{upstream} to git diff HEAD in:

  • .github/workflows/gh-aw-fragments/safe-output-create-pr.md:17-21
  • .github/workflows/gh-aw-fragments/safe-output-push-to-pr.md:17-21

On branches without an upstream ref, this can produce an empty patch despite committed local changes, so the required code-review pass may run on no real diff. Please switch the fallback to a committed-change range diff against a real base (for example merge-base with default branch) instead of git diff HEAD.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

coderabbitai[bot]

This comment was marked as resolved.

…irement

- Diff fallback chain: --merge-base @{upstream} → @{upstream} → HEAD
- Skip self-review checklist when diff is empty
- Only reply to review threads when fix isn't obvious from the code change
- Add pytest tests for safe-input Python scripts (23 tests)
- Add ci-tests.yml workflow and `make test` target

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

♻️ Duplicate comments (3)
.github/workflows/gh-aw-test-improver.lock.yml (1)

947-965: ⚠️ Potential issue | 🟠 Major

Fallback chain still misses committed changes when upstream is absent.

At Line 950 / Line 960, falling back to git diff HEAD / git diff --stat HEAD only captures uncommitted changes. If @{upstream} is unset and the tree is clean with local commits, diff_line_count becomes 0, so the self-review gate at Line 976 is bypassed.

Suggested fix
-          diff_text = ''
-          for diff_cmd in [
-              ['git', 'diff', '--merge-base', '@{upstream}'],
-              ['git', 'diff', '@{upstream}'],
-              ['git', 'diff', 'HEAD'],
-          ]:
-              result = run(diff_cmd)
-              if result.stdout.strip():
-                  diff_text = result.stdout.strip()
-                  break
+          default_branch = os.getenv('DEFAULT_BRANCH', 'main')
+          upstream_ok = run(['git', 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{upstream}']).returncode == 0
+          baseline = '@{upstream}' if upstream_ok else f'origin/{default_branch}'
+
+          diff_text = ''
+          for diff_cmd in [
+              ['git', 'diff', '--merge-base', baseline],
+              ['git', 'diff', baseline],
+              ['git', 'diff', 'HEAD'],
+          ]:
+              result = run(diff_cmd)
+              if result.returncode == 0 and result.stdout.strip():
+                  diff_text = result.stdout.strip()
+                  break
           stat_text = ''
-          for stat_cmd in [
-              ['git', 'diff', '--stat', '--merge-base', '@{upstream}'],
-              ['git', 'diff', '--stat', '@{upstream}'],
-              ['git', 'diff', '--stat', 'HEAD'],
-          ]:
-              result = run(stat_cmd)
-              if result.stdout.strip():
-                  stat_text = result.stdout.strip()
-                  break
+          for stat_cmd in [
+              ['git', 'diff', '--stat', '--merge-base', baseline],
+              ['git', 'diff', '--stat', baseline],
+              ['git', 'diff', '--stat', 'HEAD'],
+          ]:
+              result = run(stat_cmd)
+              if result.returncode == 0 and result.stdout.strip():
+                  stat_text = result.stdout.strip()
+                  break

Run this to reproduce the current miss-case (no upstream + committed changes + clean tree):

#!/bin/bash
set -euo pipefail

tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
cd "$tmp"

git init -q -b main
git config user.email "bot@example.com"
git config user.name "bot"

echo "base" > a.txt
git add a.txt
git commit -q -m "base"

git checkout -q -b feature
echo "committed-change" >> a.txt
git add a.txt
git commit -q -m "feature commit"

set +e
git diff --merge-base @{upstream} >/tmp/d1 2>/tmp/e1; rc1=$?
git diff @{upstream} >/tmp/d2 2>/tmp/e2; rc2=$?
git diff HEAD >/tmp/d3 2>/tmp/e3; rc3=$?
set -e

echo "rc1=$rc1 rc2=$rc2 rc3=$rc3"
echo "line-counts:"
wc -l /tmp/d1 /tmp/d2 /tmp/d3
echo "Expected: first two fail (no upstream), third is empty (clean tree), so current loop yields empty diff."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/gh-aw-test-improver.lock.yml around lines 947 - 965, The
fallback chain misses local committed changes when @{upstream} is unset because
'git diff HEAD' only shows working-tree changes; update the diff and stat
fallback lists (the diff_cmd loop and stat_cmd loop) to include a final fallback
that compares the most recent commit (e.g. add ['git','diff','HEAD^..HEAD'] and
['git','diff','--stat','HEAD^..HEAD'] or use ['git','show','--stat','HEAD']) so
committed-but-clean changes are captured; modify the lists around the diff_cmd
and stat_cmd variables to try these commands if earlier commands return empty.
.github/workflows/gh-aw-mention-in-pr.lock.yml (1)

833-833: ⚠️ Potential issue | 🟠 Major

reply_to_pull_request_review_comment is still only partially enforced.

The tool exists in tools.json and handler config, but Line 833 (config.json) and Lines 1074-1233 (validation.json) still lack a matching entry. That leaves max/field validation inconsistent for this tool path.

Patch shape to add in source fragments
- {"add_comment":{"max":1},...,"push_to_pull_request_branch":{"max":0},"resolve_pull_request_review_thread":{"max":"${{ inputs.resolve-pull-request-review-thread-max }}"},"submit_pull_request_review":{"max":1}}
+ {"add_comment":{"max":1},...,"push_to_pull_request_branch":{"max":0},"reply_to_pull_request_review_comment":{"max":10},"resolve_pull_request_review_thread":{"max":"${{ inputs.resolve-pull-request-review-thread-max }}"},"submit_pull_request_review":{"max":1}}
+ "reply_to_pull_request_review_comment": {
+   "defaultMax": 10,
+   "fields": {
+     "body": { "required": true, "type": "string", "sanitize": true, "maxLength": 65000 },
+     "comment_id": { "required": true, "positiveInteger": true },
+     "pull_request_number": { "issueOrPRNumber": true }
+   }
+ },

Based on learnings: files under .github/workflows/*.lock.yml are auto-generated by gh aw compile; make this change in the source .md/fragment files and recompile.

Also applies to: 1074-1233

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/gh-aw-mention-in-pr.lock.yml at line 833, The
reply_to_pull_request_review_comment tool is declared in tools.json and the
handler config but lacks corresponding entries in config.json and
validation.json, leaving its max/field validation partially enforced; add a
matching config entry for "reply_to_pull_request_review_comment" in the
generated config fragment (to set/max and any other fields) and add the
validation schema fragment in validation.json (mirroring the pattern used for
create_pull_request_review_comment and others) so max/field rules are
consistent, then update the source fragment/markdown that feeds the generator
and run the gh aw compile step to regenerate the .lock.yml outputs.
.github/workflows/gh-aw-newbie-contributor-fixer.lock.yml (1)

941-959: ⚠️ Potential issue | 🟠 Major

Self-review gate can be skipped when @{upstream} is unavailable

This fallback chain can return an empty diff after local commits: when @{upstream} is unset, the last fallback (git diff HEAD) only reflects uncommitted changes, so committed-but-unpushed changes are missed and diff_line_count becomes 0.

Proposed fix (apply in source fragment, then compile)
-          diff_text = ''
-          for diff_cmd in [
-              ['git', 'diff', '--merge-base', '@{upstream}'],
-              ['git', 'diff', '@{upstream}'],
-              ['git', 'diff', 'HEAD'],
-          ]:
+          def resolve_base_ref():
+              upstream = run(['git', 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{upstream}'])
+              if upstream.returncode == 0 and upstream.stdout.strip():
+                  return upstream.stdout.strip()
+              default_branch = os.environ.get('DEFAULT_BRANCH', '').strip()
+              if default_branch:
+                  return f'origin/{default_branch}'
+              return None
+
+          base_ref = resolve_base_ref()
+          diff_text = ''
+          diff_cmds = [['git', 'diff', 'HEAD']]
+          if base_ref:
+              diff_cmds = [
+                  ['git', 'diff', '--merge-base', base_ref],
+                  ['git', 'diff', base_ref],
+                  ['git', 'diff', 'HEAD'],
+              ]
+          for diff_cmd in diff_cmds:
               result = run(diff_cmd)
               if result.stdout.strip():
                   diff_text = result.stdout.strip()
                   break
#!/bin/bash
set -euo pipefail

echo "Check source fragment for upstream-only fallback and missing default-branch resolution:"
rg -n -C2 "@\\{upstream\\}|git', 'diff', 'HEAD'|DEFAULT_BRANCH|rev-parse --abbrev-ref --symbolic-full-name" \
  .github/workflows/gh-aw-fragments/safe-output-create-pr.md

echo
echo "Inspect local tracking state (detached/no-upstream reproduces the bypass condition):"
git rev-parse --abbrev-ref HEAD
git rev-parse --abbrev-ref --symbolic-full-name @{upstream} || echo "No upstream configured"

Based on learnings: .lock.yml files are generated by gh aw compile; update the corresponding .md fragment and recompile.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/gh-aw-newbie-contributor-fixer.lock.yml around lines 941 -
959, The current fallback chain using @{upstream} then HEAD can miss
committed-but-unpushed changes; update the logic that builds diff_cmd and
stat_cmd (the lists iterating over diff_cmd/stat_cmd, the run() calls and
diff_text/stat_text assignment) to detect when @{upstream} is unavailable and
instead resolve a sensible remote/default branch (e.g. try git rev-parse
--abbrev-ref --symbolic-full-name @{upstream} and if that fails fallback to
origin/HEAD or resolve the repository default branch via rev-parse/remote refs)
and use that resolved ref in the diff commands before falling back to HEAD; also
update the source fragment that generates this code so the change is compiled
into the .lock output.
🧹 Nitpick comments (2)
.github/workflows/gh-aw-text-beautifier.lock.yml (1)

949-957: Fallback chain improved, edge case remains.

The intermediate git diff @{upstream} step captures committed changes when upstream exists but --merge-base fails. This addresses the main concern from prior review.

Remaining gap: when no upstream is configured at all, falls through to git diff HEAD (uncommitted only). Using origin/${DEFAULT_BRANCH} as a final fallback before HEAD would capture committed-but-unpushed changes on untracked branches. Low priority since the common cases are now covered.

Since this is auto-generated, any fix goes in the source fragment (.github/workflows/gh-aw-fragments/safe-output-create-pr.md).

Optional enhancement (apply to source .md file)
+default_branch = os.getenv('DEFAULT_BRANCH', 'main')
 for diff_cmd in [
     ['git', 'diff', '--merge-base', '@{upstream}'],
     ['git', 'diff', '@{upstream}'],
+    ['git', 'diff', '--merge-base', f'origin/{default_branch}'],
     ['git', 'diff', 'HEAD'],
 ]:

Based on learnings: "files under .github/workflows with the .lock.yml extension are auto-generated... Make changes to the source .md files instead."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/gh-aw-text-beautifier.lock.yml around lines 949 - 957, Add
an extra fallback to check committed-but-unpushed changes by inserting a git
diff against origin/${DEFAULT_BRANCH} before the final 'git diff HEAD' step:
update the for-loop that iterates over diff_cmd (the list currently containing
['git', 'diff', '--merge-base', '@{upstream}'], ['git', 'diff', '@{upstream}'],
['git', 'diff', 'HEAD']) to include ['git', 'diff', f'origin/{DEFAULT_BRANCH}']
as the second-to-last entry, ensure the DEFAULT_BRANCH variable is
referenced/available in the scope where run() is called, and keep the same
result.stdout.strip() break logic so committed changes on unpushed branches are
captured before falling back to uncommitted HEAD diffs.
.github/workflows/gh-aw-pr-review-addresser.md (1)

150-150: Consider restructuring the long compound sentence.

Line 150 packs multiple instructions into one complex sentence: resolve threads, check for unresolved threads, handle isOutdated, add fallback. Breaking this into numbered sub-steps would improve readability.

♻️ Optional restructuring
-After pushing, resolve every review thread that your changes address by calling `resolve_pull_request_review_thread` with the thread's GraphQL node ID (the `id` field, e.g., `PRRT_kwDO...`). This includes threads from any reviewer — external reviewers, bots, and your own prior reviews. Check `/tmp/pr-context/review_comments.json` for all unresolved threads (`isResolved: false`) — `isOutdated` threads have had the underlying code changed since the comment was made, so check whether your changes address them. Do NOT resolve threads you disagreed with, skipped, or only partially addressed — leave those open for the reviewer. Fall back to `pull_request_read` with method `get_review_comments` if the pre-fetched data is unavailable.
+After pushing, resolve threads that your changes address:
+
+1. Get unresolved threads: Check `/tmp/pr-context/review_comments.json` for `isResolved: false` entries. If unavailable, fall back to `pull_request_read` with method `get_review_comments`.
+2. For each unresolved thread your changes address (including `isOutdated` threads where your changes fix the issue): Call `resolve_pull_request_review_thread` with the thread's GraphQL node ID (the `id` field, e.g., `PRRT_kwDO...`).
+3. This applies to threads from any reviewer — external reviewers, bots, and your own prior reviews.
+4. Do NOT resolve threads you disagreed with, skipped, or only partially addressed — leave those open for the reviewer.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/gh-aw-pr-review-addresser.md at line 150, Split the long
compound sentence into a short intro plus numbered bullets detailing each
action: 1) call resolve_pull_request_review_thread with the thread GraphQL node
ID for every thread your changes address (include external, bot, and your prior
reviews); 2) check /tmp/pr-context/review_comments.json for all threads where
isResolved is false; 3) treat isOutdated threads specially by verifying whether
your changes already address them before resolving; 4) do NOT resolve threads
you disagreed with, skipped, or only partially addressed; and 5) fall back to
pull_request_read.get_review_comments if the pre-fetched data is unavailable.
Ensure each step references the exact symbols
(resolve_pull_request_review_thread, isResolved, isOutdated,
/tmp/pr-context/review_comments.json, pull_request_read.get_review_comments).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/gh-aw-issue-fixer.lock.yml:
- Around line 988-1019: The current diff/stat fallback loop uses run() to try
['git', 'diff', '--merge-base', '@{upstream}'], ['git','diff','@{upstream}'],
['git','diff','HEAD'] (and same for --stat) which returns empty when no upstream
exists, causing diff_text/stat_text to be empty and bypassing the self-review
gate; update the logic to first detect whether an upstream exists (e.g., by
running 'git rev-parse --abbrev-ref --symbolic-full-name @{u}' via run()) and if
that detection fails, add a fallback diff/stat pair that compares HEAD to its
previous commit (e.g., ['git','diff','HEAD~1..HEAD'] and
['git','diff','--stat','HEAD~1..HEAD']) so diff_text/stat_text and
diff_line_count reflect committed changes even without an upstream; modify the
diff_cmd and stat_cmd construction around the run() calls and preserve existing
behavior when an upstream is present.

In @.github/workflows/gh-aw-mention-in-pr-by-id.lock.yml:
- Around line 1225-1267: The diff generation currently only checks result.stdout
so timeouts/failures (which return stderr or non-zero returncode from run())
produce empty diff_text and silently skip the self-review; update run() handling
and the diff/stat loops to treat result.returncode != 0 or result.stderr.strip()
as a failure: set diff_text/stat_text to the stderr (or a clear error string),
set a flag like diff_failed, write the error into /tmp/self-review/diff.patch,
and ensure you add a checklist entry (via checklist.append) when diff_failed
indicating "Diff generation failed/timed out — do not skip self-review;
regenerate or run manual review" so the self-review gate cannot be bypassed;
refer to run(), diff_text, stat_text, diff_line_count, checklist, and the
/tmp/self-review files when making these changes.

In @.github/workflows/gh-aw-mention-in-pr.lock.yml:
- Around line 1332-1374: The fallback diff logic using run() and the
diff_cmd/stat_cmd loops can silently produce empty diff_text/stat_text when
upstream refs are missing or git errors occur because returncode isn't checked;
update the loops that build diff_text and stat_text to check result.returncode
and treat non-zero as failure (skip or break with an error) and also detect git
errors that produce empty stdout so we don't incorrectly set diff_text='' and
diff_line_count=0; specifically modify the for-loops that iterate over diff_cmd
and stat_cmd (and the run() helper) to consider result.returncode != 0 as a
failure and either try the next candidate or surface an error, and ensure
diff_line_count reflects actual git output before skipping the self-review
sub-agent.

In @.github/workflows/gh-aw-pr-review-addresser.md:
- Around line 122-128: Step 1 currently assumes /tmp/pr-context/* files exist
(e.g., generate_agents_md output, pr.json, issue-*.json, diffs/) and lacks the
fallback that review_comments.json already has; update the workflow to either
(A) add explicit fallbacks for each required artifact—call generate_agents_md
and if it fails continue without it, attempt to fetch PR details via a
pull_request_read equivalent when pr.json is missing, skip missing issue-*.json
files with a logged warning, and treat missing diffs/README.md as non-fatal—or
(B) add a clear precondition comment and input validation at start that fails
fast with a helpful message instructing callers to pre-populate /tmp/pr-context/
(including README.md, pr.json, review_comments.json, diffs/). Ensure you
reference the existing generate_agents_md invocation and the
review_comments.json fallback as the model when implementing these changes.

In @.github/workflows/gh-aw-small-problem-fixer.lock.yml:
- Around line 981-1023: The diff/stat discovery currently only checks
result.stdout.strip() in the loops (for diff_cmd and stat_cmd) so failures or
timeouts with non-zero return codes are treated as empty diffs; update the logic
in the loops that call run(...) to require result.returncode == 0 in addition to
non-empty stdout (and optionally capture/log result.stderr on failure), so
diff_text/stat_text are only set when the git command succeeded; reference the
run() helper, the diff_cmd/stat_cmd loops, and the diff_text/stat_text and
diff_line_count variables when making the change.

---

Duplicate comments:
In @.github/workflows/gh-aw-mention-in-pr.lock.yml:
- Line 833: The reply_to_pull_request_review_comment tool is declared in
tools.json and the handler config but lacks corresponding entries in config.json
and validation.json, leaving its max/field validation partially enforced; add a
matching config entry for "reply_to_pull_request_review_comment" in the
generated config fragment (to set/max and any other fields) and add the
validation schema fragment in validation.json (mirroring the pattern used for
create_pull_request_review_comment and others) so max/field rules are
consistent, then update the source fragment/markdown that feeds the generator
and run the gh aw compile step to regenerate the .lock.yml outputs.

In @.github/workflows/gh-aw-newbie-contributor-fixer.lock.yml:
- Around line 941-959: The current fallback chain using @{upstream} then HEAD
can miss committed-but-unpushed changes; update the logic that builds diff_cmd
and stat_cmd (the lists iterating over diff_cmd/stat_cmd, the run() calls and
diff_text/stat_text assignment) to detect when @{upstream} is unavailable and
instead resolve a sensible remote/default branch (e.g. try git rev-parse
--abbrev-ref --symbolic-full-name @{upstream} and if that fails fallback to
origin/HEAD or resolve the repository default branch via rev-parse/remote refs)
and use that resolved ref in the diff commands before falling back to HEAD; also
update the source fragment that generates this code so the change is compiled
into the .lock output.

In @.github/workflows/gh-aw-test-improver.lock.yml:
- Around line 947-965: The fallback chain misses local committed changes when
@{upstream} is unset because 'git diff HEAD' only shows working-tree changes;
update the diff and stat fallback lists (the diff_cmd loop and stat_cmd loop) to
include a final fallback that compares the most recent commit (e.g. add
['git','diff','HEAD^..HEAD'] and ['git','diff','--stat','HEAD^..HEAD'] or use
['git','show','--stat','HEAD']) so committed-but-clean changes are captured;
modify the lists around the diff_cmd and stat_cmd variables to try these
commands if earlier commands return empty.

---

Nitpick comments:
In @.github/workflows/gh-aw-pr-review-addresser.md:
- Line 150: Split the long compound sentence into a short intro plus numbered
bullets detailing each action: 1) call resolve_pull_request_review_thread with
the thread GraphQL node ID for every thread your changes address (include
external, bot, and your prior reviews); 2) check
/tmp/pr-context/review_comments.json for all threads where isResolved is false;
3) treat isOutdated threads specially by verifying whether your changes already
address them before resolving; 4) do NOT resolve threads you disagreed with,
skipped, or only partially addressed; and 5) fall back to
pull_request_read.get_review_comments if the pre-fetched data is unavailable.
Ensure each step references the exact symbols
(resolve_pull_request_review_thread, isResolved, isOutdated,
/tmp/pr-context/review_comments.json, pull_request_read.get_review_comments).

In @.github/workflows/gh-aw-text-beautifier.lock.yml:
- Around line 949-957: Add an extra fallback to check committed-but-unpushed
changes by inserting a git diff against origin/${DEFAULT_BRANCH} before the
final 'git diff HEAD' step: update the for-loop that iterates over diff_cmd (the
list currently containing ['git', 'diff', '--merge-base', '@{upstream}'],
['git', 'diff', '@{upstream}'], ['git', 'diff', 'HEAD']) to include ['git',
'diff', f'origin/{DEFAULT_BRANCH}'] as the second-to-last entry, ensure the
DEFAULT_BRANCH variable is referenced/available in the scope where run() is
called, and keep the same result.stdout.strip() break logic so committed changes
on unpushed branches are captured before falling back to uncommitted HEAD diffs.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d81024e and 29c18c5.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (29)
  • .github/workflows/ci-tests.yml
  • .github/workflows/downstream-users.lock.yml
  • .github/workflows/gh-aw-bug-exterminator.lock.yml
  • .github/workflows/gh-aw-code-duplication-fixer.lock.yml
  • .github/workflows/gh-aw-code-simplifier.lock.yml
  • .github/workflows/gh-aw-fragments/safe-output-create-pr.md
  • .github/workflows/gh-aw-fragments/safe-output-push-to-pr.md
  • .github/workflows/gh-aw-issue-fixer.lock.yml
  • .github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml
  • .github/workflows/gh-aw-mention-in-issue.lock.yml
  • .github/workflows/gh-aw-mention-in-pr-by-id.lock.yml
  • .github/workflows/gh-aw-mention-in-pr-no-sandbox.lock.yml
  • .github/workflows/gh-aw-mention-in-pr-no-sandbox.md
  • .github/workflows/gh-aw-mention-in-pr.lock.yml
  • .github/workflows/gh-aw-mention-in-pr.md
  • .github/workflows/gh-aw-newbie-contributor-fixer.lock.yml
  • .github/workflows/gh-aw-pr-actions-fixer.lock.yml
  • .github/workflows/gh-aw-pr-review-addresser.lock.yml
  • .github/workflows/gh-aw-pr-review-addresser.md
  • .github/workflows/gh-aw-release-update.lock.yml
  • .github/workflows/gh-aw-scheduled-fix.lock.yml
  • .github/workflows/gh-aw-small-problem-fixer.lock.yml
  • .github/workflows/gh-aw-test-improvement.lock.yml
  • .github/workflows/gh-aw-test-improver.lock.yml
  • .github/workflows/gh-aw-text-beautifier.lock.yml
  • Makefile
  • pyproject.toml
  • tests/__init__.py
  • tests/test_safe_input_ready_to_make_pr.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/gh-aw-mention-in-pr.md

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant