Skip to content

fix(release): allow ANSI in focused evidence logs - #129238

Merged
steipete merged 2 commits into
mainfrom
steipete/beta-docker-log-read
Aug 25, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/beta-docker-log-read

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Beta Docker recovery now reaches the authentic focused-evidence job logs, but the validator reads those raw logs without opting into ANSI output. The current gh wrapper rejects terminal escape sequences by default, so recovery fails before Docker publication.

Why This Change Was Made

Use the same bounded compatibility contract already established in release-ci-summary.mjs: request job logs with --allow-escape-sequences, and retry without the flag only when an older gh reports the exact unknown-flag error. All other failures continue to propagate.

User Impact

Focused beta release evidence can consume genuine ANSI-bearing Actions logs, unblocking Docker-only recovery for 2026.8.1-beta.3 without weakening target-SHA checks.

Evidence

  • node scripts/run-vitest.mjs test/scripts/authorized-beta-focused-evidence.test.ts test/scripts/release-ci-summary.test.ts — 114 passed
  • node scripts/check-changed.mjs -- scripts/validate-authorized-beta-focused-evidence.mts test/scripts/authorized-beta-focused-evidence.test.ts — passed
  • Fresh Codex autoreview — no accepted/actionable findings

Production/tooling LOC: +27/-1 | Tests: +9/-0.

@steipete
steipete marked this pull request as ready for review August 25, 2026 10:25
@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.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete steipete closed this Aug 25, 2026
@steipete steipete reopened this Aug 25, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 25, 2026, 6:32 AM ET / 10:32 UTC.

ClawSweeper review

What this changes

The PR makes focused beta-release evidence request ANSI-preserving Actions job logs and retry without that flag only for an older GitHub CLI’s exact unknown-flag error.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: the ANSI fallback matches the established release-summary contract, but this PR’s added test only searches source text and does not exercise the release validator. Likely related people: Vincent Koc (high confidence).

Priority: P2
Reviewed head: 30ad56a2869664f439013482e017b329922b2b22

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation matches a proven sibling contract, but its own test does not execute the changed behavior.
Proof confidence 🌊 off-meta tidepool Not applicable: This repository-member PR is exempt from the external-contributor proof gate; focused validator behavior still needs regression coverage.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This repository-member PR is exempt from the external-contributor proof gate; focused validator behavior still needs regression coverage.
Evidence reviewed 6 items Current main lacks the focused-log compatibility path: Current main reads the focused job log without the ANSI flag, so an affected CLI reaches no fallback before the target-SHA check.
PR preserves the owner-boundary check: The proposed helper makes one flagged request, retries only after the exact normalized legacy error, then still verifies the target SHA.
Existing sibling contract and behavior proof: Current main’s release-summary helper implements the same bounded retry, and its tests execute ANSI success, exact fallback, and unrelated-error propagation.
Findings 1 actionable finding [P2] Exercise the GitHub CLI fallback through the validator
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs test/scripts/authorized-beta-focused-evidence.test.ts test/scripts/release-ci-summary.test.ts

Result: PASS (completed)

node scripts/run-vitest.mjs test/scripts/authorized-beta-focused-evidence.test.ts test/scripts/release-ci-summary.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129238-8KF4ss/target$ node scripts/run-vitest.mjs test/scripts/authorized-beta-focused-evidence.test.ts test/sc
ripts/release-ci-summary.test.ts
node scripts/run-vitest.mjs test/scripts/authorized-beta-focused-evidence.test.ts test/scripts/release-ci-summary.test.ts
[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129238-8KF4ss/target

 ✓  tooling  test/scripts/release-ci-summary.test.ts (67 tests) 2353ms
     ✓ uses cached gh for evidence reads and plain gh only for ZIP bytes  435ms
     ✓ summarizes only visible watch transitions  693ms
 ✓  tooling  test/scripts/authorized-beta-focused-evidence.test.ts (47 tests) 4945ms
     ✓ accepts skipped historical release-plan children without run identities  337ms
     ✓ verifies the policy candidate when the release checkout has diverged  380ms
     ✓ fetches only the exact policy candidate when the release clone does not contain it  337ms

 Test Files  2 passed (2)
      Tests  114 passed (114)
   Start at  10:32:58
   Duration  7.97s (transform 400ms, setup 60ms, import 254ms, tests 7.30s, environment 0ms)

[test] passed 1 Vitest shard in 13.60s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129238-8KF4ss/target$ node scripts/run-vitest.mjs test/scripts/authorized-beta-focused-evidence.test.ts test/sc
ripts/release-ci-summary.test.ts



























Assertions:

  • PASS expect_output: passed

How this fits together

Focused beta evidence reads GitHub Actions logs to prove the reviewed commit before Docker recovery can publish. This change affects the GitHub CLI log-read step before the target-SHA binding check.

flowchart LR
A[Focused validation workflow] --> B[Evidence validator]
B --> C[GitHub CLI job-log request]
C --> D{ANSI flag supported?}
D -->|yes| E[Read log]
D -->|legacy flag error| F[Retry without flag]
E --> G[Verify target SHA]
F --> G
G --> H[Authorize Docker recovery]
Loading

Before merge

  • Exercise the GitHub CLI fallback through the validator (P2) - This source-text test passes even if the retry predicate or call order no longer works at runtime. Reuse the existing staged validator fixture to test ANSI success, the exact legacy error, and an unrelated error that must not retry.
  • Resolve merge risk (P1) - The validator’s net +27 production/tooling lines duplicate a bounded CLI compatibility policy, but the added source-text test cannot prove retry ordering or fail-closed behavior in this owner path.
  • Complete next step (P2) - A focused validator-level regression test is a concrete mechanical repair for the sole blocking finding.

Findings

  • [P2] Exercise the GitHub CLI fallback through the validator — test/scripts/authorized-beta-focused-evidence.test.ts:523-528
Agent review details

Security

None.

PR surface

Tests +8, Other +27. Total +35 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 8 0 +8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 28 1 +27
Total 2 36 1 +35

Review metrics

Metric Value Why it matters
Production versus test delta production +28/-1 (net +27), tests +8/-0 The compatibility branch grows release tooling while the accompanying test remains source-text-only.

Merge-risk options

Maintainer options:

  1. Add validator-level fallback proof (recommended)
    Exercise ANSI output, the exact legacy CLI error, and an unrelated failure through focused validation before merging.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Replace the source-text assertion with validator-level coverage for ANSI success, exact legacy fallback, and unrelated-error propagation.

Technical review

Best possible solution:

Use the focused validator’s existing staged closure and fake GitHub CLI to test ANSI success, exact legacy fallback, and unrelated-error propagation; retain the narrow fallback predicate.

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

Yes—source reproducible: current main makes the unflagged job-log call, while the GitHub CLI documents the ANSI-preserving flag and the PR identifies the narrow legacy fallback path.

Is this the best way to solve the issue?

Yes, with the missing behavior proof: the implementation matches the tested sibling contract and keeps all non-matching failures hard.

Full review comments:

  • [P2] Exercise the GitHub CLI fallback through the validator — test/scripts/authorized-beta-focused-evidence.test.ts:523-528
    This source-text test passes even if the retry predicate or call order no longer works at runtime. Reuse the existing staged validator fixture to test ANSI success, the exact legacy error, and an unrelated error that must not retry.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 452e73402221.

Labels

Label changes:

  • add P2: The change repairs a bounded beta release-recovery workflow.
  • add merge-risk: 🚨 automation: The modified GitHub CLI request gates automated focused evidence used by release recovery.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This repository-member PR is exempt from the external-contributor proof gate; focused validator behavior still needs regression coverage.

Label justifications:

  • P2: The change repairs a bounded beta release-recovery workflow.
  • merge-risk: 🚨 automation: The modified GitHub CLI request gates automated focused evidence used by release recovery.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This repository-member PR is exempt from the external-contributor proof gate; focused validator behavior still needs regression coverage.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs test/scripts/authorized-beta-focused-evidence.test.ts test/scripts/release-ci-summary.test.ts.
  • [P1] node scripts/check-changed.mjs -- scripts/validate-authorized-beta-focused-evidence.mts test/scripts/authorized-beta-focused-evidence.test.ts.

What I checked:

Likely related people:

  • Vincent Koc: Commit 57fabb2 introduced the sibling ANSI log contract, and blame assigns its current main implementation to 76f5f84. (role: introduced and recently carried the shared release-log compatibility behavior; confidence: high; commits: 57fabb2c9c35, 76f5f84a7c26; files: scripts/release-ci-summary.mjs, test/scripts/release-ci-summary.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add focused-validator coverage for the three GitHub CLI outcomes.
  • Run the focused release-evidence test pair on the updated head.

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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready evidence for the reviewed head ecebe116c9500b4ee17d7f3065c4b0cdc2395a3a:

  • The current-head ClawSweeper review run completed successfully and uploaded immutable artifact exact-review-32840304341-1. Its final verdict is 🐚 platinum hermit (4/6), patch is correct, and no findings. The review was produced at 2026-08-25T11:06:25Z; its asynchronous PR-comment publisher has not yet updated the started placeholder.
  • Its sole rank-up move, “Wait for required exact-head checks to pass,” is complete: CI run 32840173445 passed on the exact reviewed head.
  • Both moves from the previous review are also complete: executable staged-validator coverage now exercises ANSI-bearing logs, exact legacy-flag fallback, and unrelated-error propagation without retry; the owner/sibling regression pair passes 116 tests.
  • ClawSweeper independently ran the changed validator suite on the exact head: 49 tests passed, including all three executable fake-GitHub-CLI cases.
  • Maintainer verification: node scripts/run-vitest.mjs test/scripts/authorized-beta-focused-evidence.test.ts test/scripts/release-ci-summary.test.ts (116 passed); node scripts/check-changed.mjs -- scripts/validate-authorized-beta-focused-evidence.mts test/scripts/authorized-beta-focused-evidence.test.ts (passed); fresh autoreview on the unchanged head reported no accepted/actionable findings.

Production/tooling: +28/-1 (net +27); tests: +291/-0. The tooling growth is justified by the validator's standalone execution boundary; sharing the release-summary helper would require a broader unrelated tooling refactor. Existing target-SHA binding remains intact, and nonmatching GitHub CLI errors still fail closed.

@steipete
steipete merged commit fff5eb0 into main Aug 25, 2026
150 checks passed
@steipete
steipete deleted the steipete/beta-docker-log-read branch August 25, 2026 11:25
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
* fix(release): allow ANSI in focused evidence logs

* test(release): exercise focused log fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M 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