Skip to content

fix: stop line-limit checks from blocking release branches - #192806

Merged
RomneyDa merged 17 commits into
mainfrom
openclaw/release-line-limit-exemption
Nov 5, 2026
Merged

RomneyDa merged 17 commits into
mainfrom
openclaw/release-line-limit-exemption

Conversation

@tideclaw-bot

@tideclaw-bot tideclaw-bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes release backports blocked by source/function line limits, max-lines baseline drift, and total test-line budget. Requested by @RomneyDa for release branches generally, not only local release checks.

User Impact

Release and extended-stable branches can take backports without size-only refactors or baseline/allocation updates. Exemption covers local checks, PRs targeting these branches, and dispatched release CI. Main-branch policy, correctness, blanket lint-disable guards, non-size budgets, and explicit pruning remain unchanged.

Why This Change Was Made

One shared resolver uses the canonical release-branch parser. Oxlint and SwiftLint wrappers suppress only size diagnostics; source-line, max-lines suppression, and total test-line ratchets consume the same release decision. No persistent configuration or blanket lint switch. Both prepush files remain unchanged.

Evidence

  • Original code: 141 tests in 11 focused suites passed; six key regressions independently rerun. Five enforcement regressions failed before the fix and pass afterward. Three targeted TypeScript projects, scoped lint, formatting and diff checks passed.
  • Release regression fixture isolation: reproduced the original hosted failure under GitHub's main-target environment, then all 11 test-line ratchet tests passed under those same variables after isolating host context. The originally failing hosted compact-small-5 check now passes.
  • Focused release regressions: 57/58 passed initially; the remaining oxlint fixture could not download Bun under its isolated HOME. With the existing pinned Bun executable all 10 oxlint tests passed. Targeted tooling TypeScript, six-file lint, mock-export ratchet and diff checks pass.
  • Resolved real main conflicts and inherited UI fixture failures. Prior published head 9ddc5b4 completed CI with 65 success, 36 skipped and one neutral. While it ran, main PR test(ui): restore main lint and UI tests #193097 landed the same three UI repairs and introduced a French-assertion conflict. Integrated main a1f9924, resolving the assertion exactly to upstream. The entire UI tree now matches that main base; no local UI repair remains.
  • Independent P0–P2 merge-resolution review found no actionable issues: no unresolved conflicts, release scripts/tests unchanged from the green prior head, entire UI tree equal to upstream, and documentation still one added sentence.
  • Removed the four-line allocation for the now-upstream Promise-executor repair. Exact release-regression allocation is 122. Current ratchet passes: 6,476,737 / 6,476,817, with 80 lines slack. No shared scalar or inherited-allocation increase attributable to this PR, and no debt exception.
  • Final published head 6781e1d matches reviewed local tree 97426acc26ef2a7706fb467f7c96195c73539877. Completed check snapshot: 59 success, 39 skipped, one neutral; zero failures or pending checks. Both CI gates pass, along with lint, types, baseline ratchets, changed tests, compact-small-5, provider scaffold, security and Control UI performance. GitHub reports MERGEABLE / CLEAN; PR remains open and non-draft.
  • The final head's UI suites are correctly skipped because its UI tree equals upstream. The preceding 9ddc5b4 head passed all three UI shards and UI E2E; after integrating the upstream version, both affected local files pass 14/14 tests. A separate local full-browser replay was blocked by missing Chromium libatk and absent WebKit; it is not claimed passing.
  • Documentation stays one added sentence. Earlier docs formatting (1,413 files), MDX checks (1,425 files) and baseline-preservation check passed; final hosted docs check passes.

Native macOS SwiftLint was not run locally; its wrapper has executable-fixture coverage. No runtime/Gateway behavior change, PR merge, or release publication.

Worked on by

tideclaw-bot and others added 2 commits November 4, 2026 13:45
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 6b50db8b-7990-4791-a9e5-525ecac0a10d
@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: M labels Nov 4, 2026
tideclaw-bot and others added 2 commits November 4, 2026 13:50
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 7c3e25e2-c1a9-4809-962c-2d17afb9d853
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR exempts release and extended-stable branches from line limits and line-count ratchets while retaining correctness checks and explicit pruning.

Example: A backport on release/2026.11.4 increases a TypeScript file beyond its 700-line cap.

  • Before: Local lint and line-count checks can require a size-only refactor or budget update.
  • After: The release branch skips those line limits while correctness checks remain active.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused policy work with meaningful fixture coverage, but a confirmed introduced CI failure prevents a clean verdict.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored tooling PR is outside the ordinary contributor proof gate; supplied validation exercises ratchet fixtures, a real Oxlint fixture, and a simulated SwiftLint executable.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Release maintainers must restructure backports or update size budgets to satisfy development-oriented line limits.
Reason: The maintainer-authored direction explicitly permits release-only exemptions while preserving main policy and correctness checks.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored PR open: the release-branch exemption has clear value, but its new test demonstrably fails in GitHub Actions because it inherits the enclosing PR’s branch context.

Priority: P2
Reviewed head: 9aaa569d2f108a62690c8f499e9df393c0094de0

Before merge

  • Isolate the release-branch test from GitHub Actions context (P2) - On this PR’s GitHub Actions run, GITHUB_ACTIONS=true and GITHUB_BASE_REF=main make releaseBranchForChecks select main instead of the temporary repository’s renamed branch. Consequently f.check() returns 1 here, exactly as the failing hosted annotation reports, and the newly added regression makes CI fail. Stub and restore the host context for this suite, following the sibling ratchet suites; ensure the explicit release override is also isolated so release-context runs cannot bypass the suite’s ordinary budget assertions.

Findings

  • [P2] Isolate the release-branch test from GitHub Actions context — test/scripts/check-test-lines-ratchet.test.ts:47-51

Tests

  • Missing end-to-end proof: Supplied evidence covers focused fixtures rather than a real release-branch lint or dispatched-release run.
Agent review details

How this fits together

Repository lint wrappers and ratchets consume local Git or GitHub event context, select release policy, and return diagnostics and check exit codes.

flowchart TD
  A[Local Git branch] --> C[Shared release resolver]
  B[GitHub event context] --> C
  C --> D[Oxlint and SwiftLint wrappers]
  C --> E[Line count ratchets]
  D --> F[Diagnostics and exit codes]
  E --> F
Loading

Technical review

Best possible solution:

Retain the shared release resolver and existing enforcement owners, and isolate the test-budget suite from its host’s release and GitHub context.

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

Source inspection establishes the strict main-branch enforcement path, and the related official-release report supplies concrete lint failures; this review executed no target code.

Is this the best way to solve the issue?

One resolver feeding the existing wrappers and ratchets is a focused implementation of the approved release policy, with no unnecessary production layer identified.

Full review comments:

  • [P2] Isolate the release-branch test from GitHub Actions context — test/scripts/check-test-lines-ratchet.test.ts:47-51
    On this PR’s GitHub Actions run, GITHUB_ACTIONS=true and GITHUB_BASE_REF=main make releaseBranchForChecks select main instead of the temporary repository’s renamed branch. Consequently f.check() returns 1 here, exactly as the failing hosted annotation reports, and the newly added regression makes CI fail. Stub and restore the host context for this suite, following the sibling ratchet suites; ensure the explicit release override is also isolated so release-context runs cannot bypass the suite’s ordinary budget assertions.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c7b7c79ef4e6.

Provenance checked

  • Lint severity and local strictness changes intended behavior with a stated reason (9ed5a04: Separate size and performance warnings from correctness failures in GitHub Actions while retaining strict local checks.)
  • Max-lines suppression and growth ratchets changes intended behavior with a stated reason (chore: enforce max-lines suppression ratchet #107315: Control new suppressions without blocking unrelated work on inherited debt; later growth checks prevent increasing over-cap files.)
  • Aggregate test-line budget changes intended behavior with a stated reason (ci: ratchet total test lines #182230: Preserve test-reduction gains while allowing non-growing changes over inherited ceilings; independent allocations were subsequently added by fix(ci): let independent test budgets merge #187164.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test test/scripts/check-test-lines-ratchet.test.ts --maxWorkers=1
  • GITHUB_ACTIONS=true GITHUB_BASE_REF=main pnpm test test/scripts/check-test-lines-ratchet.test.ts --maxWorkers=1
  • OPENCLAW_RELEASE_CONTEXT_REF=release/2026.11.4 pnpm test test/scripts/check-test-lines-ratchet.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Vincent Koc: Raw commit f996c1c adds scripts/check-test-lines-ratchet.mts:187 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f996c1c487a0; files: scripts/check-test-lines-ratchet.mts)

PR surface

Tests +122, Docs +1, Other +91. Total +214 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 7 124 2 +122
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 7 111 20 +91
Total 15 236 22 +214

Review metrics

Metric Value Why it matters
New environment override 1: OPENCLAW_RELEASE_CONTEXT_REF The new resolver accepts an explicit release-context override before automatic branch detection.

Labels

Label changes:

  • add P2: This is a scoped repository-validation improvement with a confirmed test defect, without an application runtime outage.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This is a scoped repository-validation improvement with a confirmed test defect, without an application runtime outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 4, 2026, 9:06 AM ET / 14:06 UTC.

tideclaw-bot and others added 6 commits November 4, 2026 14:13
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: b334093e-1ee3-4d15-bd92-3115c4aa1345
Integrate 02d770e, the exact base of the failed CI merge, to repair its inherited UI gates without refreshing to unrelated later main changes.

Co-authored-by: RomneyDa <[email protected]>
Remove the duplicate terminal close-session title introduced by #192092 and use the boolean copy result directly after #192046. Preserve all displayed copy and behavior; no baseline or ignore changes.

(cherry picked from commit 769180b)

Co-authored-by: RomneyDa <[email protected]>
Preserve the real confirm-dialog exports while mocking the cloud-stop confirmation. Allocate exactly the three added fixture lines; inherited test-budget debt remains unchanged.

Co-authored-by: RomneyDa <[email protected]>
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 8ac634d9-92e5-4d53-ab98-9314d3ae47bf
tideclaw-bot and others added 2 commits November 5, 2026 00:43
Resolve upstream UI conflicts using current-main implementations and remove the superseded three-line test allocation. Preserve the release size-policy exemptions and minimal documentation.

Co-authored-by: RomneyDa <[email protected]>
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: de552342-bfcd-43ce-8fa7-077930f93ce3
@openclaw-barnacle openclaw-barnacle Bot removed the app: web-ui App: web-ui label Nov 5, 2026
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 04f83cf8-9ec2-4976-89ec-9c42438ee4a0
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Nov 5, 2026
tideclaw-bot and others added 4 commits November 5, 2026 01:33
Preserve independent expected values for copy-success feedback and the French private/future-results warning. Both failures reproduced on the prior head and pass with the corrected literals.

Co-authored-by: RomneyDa <[email protected]>
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 0e2a0a2c-cfdc-4ea9-8e25-7e8d84e36a34
Resolve the locale assertion conflict to upstream, which now owns all three UI test repairs. Remove their four-line allocation credit; keep release regressions at 122 lines.

Co-authored-by: RomneyDa <[email protected]>
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: c210516c-7c29-4b20-b091-92c71b03cd6a
@openclaw-barnacle openclaw-barnacle Bot removed the app: web-ui App: web-ui label Nov 5, 2026
@RomneyDa
RomneyDa merged commit 4a43644 into main Nov 5, 2026
112 checks passed
@RomneyDa
RomneyDa deleted the openclaw/release-line-limit-exemption branch November 5, 2026 03:40
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
…192806)

* fix: stop line-limit checks from blocking release branches

Co-authored-by: RomneyDa <[email protected]>

* fix: stop line-limit checks from blocking release branches

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 6b50db8b-7990-4791-a9e5-525ecac0a10d

* docs: shorten release line-limit exemption note

Co-authored-by: RomneyDa <[email protected]>

* Publish openclaw/release-line-limit-exemption

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 7c3e25e2-c1a9-4809-962c-2d17afb9d853

* test: isolate release ratchet fixture from CI environment

Co-authored-by: RomneyDa <[email protected]>

* Publish openclaw/release-line-limit-exemption

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: b334093e-1ee3-4d15-bd92-3115c4aa1345

* fix(ui): restore static checks after copy updates

Remove the duplicate terminal close-session title introduced by openclaw#192092 and use the boolean copy result directly after openclaw#192046. Preserve all displayed copy and behavior; no baseline or ignore changes.

(cherry picked from commit 769180b)

Co-authored-by: RomneyDa <[email protected]>

* test(ui): preserve dialog exports in cloud stop fixture

Preserve the real confirm-dialog exports while mocking the cloud-stop confirmation. Allocate exactly the three added fixture lines; inherited test-budget debt remains unchanged.

Co-authored-by: RomneyDa <[email protected]>

* Publish openclaw/release-line-limit-exemption

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 8ac634d9-92e5-4d53-ab98-9314d3ae47bf

* Publish openclaw/release-line-limit-exemption

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: de552342-bfcd-43ce-8fa7-077930f93ce3

* Publish openclaw/release-line-limit-exemption

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 04f83cf8-9ec2-4976-89ec-9c42438ee4a0

* test(ui): match current localized copy in assertions

Preserve independent expected values for copy-success feedback and the French private/future-results warning. Both failures reproduced on the prior head and pass with the corrected literals.

Co-authored-by: RomneyDa <[email protected]>

* Publish openclaw/release-line-limit-exemption

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 0e2a0a2c-cfdc-4ea9-8e25-7e8d84e36a34

* Publish openclaw/release-line-limit-exemption

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: c210516c-7c29-4b20-b091-92c71b03cd6a

---------

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
steipete added a commit that referenced this pull request Nov 5, 2026
…est-line budget

check-limits.mts now imports release-context.mjs (#192806); the trusted-harness fixture copies scripts by hand. Raise the test-line scalar by the exact measured gap: +25 lines for package-root closure coverage plus 49 lines of inherited main debt.
steipete added a commit that referenced this pull request Nov 5, 2026
…#188338)

Fixtures that staged package-root launcher modules kept about ten hand-maintained copy lists, so a new sibling import (#182306, #182856) broke integration shards instead of a fast test. Fixtures now name only their entry modules, and collectPackageRootModules computes the closure. vitestWorkerRuntimeAssets moved out of vitest-worker-declarations into the new module, so the trusted PR-wrapper inventory is unchanged. A unit test checks the scanner against an acorn parse and checks that package.json files includes every sibling import of each packaged root module. The docker harness also stages release-context.mjs (#192806). The test-line ceiling is raised by the exact measured gap: +25 lines for this coverage plus 49 lines of inherited debt.
steipete added a commit that referenced this pull request Nov 5, 2026
#192806 made scripts/lib/check-limits.mts import release-context.mjs, which imports release-version.mjs. The Control UI performance and OCM changelog fixtures copy a fixed source list, so both failed to resolve the new modules. Add the two files. The packaging fixture already lists them.
tideclaw-bot added a commit that referenced this pull request Nov 5, 2026
Adopt the reviewed release-size exemption from #192806 while retaining correctness, complexity, configuration, and provenance checks. Include the main-first prepush context handoff from #193178 (dd327c7) and fixture isolation from #193195 (fa56528).

Canonical closure: 85/85 targeted tests pass with the checksum-verified pinned Bun; tooling types, focused strict lint, format, and whitespace checks pass. Initial 83/85 failure evidence retained; no native or security waiver.

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
…openclaw#188338)

Fixtures that staged package-root launcher modules kept about ten hand-maintained copy lists, so a new sibling import (openclaw#182306, openclaw#182856) broke integration shards instead of a fast test. Fixtures now name only their entry modules, and collectPackageRootModules computes the closure. vitestWorkerRuntimeAssets moved out of vitest-worker-declarations into the new module, so the trusted PR-wrapper inventory is unchanged. A unit test checks the scanner against an acorn parse and checks that package.json files includes every sibling import of each packaged root module. The docker harness also stages release-context.mjs (openclaw#192806). The test-line ceiling is raised by the exact measured gap: +25 lines for this coverage plus 49 lines of inherited debt.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
openclaw#192806 made scripts/lib/check-limits.mts import release-context.mjs, which imports release-version.mjs. The Control UI performance and OCM changelog fixtures copy a fixed source list, so both failed to resolve the new modules. Add the two files. The packaging fixture already lists them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation 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.

3 participants