Skip to content

fix(release): fetch child job logs with --allow-escape-sequences - #136856

Merged
steipete merged 1 commit into
mainfrom
fix/frv-allow-escape-sequences-logs
Sep 3, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/frv-allow-escape-sequences-logs

Conversation

@steipete

@steipete steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

pnpm frv continue --failed --run <parent> crashed on maintainer Macs with the response contains terminal escape sequences; pass --allow-escape-sequences to output it anyway while fetching a failed child's job log, so the release controller could not rerun failed children (seen during the 2026.9.1 release on run 33704822889).

Why This Change Was Made

The gh on those Macs is the Octopool shim, which applies gh's escape-sequence refusal even off a TTY. Real gh only checks on a TTY and ignores --allow-escape-sequences otherwise, so passing the flag on the job-log fetch keeps the controller working with either binary. apiText gains an optional trailing extraArgs parameter; existing callers are unchanged.

User Impact

Maintainer tooling only; no runtime change.

Evidence

  • Before: pnpm frv continue --failed --run 33704822889 -> [frv] Command failed: gh api repos/openclaw/openclaw/actions/jobs/100491604631/logs ... (escape-sequence refusal).
  • gh api .../logs --allow-escape-sequences returns the log body with the same shim.
  • node --check scripts/frv.mjs passes.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review September 3, 2026 02:22
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Sep 3, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 2, 2026, 11:49 PM ET / September 3, 2026, 03:49 UTC.

ClawSweeper review

What this changes

This PR adds GitHub CLI’s escape-sequence flag to FRV child-job log downloads so release recovery can read ANSI-containing logs.

Merge readiness

⛔ Blocked before merge - 3 items remain

The previous P1 compatibility blocker remains: the introduced unconditional flag fixes the Octopool shim case but makes FRV fail on legacy GitHub CLI installations before it can rerun failed children.

Priority: P1
Reviewed head: 81754f00c9890e36fb71404ec345745f4d2d229c

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is narrowly scoped and addresses a real release-recovery failure, but it retains a confirmed legacy-client regression.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored release-tooling PR is exempt from the external contributor proof gate; its body supplies terminal evidence for the Octopool case, while the remaining blocker is the untested legacy GitHub CLI compatibility path.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored release-tooling PR is exempt from the external contributor proof gate; its body supplies terminal evidence for the Octopool case, while the remaining blocker is the untested legacy GitHub CLI compatibility path.
Evidence reviewed 6 items Introduced trigger: The PR adds --allow-escape-sequences unconditionally when FRV reads a job log.
Failure path: FRV passes all supplied arguments to gh; a non-transient command error is rethrown, so an unknown-flag error prevents the log read and subsequent rerun flow.
Current-main compatibility precedent: The release summary’s corresponding job-log owner makes the flagged request, then retries exactly once without it only when stderr contains the exact legacy unknown-flag line.
Findings 1 actionable finding [P1] Preserve legacy GitHub CLI support
Security None None.

How this fits together

FRV is OpenClaw’s full-release validation controller. It reads GitHub Actions child-job logs to verify release state and decide which failed child jobs to rerun.

flowchart LR
  A[Failed release child job] --> B[FRV controller]
  B --> C[GitHub CLI log request]
  C --> D[Job log text]
  D --> E[Failed-job rerun decision]
Loading

Before merge

  • Preserve legacy GitHub CLI support (P1) - This unconditional argument makes getJobLog throw on older gh versions that report the exact unknown-flag error, so FRV stops before rerunning failed children. The current release-summary log reader already retries once without the flag only for that exact error; give FRV the same bounded fallback and regression coverage. This is the unresolved prior finding.
  • Resolve merge risk (P2) - Merging this unconditional flag makes release recovery fail for operators whose older GitHub CLI rejects it, even though the current release tooling already supports a bounded fallback for that exact error.
  • Complete next step (P2) - Add the exact legacy unknown-flag fallback for FRV job-log reads and regression coverage for both supported and legacy GitHub CLI paths before merge.

Findings

  • [P1] Preserve legacy GitHub CLI support — scripts/frv.mjs:530
Agent review details

Security

None.

PR surface

Other +3. Total +3 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 5 2 +3
Total 1 5 2 +3

Review metrics

Metric Value Why it matters
Production vs test LOC production +3, tests +0 The bug-fix branch adds a new release-controller compatibility path without regression coverage.

Merge-risk options

Maintainer options:

  1. Restore legacy CLI fallback (recommended)
    Retry the same job-log request once without the flag only for the exact legacy unknown-flag error, then add FRV coverage for both request paths.

Technical review

Best possible solution:

Keep the job-log-specific flagged request, but mirror the existing exact-error fallback and cover both the supported and legacy CLI paths in FRV’s protected GitHub-read test.

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

