Skip to content

Commit 1c18f9a

Browse files
authored
Merge remote-tracking branch 'origin/main' into copilot/deep-report-fix-zip-log-extraction
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
2 parents a522e8c + cdb9222 commit 1c18f9a

394 files changed

Lines changed: 3113 additions & 769 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/patch-unified-session-errors.md‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/aw/work-queue.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ Use the Git-backed work queue when independently running dispatchers and workers
1010

1111
- Enable `tools.work-queue: true` to read the queue snapshot captured at activation. Call `work_queue_read` without arguments to see available Work (oldest first), `next_work`, and claim states; pass `work` to inspect one Work identity. `next_work` is a recommendation from a possibly stale snapshot, **not** an acquired Claim.
1212
- Select work with stable identities and make processing idempotent. Claimed Work does not block newer available Work; oldest-first selection is best effort, not strict FIFO.
13-
- Dispatch workers only through an explicitly configured, trusted path. `safe-outputs.dispatch-workflow` runs allowed `workflow_dispatch` workers asynchronously; `safe-outputs.call-workflow` selects an allowed `workflow_call` worker in the same run. Neither output by itself creates a work-queue Claim or supplies a trusted worker assignment. Do not pass agent-chosen Work/Claim identifiers as though they establish ownership.
14-
- Do not write queue transactions from an agent or assume the snapshot is current. Queue mutations and version-checked publication belong to trusted processing; if that integration is not configured, use the operator CLI for manual queue management rather than claiming the workflow automatically dispatches queue items.
13+
- To dispatch a queue worker, configure `safe-outputs.dispatch-workflow` with an allowed same-repository `workflow_dispatch` worker that declares an `aw_context` input and enables `tools.work-queue: true`. Pass `work_queue: {work_id: "<id from work_queue_read>"}` to that worker's safe-output tool. This selector is **not** a worker input: trusted safe-output processing refreshes the queue, checks availability, publishes a Claim, and injects `aw_context.work_queue` with the selected identity, generated Claim ID, and `{id: work_id}` payload. The worker must look up any additional task details by that identity. Dispatch failure attempts to cancel the Claim; a concurrent dispatch can supersede it, so the worker must still pass activation and completion checks.
14+
- `safe-outputs.dispatch-workflow` without `work_queue` remains a normal dispatch and does not create a Claim. Cross-repository queue dispatch, workers lacking either required opt-in, and staged dispatches cannot create a Claim. `safe-outputs.call-workflow` does not create a Claim. Do not pass agent-chosen Claim identifiers as though they establish ownership.
15+
- If the safe-output log warns that Claim cancellation failed, use its work and claim IDs to investigate and reconcile the runtime `work-queue` branch. The `gh aw work-queue` operator CLI manages a separate branch and transaction format and cannot cancel runtime Claims.
16+
- Do not write queue transactions from an agent or assume the snapshot is current. Queue mutations and version-checked publication belong to trusted processing; if dispatch-workflow is not configured, use the operator CLI for manual queue management.
1517

1618
## Worker workflows
1719

‎.github/scripts/aw_issue_clustering.README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ Closing a summary as **completed** suppresses its unchanged source findings.
4747
Newer source activity makes those findings eligible again. Workflow retirement
4848
uses **not planned**, so reorganizing the queue does not mark its sources fixed.
4949
There are never more than ten open owned summaries; assigned work counts toward
50-
that limit. The discussion provides the current rank even for frozen assignments.
50+
that limit. The discussion provides the current rank even for frozen assignments. If GitHub
51+
rejects editing its existing bot-authored body, the publisher posts the current
52+
queue as a new comment on that discussion instead.
5153

5254
The publisher independently refetches GitHub evidence rather than trusting
5355
agent-editable snapshot files. It validates the full plan before writing, checks

‎.github/scripts/aw_issue_clustering_publish.py‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import re
1212

1313
from aw_issue_clustering import (
14-
CLUSTER_LABEL, END, OWNER_MARKER, PREFIX, START, build_corpus, collect_discussions,
14+
CLUSTER_LABEL, END, GitHubAPIError, OWNER_MARKER, PREFIX, START, build_corpus, collect_discussions,
1515
collect_issues, gh_json, graphql, managed, metadata, run_cutoff,
1616
)
1717

