Repository navigation
fix(ci): restore Docs Agent Git fallback tests - #158739
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 26, 2026, 3:51 AM ET / 07:51 UTC. ClawSweeper reviewWhat this changesThe branch updates the Docs Agent Git test fixture to return run-attempt job responses and checks that the five existing fallback cases make the expected GitHub API calls. Merge readiness✅ Ready for maintainer review Keep this PR open. Current main still has the fixture mismatch that prevents five existing Docs Agent fallback cases from reaching their Git assertions, and the proposed repair is focused. No introduced correctness defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Docs Agent workflow reads earlier CI runs and their jobs to decide whether to review documentation and which Git revision to use as its base. These tests run that workflow gate with simulated Git and GitHub responses, then check its output and cleanup behavior. flowchart LR
A[CI run] --> B[Docs Agent gate]
B --> C[Earlier workflow runs]
C --> D[Jobs for each attempt]
D --> E[Review history decision]
E --> F[Git fallback]
F --> G[Gate output]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +72. Total +72 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the workflow fixture aligned with the exact-attempt jobs response while retaining the existing fallback and cleanup assertions. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows that the existing five-case test reaches an attempt-jobs request while its fixture returns workflow runs for that request; this read-only review did not execute the test. Is this the best way to solve the issue? Yes. Updating the shared fixture to model the workflow's existing API response is a narrow repair, and the test retains its original Git fallback assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7dc4905d61a8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash auto-merge.
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(ci): restore Docs Agent Git fallback tests This is item 3/3 in the current shard. Shard 27/89. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
What Problem This Solves
Fixes five Docs Agent Git fallback tests that fail before exercising their Git behavior after the workflow began checking the writer job for each run attempt.
User Impact
No user-visible runtime change. This restores the CI tests’ intended fallback and terminal-cleanup coverage.
Why This Change Was Made
The workflow added an attempt-specific jobs request in #157852, but the fixture returned a workflow-runs object for both requests. It now supplies explicitly configured run/attempt jobs, rejects unexpected requests, and asserts both exact API calls while preserving every Git fallback, output, cleanup, and backoff assertion. No production workflow changes or new test cases.
Evidence
5132886f78e3: all five existing cases fail withCannot index array with string "jobs"; corrected fixture: all five pass.67adcce7e304; patch bytes unchanged.Raw recorded reproduction and correction
Red: pristine
5132886f78e3bf63cdbcfa43e8be304faf9c6ae7.docs-agent-git-red.mp4
Green: that base plus the exact patch subsequently committed here (the pre-commit recording prints the base HEAD). Patch SHA-256:
f9b3bc5444f459aee0aac4ece8e48a4efe8eff1b812eafa4cbabf4feddf37e98.docs-agent-git-green.mp4
MP4 SHA-256: red
4424e21f0bd194fe63e5f74ed5c2e4cc45cdd28336290d8a5a14db3bb4b3d8f9; green24e8350d3fa3617302aa76fd52bb6b76541c6e7d2e1f0f4c2441870b70135d54.Commands: