Skip to content

fix(live-proof): provision candidate Go toolchains - #1247

Merged
vincentkoc merged 4 commits into
mainfrom
fix/live-proof-go-toolchain
Aug 27, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
fix/live-proof-go-toolchain

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Go live-proof candidates could fail before execution when the reviewed head required a newer Go version than the review runner provided.

Canonical Fix

The review workflow now resolves Go requirements from every runnable candidate's exact reviewed head before execution. Root go.work governs when present; otherwise root go.mod governs. Nested or rootless Go layouts retain automatic toolchain fallback, while root-only candidates keep setup-go's GOTOOLCHAIN=local boundary.

Both exact-item and shard paths use pinned actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 (v6.5.0), a generated version file, a hashFiles gate, and cache: "false". Batch publication is unchanged.

Validation

Exact head: 6ccb0a6cc56451ddc3a1c26602cea5e9af29ddb4

Real Behavior Proof

Hosted branch proof: https://github.com/openclaw/clawsweeper/actions/runs/33033570286

  • Workflow head: 6ccb0a6cc56451ddc3a1c26602cea5e9af29ddb4.
  • Target: steipete/camsnap#15 at 4ac1569be4a031110eed3253d7ba155cf2fa6a84.
  • Pinned setup-go selected Go 1.26.0; runner reported go version go1.26.0 linux/amd64.
  • Root-only candidate retained GOTOOLCHAIN=local.
  • Sanitized child assertion passed with credentials=0.
  • Live-proof execution and publication succeeded.
  • No EACCES occurred; no failed-shard artifact was created; recovery reported no failed shard jobs and nothing to requeue.

Review Finding Disposition

  • Exact-head root selection, setup-go version-file contract, suffixed toolchain normalization, Go 1.14 minimum, and GOTOOLCHAIN child inheritance are covered.
  • Root go.work exclusively governs root go.mod; directive-less workspaces default to Go 1.18.
  • Rootless, mixed, and nested Go layouts enable automatic fallback with a Go 1.21 minimum bootstrap.
  • Nested paths are enumerated safely with NUL-delimited git ls-tree -rz --name-only in both resolvers; -rz is Git's combined short-option form for recursive (-r) plus NUL-delimited (-z) traversal.
  • The latest ClawSweeper P1 claiming traversal was non-recursive is skipped as a false positive. The exact command is asserted for both resolver paths, and the fixture includes nested, Unicode, and newline-containing paths.
  • The previous current-head proof gap is resolved by run 33033570286 above.

Change Size

  • Production workflow: +202 lines.
  • Documentation: +9 lines.
  • Tests: +306/-7 lines.

The positive production delta owns exact-head multi-candidate toolchain resolution for both execution paths. No runtime abstraction, publication path, or batch-publish behavior was added or changed.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 26, 2026, 10:35 PM ET / August 27, 2026, 02:35 UTC.

ClawSweeper review

What this changes

The PR adds Go-version resolution and pinned setup for exact and batched live-proof candidates, then enables automatic Go toolchain selection for mixed or nested-module cases.

Merge readiness

⛔ Blocked by patch quality or review findings - 4 items remain

The attempted repair still misses nested Go modules because its Git tree scan is non-recursive; the hosted proof also predates the current head.

Priority: P1
Reviewed head: 6ccb0a6cc56451ddc3a1c26602cea5e9af29ddb4

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🧂 unranked krab (1/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 4 items Nested scan is non-recursive: The resolver scans for nested Go configuration with git ls-tree --name-only but omits -r, so nested paths cannot match */go.mod or */go.work.
Fixture exposes the missed case: The focused fixture creates a root module plus nested/go.mod and expects automatic fallback, but the resolver source cannot observe that nested file without recursive traversal.
Current-head proof is absent: The PR body’s hosted run is explicitly for 204db8188027f709a7b439a28f3a524ebde4c823; the current head is later and contains the fallback change under review.
Findings 1 actionable finding [P1] Traverse nested Go configuration recursively
Security None None.

How this fits together

The sweep workflow writes review reports, selects runnable live-proof candidates, and executes their plans in a sanitized child process. This change inserts Go toolchain selection between candidate inspection and proof execution.

flowchart LR
  A[Review reports] --> B[Candidate inspection]
  B --> C[Read reviewed Go config]
  C --> D[Choose shared Go toolchain]
  D --> E[Sanitized proof child]
  E --> F[Live verification artifact]
Loading

Before merge

  • Traverse nested Go configuration recursively (P1) - git ls-tree --name-only is not recursive, so a root project with nested/go.mod never sets requires_automatic_toolchain. The job then retains setup-go’s GOTOOLCHAIN=local, preventing a nested proof needing a newer Go release from using automatic fallback. Add -r in both resolvers and exercise this fixture.
  • Resolve merge risk (P1) - A root Go project containing a nested module can still execute its nested proof with GOTOOLCHAIN=local, blocking automatic compiler selection.
  • Resolve merge risk (P2) - The real-behavior artifact predates the current fallback changes.
  • Improve patch quality - Address the highest-priority review finding and re-run the changed-surface validation.

Findings

  • [P1] Traverse nested Go configuration recursively — .github/workflows/sweep.yml:4646-4652
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Workflow and coverage delta workflow +202, tests +306/-7, docs +9 Duplicated resolver logic in exact and shard paths requires parity coverage.

Merge-risk options

Maintainer options:

  1. Repair recursive detection and rerun proof (recommended)
    Use recursive tree traversal for both resolvers, add root-plus-nested coverage, and publish a current-head run showing fallback works.
  2. Pause the workflow change
    Pause this PR if automatic fallback for nested modules is not a supported live-proof contract.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Preserve automatic Go toolchain fallback for root-plus-nested candidates, add focused resolver coverage, and refresh hosted current-head proof.

Technical review

Best possible solution:

Use recursive tree traversal in both resolvers, cover root-plus-nested and rootless candidates, then publish a hosted proof from the current head.

Do we have a high-confidence way to reproduce the issue?

Yes, by source: a root go.mod plus nested go.mod is not detected by the non-recursive listing, leaving the setup action’s local-toolchain policy in force.

Is this the best way to solve the issue?

No. The intended fallback needs recursive path enumeration in both resolvers and a focused root-plus-nested regression fixture.

Full review comments:

  • [P1] Traverse nested Go configuration recursively — .github/workflows/sweep.yml:4646-4652
    git ls-tree --name-only is not recursive, so a root project with nested/go.mod never sets requires_automatic_toolchain. The job then retains setup-go’s GOTOOLCHAIN=local, preventing a nested proof needing a newer Go release from using automatic fallback. Add -r in both resolvers and exercise this fixture.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4a6f9ecb165e.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • P1: The patch can make runnable nested Go candidates fail before live verification in an active review workflow.
  • merge-risk: 🚨 compatibility: Existing nested Go projects can lose automatic compiler selection in a root-module shard.
  • merge-risk: 🚨 automation: The PR changes review-job setup and proof execution, where this defect can cause job failures.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

Acceptance criteria:

  • [P1] node --test test/sweep-workflow.test.ts.
  • [P1] node --test --test-name-pattern='review live proof composes inherited Go environment settings' test/live-proof-review-environment.test.ts.
  • [P1] pnpm run check.
  • [P1] Hosted current-head review-shard proof covering a root module plus nested module.

What I checked:

  • Nested scan is non-recursive: The resolver scans for nested Go configuration with git ls-tree --name-only but omits -r, so nested paths cannot match */go.mod or */go.work. (.github/workflows/sweep.yml:4652, 6ccb0a6cc564)
  • Fixture exposes the missed case: The focused fixture creates a root module plus nested/go.mod and expects automatic fallback, but the resolver source cannot observe that nested file without recursive traversal. (test/sweep-workflow.test.ts:1714, 6ccb0a6cc564)
  • Current-head proof is absent: The PR body’s hosted run is explicitly for 204db8188027f709a7b439a28f3a524ebde4c823; the current head is later and contains the fallback change under review. (.github/workflows/sweep.yml:4716, 6ccb0a6cc564)
  • Feature history: Current repository history connects live-proof execution to the original feature and subsequent writable-cache and bounded-install work. (.github/workflows/sweep.yml:4591, 03c1f452ec49)

Likely related people:

  • Vincent Koc: Recent merged live-proof cache work and the base workflow change place this contributor in the current history of the execution path. (role: recent live-proof contributor; confidence: high; commits: d61664303d1b, afe976209aa5; files: .github/workflows/sweep.yml, src/live-proof/review-artifacts.ts)
  • Peter Steinberger: The current live-proof review workflow traces to the original feature commit. (role: introduced live-proof review execution; confidence: high; commits: 03c1f452ec49; files: .github/workflows/sweep.yml, src/live-proof/review-artifacts.ts)
  • Martin Cleary: Recent current-main work tightened exact-review tool installation on this workflow surface. (role: recent workflow safety contributor; confidence: medium; commits: e869bde55a75; files: .github/workflows/sweep.yml)

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-25T20:54:22.136Z sha b732239 :: needs changes before merge. :: [P1] Write a setup-go-compatible version file
  • reviewed 2026-08-26T00:21:35.613Z sha 204db81 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T01:02:14.193Z sha 204db81 :: needs changes before merge. :: [P1] Preserve automatic toolchain fallback for nested modules

@vincentkoc
vincentkoc marked this pull request as ready for review August 26, 2026 00:29
@vincentkoc
vincentkoc requested a review from a team as a code owner August 26, 2026 00:29
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P1 Urgent regression or broken agent/channel workflow affecting real users now. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 26, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. proof: sufficient Contributor real behavior proof is sufficient. labels Aug 27, 2026
@vincentkoc
vincentkoc merged commit ceda2e0 into main Aug 27, 2026
34 checks passed
@vincentkoc
vincentkoc deleted the fix/live-proof-go-toolchain branch August 27, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant