Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bd6c371
chore(codex): bootstrap PR for issue #1385
github-actions[bot] Feb 8, 2026
f66e5f3
feat: filter .agents ledger files from pr context
Feb 8, 2026
5bbf3f7
chore: sync template scripts
github-actions[bot] Feb 8, 2026
11c00aa
feat: record ignored pr files in context
Feb 8, 2026
73c25be
chore: sync template scripts
github-actions[bot] Feb 8, 2026
0c2480c
test: cover ignored path patterns in pr context
Feb 8, 2026
a30314c
test: lock bot comment handler ignores
Feb 8, 2026
c10a936
chore(autofix): formatting/lint
github-actions[bot] Feb 8, 2026
8fe4994
test: add connector exclusion smoke helper
Feb 8, 2026
886b7f8
chore: sync template scripts
github-actions[bot] Feb 8, 2026
f4cfb08
feat: auto-dismiss ignored bot reviews in template
Feb 8, 2026
908f4ca
chore(codex-keepalive): apply updates (PR #1387)
github-actions[bot] Feb 8, 2026
479dde3
Add bot comment dismiss helper and Copilot ignores
codex Feb 8, 2026
dcf700f
feat: add bot comment dismissal helper
Feb 8, 2026
d1f3d3a
chore: sync template scripts
github-actions[bot] Feb 8, 2026
ec8a37a
Add max-age filtering for bot comment dismissal
Feb 8, 2026
da50d73
chore: sync template scripts
github-actions[bot] Feb 8, 2026
28ae570
feat: default bot comment dismiss max age
Feb 8, 2026
d93b4ed
chore: sync template scripts
github-actions[bot] Feb 8, 2026
72fb89d
feat: handle GraphQL timestamps for bot comment dismiss
Feb 8, 2026
087e052
feat: add auto-dismiss helper for bot review comments
Feb 8, 2026
c9e181d
fix: Add API wrapper documentation to bot-comment-dismiss.js
stranske Feb 8, 2026
e78c49b
fix: Update download-artifact from v7 to v4 in bridge workflow
stranske Feb 8, 2026
bcb96a9
Merge remote-tracking branch 'origin/main' into codex/issue-1385
stranske Feb 8, 2026
e4fda08
fix: address review — download-artifact@v7 + withRetry client param +…
stranske Feb 8, 2026
74a0d0e
chore: fix trailing whitespace and formatting
stranske Feb 8, 2026
544aea6
chore(autofix): formatting/lint
github-actions[bot] Feb 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/scripts/bot-comment-dismiss.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async function dismissReviewComments(options = {}) {
const dismissable = options.dismissable || [];
const owner = options.owner;
const repo = options.repo;
const withRetry = options.withRetry || ((fn) => fn());
const withRetry = options.withRetry || ((fn) => fn(github));
const logger = options.logger || console;

if (!github || !github.rest || !github.rest.pulls) {
Expand All @@ -129,8 +129,8 @@ async function dismissReviewComments(options = {}) {

for (const entry of dismissable) {
try {
await withRetry(() =>
github.rest.pulls.deleteReviewComment({
await withRetry((client) =>
client.rest.pulls.deleteReviewComment({
owner,
repo,
comment_id: entry.id,
Expand Down Expand Up @@ -165,7 +165,7 @@ async function autoDismissReviewComments(options = {}) {
const owner = options.owner;
const repo = options.repo;
const pullNumber = options.pullNumber;
const withRetry = options.withRetry || ((fn) => fn());
const withRetry = options.withRetry || ((fn) => fn(github));
const logger = options.logger || console;

if (!github || !github.rest || !github.rest.pulls) {
Expand All @@ -178,8 +178,8 @@ async function autoDismissReviewComments(options = {}) {
throw new Error('pullNumber is required');
}

const response = await withRetry(() =>
github.rest.pulls.listReviewComments({
const response = await withRetry((client) =>
client.rest.pulls.listReviewComments({
owner,
repo,
pull_number: pullNumber,
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/health-74-template-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
id: drift
run: |
set -euo pipefail

echo "🔍 Checking for drift between main workflows and templates..."
echo ""

drift_found=false
drift_report=""

# Map of main workflows to their template counterparts
# Format: "main_workflow:template_name"
declare -a mappings=(
Expand All @@ -39,34 +39,34 @@ jobs:
"agents-pr-meta.yml:agents-pr-meta.yml"
"agents-verifier.yml:agents-verifier.yml"
)

for mapping in "${mappings[@]}"; do
main_file="${mapping%%:*}"
template_file="${mapping##*:}"

main_path=".github/workflows/${main_file}"
template_path="templates/consumer-repo/.github/workflows/${template_file}"

# Skip if either file doesn't exist
if [[ ! -f "$main_path" ]]; then
echo "⏭️ Skipping $main_file (main workflow doesn't exist)"
continue
fi

if [[ ! -f "$template_path" ]]; then
echo "⚠️ WARNING: $template_file template missing but main workflow exists"
drift_found=true
drift_report+="- **$main_file**: Template missing entirely\n"
continue
fi

# Compare files (ignoring whitespace-only differences)
# Count differing lines
diff_lines=$(diff -u "$main_path" "$template_path" 2>/dev/null | grep -c '^[-+]' || true)

# Threshold: warn if more than 50 lines differ (configurable)
threshold=50

if [[ "$diff_lines" -gt "$threshold" ]]; then
echo "❌ DRIFT: $main_file vs $template_file ($diff_lines lines differ)"
drift_found=true
Expand All @@ -77,10 +77,10 @@ jobs:
echo "✅ In sync: $main_file ↔ $template_file"
fi
done

echo ""
echo "drift_found=${drift_found}" >> "$GITHUB_OUTPUT"

if [[ "$drift_found" == "true" ]]; then
# Warn but don't fail - drift may be intentional or pre-existing
# TODO: Enable strict mode once existing drift is resolved
Expand Down
12 changes: 6 additions & 6 deletions templates/consumer-repo/.github/scripts/bot-comment-dismiss.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async function dismissReviewComments(options = {}) {
const dismissable = options.dismissable || [];
const owner = options.owner;
const repo = options.repo;
const withRetry = options.withRetry || ((fn) => fn());
const withRetry = options.withRetry || ((fn) => fn(github));
const logger = options.logger || console;

if (!github || !github.rest || !github.rest.pulls) {
Expand All @@ -129,8 +129,8 @@ async function dismissReviewComments(options = {}) {

for (const entry of dismissable) {
try {
await withRetry(() =>
github.rest.pulls.deleteReviewComment({
await withRetry((client) =>
client.rest.pulls.deleteReviewComment({
owner,
repo,
comment_id: entry.id,
Expand Down Expand Up @@ -165,7 +165,7 @@ async function autoDismissReviewComments(options = {}) {
const owner = options.owner;
const repo = options.repo;
const pullNumber = options.pullNumber;
const withRetry = options.withRetry || ((fn) => fn());
const withRetry = options.withRetry || ((fn) => fn(github));
const logger = options.logger || console;

if (!github || !github.rest || !github.rest.pulls) {
Expand All @@ -178,8 +178,8 @@ async function autoDismissReviewComments(options = {}) {
throw new Error('pullNumber is required');
}

const response = await withRetry(() =>
github.rest.pulls.listReviewComments({
const response = await withRetry((client) =>
client.rest.pulls.listReviewComments({
owner,
repo,
pull_number: pullNumber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ jobs:
# Dismiss ignored-path bot reviews to prevent noisy inline comments
dismiss_ignored:
name: Dismiss ignored bot reviews
# Dismisses the review state (not individual comments) so bot reviews
# on ignored paths don't block merge or clutter the PR timeline.
needs: resolve
if: vars.USE_CONSOLIDATED_WORKFLOWS != 'true' && needs.resolve.outputs.should_run == 'true'
Comment on lines +191 to +197
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

The comment says this job is to “prevent noisy inline comments”, but the implementation calls pulls.dismissReview, which dismisses the review state and does not remove the inline review comments. If the goal is to eliminate inline noise, consider deleting the individual review comments instead (e.g., via pulls.deleteReviewComment) or update the job/comment to reflect the actual behavior (dismiss review only).

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
Expand All @@ -213,7 +215,9 @@ jobs:
- name: Dismiss ignored-path bot reviews
uses: actions/github-script@v8
env:
BOT_AUTHORS: 'Copilot,copilot[bot],github-actions[bot],coderabbitai[bot],chatgpt-codex-connector[bot]'
BOT_AUTHORS: >-
Copilot,copilot[bot],github-actions[bot],
coderabbitai[bot],chatgpt-codex-connector[bot]
IGNORED_PATHS: '.agents/,scripts/langchain/prompts/,docs/'
with:
script: |
Expand All @@ -240,23 +244,21 @@ jobs:
return;
}

const [commentsResponse, reviewsResponse] = await Promise.all([
withRetry((client) => client.rest.pulls.listReviewComments({
const [comments, reviews] = await Promise.all([
withRetry((client) => client.paginate(client.rest.pulls.listReviewComments, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
per_page: 100,
})),
withRetry((client) => client.rest.pulls.listReviews({
withRetry((client) => client.paginate(client.rest.pulls.listReviews, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
per_page: 100,
})),
]);

const comments = commentsResponse.data || [];
const reviews = reviewsResponse.data || [];
const reviewsById = new Map(reviews.map((review) => [review.id, review]));
const commentsByReview = new Map();

Expand All @@ -270,7 +272,6 @@ jobs:
total: 0,
ignored: 0,
paths: [],
botLogins: new Set(),
ignoredComments: [],
};

Expand All @@ -280,17 +281,16 @@ jobs:

if (ignoredPaths.some((prefix) => commentPath.startsWith(prefix))) {
entry.ignored += 1;
const login = (comment.user?.login || '').toLowerCase();
if (login) {
entry.botLogins.add(login);
}
entry.ignoredComments.push({
id: comment.id,
path: commentPath,
login: comment.user?.login || 'unknown',
});
const botName = comment.user?.login;
console.log(
`Auto-dismiss candidate: comment=${comment.id} bot=${comment.user?.login} path=${commentPath}`
'Auto-dismiss candidate: ' +
`comment=${comment.id} ` +
`bot=${botName} path=${commentPath}`
);
}

Expand All @@ -316,7 +316,10 @@ jobs:
const uniquePaths = Array.from(new Set(entry.paths)).filter(Boolean);
for (const ignored of entry.ignoredComments) {
console.log(
`Auto-dismissed review comment: comment=${ignored.id} bot=${ignored.login} path=${ignored.path}`
'Auto-dismissed review comment: ' +
`comment=${ignored.id} ` +
`bot=${ignored.login} ` +
`path=${ignored.path}`
);
}
const message = [
Expand All @@ -334,8 +337,11 @@ jobs:
}));

dismissed += 1;
const paths = uniquePaths.join(', ');
console.log(
`Dismissed review ${reviewId} from ${review.user?.login} for paths: ${uniquePaths.join(', ')}`
`Dismissed review ${reviewId} ` +
`from ${review.user?.login} ` +
`for paths: ${paths}`
);
}

Expand Down
Loading