We have pr review comments in a json file, we should also probably make a file for unresolved threads, resolved threads, etc in a file too so that the agent doesnt have to do it itself.
See https://github.com/elastic/ai-github-actions-playground/actions/runs/22530481954/job/65269085660?pr=809 for the various permutations the agent ended up making
Glob "/tmp/pr-context/issue-*.json"
└ No matches found
● List unresolved review threads with comments
$ jq -r '.[] | select(.isResolved==false) | "THREAD\t\(.id)\t\(.path):\(.line // .startLine //
0)\tOUTDATED=\(.isOutdated)\n" + (.comments[] | "COMMENT\t\(.databaseId)\t\(.author.login)\t" +
(.body|gsub("\n";" "))) + "\n---"' /tmp/pr-context/review_comments.json
└ 2 lines...
● Todo started: gather-context
● Read /tmp/pr-context/review_comments.json lines 1-120
└ 120 lines read
● Inspect review_comments JSON shape
$ python - <<'PY'
import json
p='/tmp/pr-context/review_comments.json'
obj=json.load(open(p))
print(type(obj).__name__)...
└ 14 lines...
● Todo queried:
● List unresolved review threads
$ jq -r '.[] | select(.isResolved==false) | "THREAD\t\(.id)\t\(.path):\(.line // .startLine //
0)\tOUTDATED=\(.isOutdated)\n" + (.comments.nodes[] |
"COMMENT\t\(.databaseId)\t\(.author.login)\t" + (.body|split("\n")[0])) + "\n---"'
/tmp/pr-context/review_comments.json
└ 40 lines...
● Print unresolved thread comment details
$ python - <<'PY'
import json,textwrap
p='/tmp/pr-context/review_comments.json'
arr=json.load(open(p))
for t in arr:...
└ 519 lines...
● Create session plan file
$ cat > /home/runner/.copilot/session-state/a90484f2-d19b-431a-a650-9ca0155e32c1/plan.md <<'EOF'
# Plan
1. Inspect unresolved PR review threads and map each to current code.
2. Implement minimal, safe fixes for clearly actionable issues.
3. Run targeted tests/lint relevant to touched files....
└ 3 lines...
● Read peek/scripts/elasticsearch-mocks.mjs
└ 273 lines read
● Read peek/src/components/cluster-health/clusterHealthUtils.ts
└ 215 lines read
● Read peek/src/components/cluster-health/NodeDetailTable.tsx
└ 206 lines read
● Read peek/src/components/cluster-health/OverviewView.tsx
└ 135 lines read
● Read peek/src/components/cluster-health/RefreshPicker.tsx
└ 61 lines read
● Read peek/src/components/cluster-health/ResilienceSignalsView.tsx
└ 121 lines read
● Read peek/src/hooks/useClusterHealthData.ts
└ 236 lines read
● Read peek/src/routes/manifest.ts
└ 370 lines read
● Read peek/src/components/cluster-health/TaskBacklogView.tsx
└ 76 lines read
● Read peek/tests/unit/clusterHealthUtils.test.ts
└ 248 lines read
● Grep "PRIORITY_ORDER|groupPendingTasks|parseNumber\("
(/home/runner/work/ai-github-actions-playground/ai-github-actions-playground/peek/src)
└ 7 lines found
● Show full bodies for selected review comments
$ python - <<'PY'
import json
ids={2867974903,2867974917,2867975557}
arr=json.load(open('/tmp/pr-context/review_comments.json'))
for t in arr:...
└ 199 lines...
maybe we should make review comments into files based on the comment id or something? maybe also write every piece of review feedback to its own file based on id too? with threads split per file into resolved and unresolved or something like that?
let's think through all the dimensions we'd want to make this super easy for the Agent to find what it wants
We have pr review comments in a json file, we should also probably make a file for unresolved threads, resolved threads, etc in a file too so that the agent doesnt have to do it itself.
See https://github.com/elastic/ai-github-actions-playground/actions/runs/22530481954/job/65269085660?pr=809 for the various permutations the agent ended up making
maybe we should make review comments into files based on the comment id or something? maybe also write every piece of review feedback to its own file based on id too? with threads split per file into resolved and unresolved or something like that?
let's think through all the dimensions we'd want to make this super easy for the Agent to find what it wants