Skip to content

fix(ci): restore Docs Agent Git fallback tests - #158739

Merged
fuller-stack-dev merged 1 commit into
mainfrom
fix/docs-agent-git-fixture
Sep 26, 2026
Merged

fuller-stack-dev merged 1 commit into
mainfrom
fix/docs-agent-git-fixture

Conversation

@fuller-stack-dev

Copy link
Copy Markdown
Member

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

  • Unmodified main 5132886f78e3: all five existing cases fail with Cannot index array with string "jobs"; corrected fixture: all five pass.
  • Exact five-case table: 5.12s red / 10.30s recorded green wall time (first unrecorded green: 6.91s).
  • Adjacent Docs Agent tests: 86 passed, 45.68s wrapper wall time (44.88s Vitest).
  • Test-root typecheck, targeted typed lint, fixture syntax, formatting, line-cap ratchet, and diff checks pass.
  • Independent P0–P2 review: no actionable findings.
  • Rebased over the unrelated agents-core refactor 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; green 24e8350d3fa3617302aa76fd52bb6b76541c6e7d2e1f0f4c2441870b70135d54.

Commands:

node scripts/run-vitest.mjs test/scripts/ci-linux-git.test.ts -t 'Docs Agent review base only falls back after ordinary Git failure' --maxWorkers=1
node scripts/run-vitest.mjs test/scripts/ci-linux-git.test.ts test/scripts/docs-agent-workflow.test.ts -t 'Docs Agent' --maxWorkers=1

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 26, 2026, 3:51 AM ET / 07:51 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 00064dfc20ee43e4a7a88bf30c1e04c56d77a69b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fixture repair preserves meaningful existing assertions and includes a specific before-and-after test account, with no identified patch defect.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The contributor proof gate does not apply to this MEMBER-authored, test-only PR. Its changed owner is the real-shell Docs Agent Git fixture; the PR body reports before-and-after runs of the five fallback cases, but the linked recordings could not be visually inspected because ffprobe was unavailable and browser retrieval returned a cache miss. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The contributor proof gate does not apply to this MEMBER-authored, test-only PR. Its changed owner is the real-shell Docs Agent Git fixture; the PR body reports before-and-after runs of the five fallback cases, but the linked recordings could not be visually inspected because ffprobe was unavailable and browser retrieval returned a cache miss. No stored-data contract changes.
Evidence reviewed 7 items Production workflow contract: Current main requests jobs for the prior run's exact attempt and reads the returned jobs array before choosing a review base.
Current-main fixture mismatch: Before this PR, the Docs Agent fixture returned a workflow-runs object for every GitHub request, including the attempt-jobs request.
Introduced fixture repair: The pinned PR delta adds a separate response for attempt jobs and rejects an unconfigured jobs request.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +72. Total +72 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 84 12 +72
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 84 12 +72

Review metrics

Metric Value Why it matters
Existing fallback cases 5 repaired, 0 added The PR restores existing Git fallback coverage without expanding the per-PR case count.

Technical review

Best 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.

Labels

Label changes:

  • add P2: Five existing CI cases lose their intended fallback coverage, with no user-visible runtime change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.

Label justifications:

  • P2: Five existing CI cases lose their intended fallback coverage, with no user-visible runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@fuller-stack-dev
fuller-stack-dev enabled auto-merge (squash) September 26, 2026 07:55
@fuller-stack-dev
fuller-stack-dev merged commit e6d5303 into main Sep 26, 2026
147 of 149 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/docs-agent-git-fixture branch September 26, 2026 07:56
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

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.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant