Skip to content

fix(release): preserve legacy gh log reads - #137016

Merged
vincentkoc merged 1 commit into
mainfrom
fix/frv-legacy-gh-log-read
Sep 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/frv-legacy-gh-log-read

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Related: #136856

What Problem This Solves

Fixes an issue where maintainers using gh 2.96 or older could not run pnpm frv continue --failed after #136856 because the job-log preflight passed an unsupported --allow-escape-sequences flag and aborted before any recovery mutation.

Why This Change Was Made

The FRV client keeps the flagged, protected no-cache request as the primary path. It retries once without the flag only when stderr contains the exact standalone legacy-client line unknown flag: --allow-escape-sequences; every other error is propagated unchanged.

The fallback stays local to scripts/frv.mjs. The protected PATH route, Cache-Control: max-age=0, transport classifier, workflows, timeouts, and rerun policy are unchanged. Remove this compatibility branch once maintainer environments require gh >= 2.97.

User Impact

Maintainers can recover failed FRV children with both ANSI-capable current gh clients and legacy clients that predate the flag. No runtime product behavior changes.

Evidence

  • Official cli/cli source: v2.96.0 has no --allow-escape-sequences API flag; v2.97.0 adds the flag and permits raw non-JSON response bodies to bypass escape-sequence refusal.
  • Direct official-binary proof: checksum-verified gh 2.96.0 (f23a0c37...) exits 1 with the exact standalone line unknown flag: --allow-escape-sequences; checksum-verified 2.97.0 (a58b8fd7...) accepts the same gh api arguments and proceeds to authentication (exit 4 with no unknown-flag error). Releases were published July 2 and July 31, 2026, respectively.
  • Before production fix: test/scripts/frv.test.ts had 45 passing cases and one expected failure. The legacy-client case stopped on unknown flag: --allow-escape-sequences, proving recovery aborted in preflight.
  • After fix, exact rebased head 24db7f902f0fc49fa2a3acdeee4e5892df8875f0: node scripts/run-vitest.mjs run test/scripts/frv.test.ts passes 46/46.
  • node --check scripts/frv.mjs, focused Oxfmt, both changed-file Oxlint targets, test-root tsgo, coercion-helper guard, Docker E2E boundary guard, raw HTTP/2 guard, and git diff --check pass.
  • check-changed initially stopped because the GWT lacked nested workspace dependency links. After enabling the full checkout and linking the canonical workspace dependencies, the failed test-root typecheck and every remaining planned check passed.
  • Test audit: the added cases protect observable command ordering and error propagation at the real process boundary, reuse the existing harness, fail on the demonstrated regression, and add no test-only production seam.
  • Deslop: no behavior-neutral cleanup remained.
  • Autoreview: P1 scoped-clean, confidence 0.98.
  • Production/tooling LOC: +21/-2, net +19. Tests/test-support: +35/-4, net +31.
  • Stable patch ID across the final main rebase: 9c2000becddd95bf6637e25b43543c4d054ef772.
  • No FRV campaign, rerun, release, publish, tag, registry, workflow, or timeout mutation.

Agent Transcript

Redacted Codex session transcript
source: [LOCAL_SESSION]
redaction: local paths, credentials, raw tool output, system/developer prompts, and unrelated session turns omitted

[user]
Implement only the independently reviewed repair for landed #136856 in a fresh GWT. Prove the legacy test fails before the production change, keep the fallback local and exact, run focused verification and review, then open a draft PR without merging.

[assistant]
Refreshed origin/main, created and verified the isolated full-history GWT, inspected the merged regression and official gh v2.96/v2.97 source, and added process-boundary regression coverage.

[assistant]
Captured the required pre-fix failure: 45 tests passed and only the legacy unknown-flag case failed. Added the exact standalone-line fallback while preserving the protected no-cache route and unrelated-error propagation.

[user]
Compress the production delta to net +20 or less without changing semantics.

[assistant]
Compressed and verified the production delta at +21/-2, net +19. Final focused tests pass 46/46; changed-surface checks, test audit, deslop, privacy scan, and P1 autoreview are clean.

[tool summary]
Repository reads, two scoped file edits, focused tests/checks, one commit, and one branch push. Raw command output omitted.

@vincentkoc vincentkoc self-assigned this Sep 3, 2026
@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.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 3, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 3, 2026 05:10
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 3, 2026, 1:29 AM ET / 05:29 UTC.

ClawSweeper review

What this changes

The PR retries an FRV GitHub Actions job-log read without --allow-escape-sequences only when an older GitHub CLI rejects that flag, with focused process-boundary coverage.

Regression provenance

Possible regression — probable (reviewed change; failure trace; known regression link). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this member-authored, maintainer-labeled PR open for release-tooling owner approval. The introduced fallback is narrowly scoped, preserves protected reads and unrelated errors, and has no concrete correctness or security defect in review; the remaining decision is the intended support range for legacy gh clients.

Priority: P2
Reviewed head: 24db7f902f0fc49fa2a3acdeee4e5892df8875f0
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-covered compatibility repair with one maintainer-owned support-policy decision remaining.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored maintainer-tooling PR is exempt from the external-contributor proof gate; the supplied process-boundary test evidence remains supplemental.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored maintainer-tooling PR is exempt from the external-contributor proof gate; the supplied process-boundary test evidence remains supplemental.
Evidence reviewed 6 items Narrow fallback owner: The introduced job-log reader first uses the flagged protected read, retries only after the exact normalized unknown-flag line, and rethrows every other error.
Caller and side-effect boundary: Both production call sites await job-log evidence during validation; rerun mutations occur later in the continuation flow, so a legacy flag rejection remains pre-mutation.
Process-boundary coverage: The tests require the original flagged no-cache invocation, the one unflagged retry for the legacy error, and no retry for unrelated errors.
Findings None None.
Security None None.

How this fits together

Full Release Verification reads GitHub Actions job logs before it can validate and rerun failed release jobs. This changes only the local GitHub CLI read used during that preflight, leaving later rerun mutations unchanged.

flowchart LR
  A[FRV recovery command] --> B[Job-log preflight]
  B --> C[Protected GitHub CLI read]
  C --> D{Legacy flag rejected?}
  D -->|yes| E[Retry read without flag]
  D -->|no| F[Propagate error]
  E --> G[Validated job-log evidence]
  C --> G
  G --> H[Rerun decision]
Loading

Decision needed

Question Recommendation
Should FRV continue supporting maintainer environments with gh versions older than 2.97? Retain legacy support: Accept the exact one-time fallback while older maintainer gh installations remain supported.

Why: The fallback is technically narrow, but its retirement condition is an operational support-policy decision rather than a code-only conclusion.

Before merge

  • Resolve merge risk (P1) - This adds an intentional compatibility path for pre-2.97 gh; the exact historical version boundary is supported by the PR’s recorded evidence but could not be independently rechecked from upstream tags in this environment.
  • Complete next step (P2) - A release-tooling owner must confirm that FRV should retain support for gh versions older than 2.97 before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Tests +31, Other +19. Total +50 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 35 4 +31
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 21 2 +19
Total 2 56 6 +50

Review metrics

Metric Value Why it matters
Production versus test delta production +19 net; tests/test support +31 net The added production code is limited to the compatibility branch, with process-boundary coverage for retry ordering and error propagation.

Merge-risk options

Maintainer options:

  1. Retain the compatibility path (recommended)
    Approve the exact error-gated retry while release maintainers support gh versions older than 2.97.
  2. Adopt a minimum CLI version
    Document and enforce gh >=2.97 for release operators, then remove the fallback rather than carrying it indefinitely.

Technical review

Best possible solution:

Retain the local exact-error fallback if the release-tooling owner confirms legacy gh support remains intended; do not couple FRV to the sibling release-summary executable merely to share this small policy.

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

Yes—source establishes that the previous unconditional flagged job-log read aborts before FRV rerun mutations when a legacy CLI rejects the argument; the supplied test harness exercises that exact command ordering.

Is this the best way to solve the issue?

Yes, contingent on the support-policy decision. The fallback is constrained to the known pre-dispatch CLI rejection and matches the existing release-summary handling pattern without altering unrelated failures.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded recovery fix for maintainer release tooling, with no runtime product-path change.
  • merge-risk: 🚨 compatibility: The PR deliberately changes behavior for established maintainer installations using older GitHub CLI versions.
  • 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 member-authored maintainer-tooling PR is exempt from the external-contributor proof gate; the supplied process-boundary test evidence remains supplemental.

Evidence

What I checked:

  • Narrow fallback owner: The introduced job-log reader first uses the flagged protected read, retries only after the exact normalized unknown-flag line, and rethrows every other error. (scripts/frv.mjs:537, 24db7f902f0f)
  • Caller and side-effect boundary: Both production call sites await job-log evidence during validation; rerun mutations occur later in the continuation flow, so a legacy flag rejection remains pre-mutation. (scripts/frv.mjs:343, 24db7f902f0f)
  • Process-boundary coverage: The tests require the original flagged no-cache invocation, the one unflagged retry for the legacy error, and no retry for unrelated errors. (test/scripts/frv.test.ts:1179, 24db7f902f0f)
  • Merged regression provenance: The related merged release-tooling change introduced the unconditional job-log flag; this PR is a focused compatibility repair for that behavior. (05b9d34efe81)
  • Current CLI contract: The locally installed official GitHub CLI v2.98.0 documents gh api --allow-escape-sequences; the PR's claimed v2.96/v2.97 transition could not be independently fetched in this disconnected review environment.
  • Current-main limitation: The supplied fetched-main revision could not be read because this blobless checkout attempted a promisor fetch and DNS could not resolve GitHub; this review makes no claim that later main supersedes the open PR. (a426ebae2169)

Likely related people:

  • steipete: 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.

  • Confirm the intended minimum supported gh version for FRV operators.

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 (1 earlier review cycle)
  • reviewed 2026-09-03T05:18:20.014Z sha 24db7f9 :: blocked before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

The requested upstream boundary proof is now recorded in the PR body for exact head 24db7f902f0fc49fa2a3acdeee4e5892df8875f0.

  • Official, checksum-verified gh 2.96.0 rejects the actual gh api command with the exact standalone unknown-flag line.
  • Official, checksum-verified gh 2.97.0 accepts the flag and proceeds to authentication.
  • Direct cli/cli v2.97.0 source inspection confirms the API flag and guarded raw-body behavior.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 3, 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.

@vincentkoc

Copy link
Copy Markdown
Member Author

Release-tooling owner decision for exact head 24db7f902f0fc49fa2a3acdeee4e5892df8875f0:

  • Accept support for pre-2.97 gh clients at this job-log read boundary.
  • The compatibility path is limited to the exact standalone unknown flag: --allow-escape-sequences rejection, retries exactly once without that flag, preserves the protected fresh-read headers, and propagates every unrelated or subsequent error.
  • Direct binary verification confirmed gh api rejects the flag on v2.96.0 and accepts it on v2.97.0; the v2.97.0 upstream source adds the option, flag registration, and guarded raw-output behavior.
  • Retain this fallback until every FRV execution environment has an enforced preflight minimum of gh >= 2.97; that enforcement is the removal trigger.

This resolves the current ClawSweeper support-policy decision. No broader transient transport fallback or retry policy is accepted here.

@vincentkoc
vincentkoc merged commit 8a71861 into main Sep 3, 2026
221 checks passed
@vincentkoc
vincentkoc deleted the fix/frv-legacy-gh-log-read branch September 3, 2026 11:16
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 3, 2026
* commit '13b1f71c7010baaf2394555198e2fc04bef03586': (283 commits)
  fix(ui): retire stale MCP feedback across context changes (#128490)
  fix(agents): clarify set-identity workspace output (#126320)
  fix(auth): preserve OAuth metadata during session SDK refresh (#127988)
  fix(agents): recover catalog worker after generation mismatch (#127712)
  fix(memory-wiki): reject out-of-range claim confidence (#125656)
  ci: remove redundant contract runs and costly test work (#137220)
  fix(release): assert the Codex CLI pin the candidate declares (#137136)
  test(voice-call): reuse shared guards and deferred gates (#137262)
  fix(cron): isolate scheduler-disabled shared-store writes (#131733)
  fix(telegram): surface allowed custom reactions in react guidance (#129817)
  test(infra): reuse the shared npm call presence guard (#137254)
  fix: generated images disappear after failed tool calls (#131226)
  fix(docs): match source anchor checks to published sections (#137157)
  fix(backup): preserve audit capture across slow snapshots (#130962)
  fix(release): preserve legacy gh log reads (#137016)
  fix(memory-core): make forget rewrites atomic (#131383)
  fix(agents): write settings atomically (#131431)
  fix(plugins): keep the memory indexing runtime with the selected slot owner (#131779)
  fix(ci): pin iOS screenshot evidence to workflow revision (#136334)
  test(logging): remove redundant stderr spy casts (#137238)
  ...

# Conflicts:
#	scripts/e2e/lib/codex-release-package-assertions.mjs
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
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. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S 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