@@ -320,11 +320,21 @@ def publish_dashboard(repo, body, staged=False):
320320
replacement = body.split(START, 1)[1].split(END, 1)[0]
321321
updated = replace_island(dashboards[0]["body"], START + replacement + END)
322322
if dashboards[0]["body"] != updated:
323-
graphql("""
324-
mutation($id:ID!, $body:String!) {
325-
updateDiscussion(input:{discussionId:$id, body:$body}) { discussion { id } }
326-
}
327-
""", id=dashboards[0]["id"], body=updated)
323+
try:
324+
graphql("""
325+
mutation($id:ID!, $body:String!) {
326+
updateDiscussion(input:{discussionId:$id, body:$body}) { discussion { id } }
327+
}
328+
""", id=dashboards[0]["id"], body=updated)
329+
except GitHubAPIError as error:
330+
if "Resource not accessible by integration" not in str(error):
331+
raise
332+
graphql("""
333+
mutation($id:ID!, $body:String!) {
334+
addDiscussionComment(input:{discussionId:$id, body:$body}) { comment { id } }
335+
}
336+
""", id=dashboards[0]["id"], body=body)
337+
print("Dashboard edit denied; published the current queue as a discussion comment")
328338
else:
329339
data = graphql("""
330340
query($owner:String!, $name:String!) {

‎.github/scripts/test_aw_issue_clustering.py‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,52 @@ def test_dashboard_updates_only_owned_bot_discussion(self, api):
352352
self.assertEqual("owned", api.call_args.kwargs["id"])
353353
self.assertTrue(api.call_args.kwargs["body"].startswith("Operator note."))
354354

355+
@patch.object(publish, "graphql")
356+
def test_dashboard_comments_when_existing_discussion_cannot_be_edited(self, api):
357+
old_body = collect.START + "\nOld table\n" + collect.END + collect.OWNER_MARKER
358+
api.side_effect = [
359+
{"search": {"pageInfo": {"hasNextPage": False}, "nodes": [
360+
{"id": "owned", "title": "AW Essential 10", "body": old_body,
361+
"author": {"__typename": "Bot"}, "closed": False},
362+
]}},
363+
collect.GitHubAPIError("GitHub API request failed: Resource not accessible by integration", []),
364+
{"addDiscussionComment": {"comment": {"id": "new"}}},
365+
]
366+
body = collect.START + "\nUpdated ranked queue\n" + collect.END + collect.OWNER_MARKER
367+
publish.publish_dashboard(REPO, body)
368+
self.assertEqual(3, api.call_count)
369+
self.assertIn("Updated ranked queue", api.call_args.kwargs["body"])
370+
self.assertEqual("owned", api.call_args.kwargs["id"])
371+
self.assertIn("addDiscussionComment", api.call_args.args[0])
372+
373+
@patch.object(publish, "graphql")
374+
def test_dashboard_does_not_hide_other_update_errors(self, api):
375+
api.side_effect = [
376+
{"search": {"pageInfo": {"hasNextPage": False}, "nodes": [
377+
{"id": "owned", "title": "AW Essential 10",
378+
"body": collect.START + "\nOld table\n" + collect.END + collect.OWNER_MARKER,
379+
"author": {"__typename": "Bot"}, "closed": False},
380+
]}},
381+
collect.GitHubAPIError("GitHub API request failed: rate limit exceeded", []),
382+
]
383+
with self.assertRaisesRegex(collect.GitHubAPIError, "rate limit exceeded"):
384+
publish.publish_dashboard(REPO, collect.START + "\nNew table\n" + collect.END)
385+
self.assertEqual(2, api.call_count)
386+
387+
@patch.object(publish, "graphql")
388+
def test_dashboard_comment_failure_is_not_hidden(self, api):
389+
api.side_effect = [
390+
{"search": {"pageInfo": {"hasNextPage": False}, "nodes": [
391+
{"id": "owned", "title": "AW Essential 10",
392+
"body": collect.START + "\nOld table\n" + collect.END + collect.OWNER_MARKER,
393+
"author": {"__typename": "Bot"}, "closed": False},
394+
]}},
395+
collect.GitHubAPIError("Resource not accessible by integration", []),
396+
collect.GitHubAPIError("comment failed", []),
397+
]
398+
with self.assertRaisesRegex(collect.GitHubAPIError, "comment failed"):
399+
publish.publish_dashboard(REPO, collect.START + "\nNew table\n" + collect.END)
400+
355401
@patch.object(publish, "run_cutoff", return_value="2026-10-03T00:00:00Z")
356402
@patch.object(publish, "collect_discussions", return_value=[])
357403
@patch.object(publish, "collect_issues")

‎.github/workflows/ab-testing-advisor.lock.yml‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/ace-editor.lock.yml‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/agent-job-health.lock.yml‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/agent-performance-analyzer.lock.yml‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/agent-persona-explorer.lock.yml‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)