Yes, source-reproducible: an older gh that emits the exact unknown-flag error reaches FRV’s non-transient error path and aborts the recovery operation before reruns.

Is this the best way to solve the issue?

No. The flagged request is the right primary path for ANSI logs, but a job-log-specific exact-error fallback is required to preserve the established legacy GitHub CLI compatibility contract.

Full review comments:

  • [P1] Preserve legacy GitHub CLI support — scripts/frv.mjs:530
    This unconditional argument makes getJobLog throw on older gh versions that report the exact unknown-flag error, so FRV stops before rerunning failed children. The current release-summary log reader already retries once without the flag only for that exact error; give FRV the same bounded fallback and regression coverage. This is the unresolved prior finding.
    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 4af3fc294575.

Labels

Label justifications:

  • P1: A failed FRV log read blocks maintainers from rerunning failed release-validation children.
  • merge-risk: 🚨 compatibility: The added GitHub CLI flag is unsupported by legacy installations that FRV’s existing sibling tooling explicitly accommodates.
  • 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 maintainer-authored release-tooling PR is exempt from the external contributor proof gate; its body supplies terminal evidence for the Octopool case, while the remaining blocker is the untested legacy GitHub CLI compatibility path.

Evidence

Acceptance criteria:

  • [P1] pnpm test test/scripts/frv.test.ts.
  • [P1] node --check scripts/frv.mjs.

What I checked:

  • Introduced trigger: The PR adds --allow-escape-sequences unconditionally when FRV reads a job log. (scripts/frv.mjs:530, 81754f00c989)
  • Failure path: FRV passes all supplied arguments to gh; a non-transient command error is rethrown, so an unknown-flag error prevents the log read and subsequent rerun flow. (scripts/frv.mjs:157, 81754f00c989)
  • Current-main compatibility precedent: The release summary’s corresponding job-log owner makes the flagged request, then retries exactly once without it only when stderr contains the exact legacy unknown-flag line. (scripts/release-ci-summary.mjs:557, 4af3fc294575)
  • Current-main regression coverage: The release-summary test exercises both the supported flagged path and the exact legacy error fallback, including the ordered two-request assertion. (test/scripts/release-ci-summary.test.ts:376, 4af3fc294575)
  • GitHub CLI contract inspected: The installed official GitHub CLI v2.98.0 documents --allow-escape-sequences for gh api. Its current documentation cannot establish support in older client versions; OpenClaw’s current compatibility test establishes the relevant legacy failure shape.
  • Main still lacks the shim fix: Current main’s FRV getJobLog call is unflagged, so the central Octopool escape-sequence failure remains a valid problem for this PR to solve. (scripts/frv.mjs:527, 4af3fc294575)

Likely related people:

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

Rank-up moves

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

  • Retry once without the flag only for the exact legacy unknown-flag error.
  • Extend FRV’s protected GitHub-read test to assert both the flagged request and the legacy fallback.

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 (2 earlier review cycles)
  • reviewed 2026-09-03T02:58:17.267Z sha 6700f0dbee62e81c047544fc592721d5913a0bca :: blocked before merge. :: [P1] Preserve legacy GitHub CLI support
  • reviewed 2026-09-03T03:08:59.037Z sha 0cad6e0 :: blocked before merge. :: [P1] Preserve legacy GitHub CLI support

@steipete
steipete force-pushed the fix/frv-allow-escape-sequences-logs branch from 6700f0d to 0cad6e0 Compare September 3, 2026 03:01
The Octopool gh shim used on maintainer Macs refuses job-log bodies that
contain terminal escape sequences even when stdout is not a TTY, which made
`pnpm frv continue --failed` crash before rerunning any failed child. Real gh
only applies that check on a TTY and ignores the flag otherwise, so passing it
keeps the controller working with either binary. Formatted with oxfmt from a
normal checkout; frv tests pass there.
@steipete
steipete force-pushed the fix/frv-allow-escape-sequences-logs branch from 0cad6e0 to 81754f0 Compare September 3, 2026 03:42
@steipete
steipete merged commit 05b9d34 into main Sep 3, 2026
152 checks passed
@steipete
steipete deleted the fix/frv-allow-escape-sequences-logs branch September 3, 2026 04:17
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 3, 2026
…nclaw#136856)

The Octopool gh shim used on maintainer Macs refuses job-log bodies that
contain terminal escape sequences even when stdout is not a TTY, which made
`pnpm frv continue --failed` crash before rerunning any failed child. Real gh
only applies that check on a TTY and ignores the flag otherwise, so passing it
keeps the controller working with either binary. Formatted with oxfmt from a
normal checkout; frv tests pass there.
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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XS 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