Skip to content

fix(release): allow ANSI in reusable job logs - #123129

Merged
vincentkoc merged 2 commits into
mainfrom
fix/frv-job-log-escape
Aug 13, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/frv-job-log-escape

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Reusable full-release validation rejected otherwise valid prior evidence when a GitHub Actions job log contained terminal escape sequences. The failed log read made the release workflow fall through into unnecessary heavy validation jobs.

Why This Change Was Made

Allow terminal escape sequences only for the parent job-log API read. Older gh versions retry once without the flag only when stderr contains the exact unsupported-flag line; unrelated failures still propagate without retry. Other REST reads remain on their existing argv contract, and artifact ZIP downloads remain on the plain gh binary path.

User Impact

Release operators can reuse exact validated evidence even when a child dispatch log contains ANSI output, avoiding a false-negative reuse decision and an unnecessary full validation rerun.

Evidence

  • Failure: full-release validation run https://github.com/openclaw/openclaw/actions/runs/31690790954 rejected run 31676494305 because the job-log response contained terminal escape sequences.
  • node scripts/run-vitest.mjs test/scripts/release-ci-summary.test.ts - 50 passed, including modern, legacy fallback, and unrelated-error contracts.
  • Live read of job 94372185605 with local gh 2.93.0 exercised the legacy fallback and returned 50,744 bytes without stderr leakage.
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.scripts.json scripts/release-ci-summary.mjs - passed.
  • pnpm format:check --no-error-on-unmatched-pattern -- scripts/release-ci-summary.mjs test/scripts/release-ci-summary.test.ts - passed.
  • git diff --check - passed.

Changelog: none; internal release tooling only.

@vincentkoc vincentkoc self-assigned this Aug 13, 2026
@clawsweeper

clawsweeper Bot commented Aug 13, 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 labels Aug 13, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 13, 2026
@clawsweeper

clawsweeper Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

@vincentkoc
vincentkoc marked this pull request as ready for review August 13, 2026 10:39
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 13, 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 merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 13, 2026
@clawsweeper

clawsweeper Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 13, 2026, 7:15 AM ET / 11:15 UTC.

ClawSweeper review

What this changes

The PR preserves ANSI sequences when reading reusable GitHub Actions job logs and retries without the flag only for older GitHub CLI versions.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer handling. The patch correctly confines ANSI preservation and legacy fallback to the parent job-log read; no blocking defect was found.

Priority: P2
Reviewed head: 3f530c3be667b0a37a272aa04774a45d19afce9e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with credible supported, legacy, and error-path coverage.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned release-tooling PR is outside the external-contributor proof gate; its body nevertheless reports an after-fix live CLI read.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned release-tooling PR is outside the external-contributor proof gate; its body nevertheless reports an after-fix live CLI read.
Evidence reviewed 6 items Current owner boundary: Current main reads parent job logs through the cache-aware GitHub CLI path; this is the narrow source of ANSI stripping before child-run validation.
Scoped repair: The PR adds the raw-output flag only to the parent job-log request and retries only after the exact unsupported-flag diagnostic.
Direct GitHub CLI contract check: The locally installed gh 2.85.0 rejects the flag with the exact standalone stderr line the fallback recognizes, followed by usage text.
Findings None None.
Security None None.

How this fits together

Full-release validation reads a parent job log to verify dispatched child workflows and decide whether prior evidence can be reused. A valid read allows reuse; an invalid read triggers heavier validation work.

flowchart LR
  A[Prior workflow run] --> B[Release evidence reader]
  B --> C[GitHub CLI job-log read]
  C --> D[Child-run validation]
  D --> E{Evidence reusable?}
  E -->|Yes| F[Reuse validation]
  E -->|No| G[Run full validation]
Loading

Decision needed

Question Recommendation
Does the release-tooling owner approve merging this maintainer-owned automation change after confirming its current head remains cleanly mergeable? Approve the scoped fallback: Merge the exact unsupported-flag fallback once current-head release checks remain green.

Why: The protected maintainer label requires explicit maintainer handling even though the patch is technically sound.

Before merge

  • Resolve merge risk (P2) - Production is net +26 lines for GitHub CLI compatibility; the fallback is deliberately restricted to the exact unsupported-flag response, so no broader compatibility path is warranted.
  • Complete next step (P2) - The protected maintainer label requires release-owner confirmation rather than automated repair or closure.
Agent review details

Security

None.

PR surface

Tests +110, Other +26. Total +136 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 110 0 +110
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 27 1 +26
Total 2 137 1 +136

Review metrics

Metric Value Why it matters
Production vs test LOC production +26, tests +110 The added compatibility branch is accompanied by focused behavior coverage for supported, legacy, and unrelated-error paths.

Stored data model

Persistent data-model change detected: serialized state: test/scripts/release-ci-summary.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the bounded automation change (recommended)
    The affected release workflow retries only the known legacy CLI flag error and propagates all other failures.

Technical review

Best possible solution:

Retain this single owner-boundary change: request raw log output where supported and preserve only the exact legacy fallback, since no smaller refactor can provide both behaviors.

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

Yes—source reproducible: current main makes an unflagged job-log read, and the local GitHub CLI confirms the exact legacy error path the patch handles. The PR body also supplies a failed workflow and reported live after-fix read.

Is this the best way to solve the issue?

Yes. The parent job-log reader owns this behavior, and the patch avoids changing other REST reads or artifact-download routing.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2a8b322ebf52.

Labels

Label changes:

  • add P2: This avoids unnecessary release validation work without changing the product runtime.
  • add merge-risk: 🚨 automation: The PR changes how release validation invokes the GitHub CLI and therefore affects evidence-reuse automation.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned release-tooling PR is outside the external-contributor proof gate; its body nevertheless reports an after-fix live CLI read.

Label justifications:

  • P2: This avoids unnecessary release validation work without changing the product runtime.
  • merge-risk: 🚨 automation: The PR changes how release validation invokes the GitHub CLI and therefore affects evidence-reuse automation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned release-tooling PR is outside the external-contributor proof gate; its body nevertheless reports an after-fix live CLI read.

Evidence

What I checked:

  • Current owner boundary: Current main reads parent job logs through the cache-aware GitHub CLI path; this is the narrow source of ANSI stripping before child-run validation. (scripts/release-ci-summary.mjs:291, 2a8b322ebf52)
  • Scoped repair: The PR adds the raw-output flag only to the parent job-log request and retries only after the exact unsupported-flag diagnostic. (scripts/release-ci-summary.mjs:291, 3f530c3be667)
  • Direct GitHub CLI contract check: The locally installed gh 2.85.0 rejects the flag with the exact standalone stderr line the fallback recognizes, followed by usage text. (scripts/release-ci-summary.mjs:306, 3f530c3be667)
  • Regression coverage: Tests cover a supported CLI preserving ANSI, the exact legacy fallback, and an unrelated error that must not retry. (test/scripts/release-ci-summary.test.ts:240, 3f530c3be667)
  • Feature provenance: Blame ties the existing unflagged parent job-log path to the current release-evidence implementation. (scripts/release-ci-summary.mjs:291, a7a0399fea)
  • Reviewer infrastructure limitation: Live GitHub discussion retrieval was unavailable because api.github.com could not be resolved; provided PR context and local source were sufficient for this keep-open protected-item decision.

Likely related people:

  • vincentkoc: Has repeated history on the release-evidence script and authored the focused compatibility repair. (role: recent area contributor; confidence: high; commits: 3f530c3be667; files: scripts/release-ci-summary.mjs, test/scripts/release-ci-summary.test.ts)
  • Jesse Merhi: Current-main blame attributes the unflagged parent job-log read to this release-evidence implementation. (role: introduced current job-log path; confidence: medium; commits: a7a0399fea; files: scripts/release-ci-summary.mjs)

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.

@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer checklist disposition:

  • Accept the net +26 production LOC. It is the necessary bounded GitHub CLI compatibility contract: preserve ANSI on supported clients, retry only for the exact unsupported-flag diagnostic, and propagate unrelated errors.
  • Release owner approves the scoped exact-error fallback. Independent review caught the legacy-CLI regression; the patched exact head 3f530c3be667b0a37a272aa04774a45d19afce9e now has green CI, and the latest ClawSweeper review reports no findings and identifies this as the best fix.

Proceeding with squash merge.

@vincentkoc
vincentkoc merged commit 57fabb2 into main Aug 13, 2026
112 of 114 checks passed
@vincentkoc
vincentkoc deleted the fix/frv-job-log-escape branch August 13, 2026 11:19
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 14, 2026
Preserve ANSI output for reusable validation job-log reads while retaining a bounded fallback for GitHub CLI versions that do not support the raw-output flag.
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant