Skip to content

fix(ci): repair red merge-ref gates (dead CLI wrapper, oversized test file) - #123794

Merged
steipete merged 2 commits into
mainfrom
codex/autoqa-remove-dead-resolver
Aug 14, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/autoqa-remove-dead-resolver

Conversation

@steipete

@steipete steipete commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

check-prod-types is red on every PR's merge-ref CI: src/cli/skills-cli.ts(224,10): error TS6133: 'resolveClawHubTargetWorkspaceDir' is declared but its value is never read. #116489 (feat(security): require acknowledgement for policy warnings) migrated the two remaining callers to resolveClawHubTargetWorkspace but left the one-line wrapper behind.

Why This Change Was Made

Red main gate blocks all open PRs (observed on #123742, #123769). Smallest correct fix per repo doctrine: delete the dead wrapper.

User Impact

None (dead code removal); unblocks merge-ref CI.

Evidence

pnpm tsgo clean post-removal (was failing with TS6133 pre-removal on this exact file); oxlint clean. Production LOC delta: −7.

Update

Second main-gate breakage folded in (same class, found while this PR was in flight): check-lint-core-2 red on every merge-ref run because src/gateway/server-maintenance.test.ts crossed the 1000-counted-line test cap (1007) when #123642 added payload-retention coverage. The dedupe TTL/overflow block moves to server-maintenance.dedupe.test.ts (module mocks are hoisted per file, so the mock preamble is repeated; fixtures stay local). Test parity 41 = 41; both suites green; oxlint clean on both files.

@steipete
steipete marked this pull request as ready for review August 14, 2026 18:32
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 2:55 PM ET / 18:55 UTC.

ClawSweeper review

What this changes

The PR deletes an unused skills-CLI workspace-directory wrapper and moves six gateway deduplication-maintenance tests into a focused sibling suite to repair merge-ref typecheck and max-lines gates.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. Current main still contains the unreferenced CLI wrapper and the dedupe tests in a file governed by the 1,000 counted-line rule; this PR removes and relocates those exact lines without changing gateway runtime behavior. No blocking patch defect was found; exact-head gates are still running.

Priority: P3
Reviewed head: 8d8e181bb99ddafee426a8da47378de18a433d93

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused deletion and coverage-preserving test split are sound on source review, pending the normal exact-head CI gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is behavior-neutral CI and test maintenance; the relevant proof is exact-head typecheck and lint completion rather than an external-contributor runtime demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is behavior-neutral CI and test maintenance; the relevant proof is exact-head typecheck and lint completion rather than an external-contributor runtime demonstration.
Evidence reviewed 6 items Unused-wrapper source proof: Current main declares the private workspace-directory projection at line 224, while the only resolver call sites use the canonical workspace-returning helper; core typechecking enables noUnusedLocals for src files.
Max-lines contract: Gateway test files are subject to a 1,000 counted-line maximum, and the repository’s ratchet explicitly requires splitting files rather than adding suppressions.
Test relocation preserves coverage: The proposed suite contains the six removed dedupe TTL/overflow tests; test totals remain 41 before and 35 plus 6 after, with the same maintenance-timer owner exercised.
Findings None None.
Security None None.

How this fits together

The skills CLI resolves target workspaces for ClawHub operations, while gateway maintenance periodically retains or expires deduplication records for active and queued work. Merge-ref CI typechecks the CLI and enforces source-size rules on the gateway test suites.

flowchart LR
  A[Skills command] --> B[Workspace resolver]
  B --> C[ClawHub CLI action]
  D[Gateway startup] --> E[Maintenance timer]
  E --> F[Dedupe retention]
  F --> G[Focused maintenance tests]
  C --> H[Merge-ref CI]
  G --> H
Loading

Before merge

  • Resolve merge risk (P0) - Exact-head check-prod-types and check-lint-core-2 were still in progress, so merge should remain gated on their completion. Full local git-history provenance was unavailable because the partial clone could not fetch promisor objects during the network outage.
  • Complete next step (P2) - No repair lane is needed; await the exact-head CI gates and use the normal maintainer merge path.
Agent review details

Security

None.

PR surface

Source -7, Tests +107. Total +100 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 0 7 -7
Tests 2 280 173 +107
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 280 180 +100

Review metrics

Metric Value Why it matters
Production vs test LOC production -7; tests net +107 The runtime change is a dead-wrapper deletion; the test increase is the repeated file-local mock/setup needed to preserve six existing maintenance regressions after the required suite split.

Stored data model

Persistent data-model change detected: persistent cache schema: src/gateway/server-maintenance.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain one canonical CLI resolver, keep the six dedupe regressions in their focused suite, and merge once the exact-head CI gates confirm both repair claims.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain one canonical CLI resolver, keep the six dedupe regressions in their focused suite, and merge once the exact-head CI gates confirm both repair claims.

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

Yes, source reproducible: the private wrapper has no callers while core compilation enables noUnusedLocals, and the applicable test-file rule caps counted lines at 1,000. This read-only review did not run the exact gates locally.

Is this the best way to solve the issue?

Yes. Deleting the unused projection preserves the three canonical resolver call sites, and moving the six unchanged dedupe tests to a focused sibling suite satisfies the repository’s required split-over-suppression policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a focused CI and test-organization repair with no intended user-visible runtime behavior change.
  • 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-authored PR is behavior-neutral CI and test maintenance; the relevant proof is exact-head typecheck and lint completion rather than an external-contributor runtime demonstration.

Evidence

What I checked:

  • Unused-wrapper source proof: Current main declares the private workspace-directory projection at line 224, while the only resolver call sites use the canonical workspace-returning helper; core typechecking enables noUnusedLocals for src files. (src/cli/skills-cli.ts:224, c6b339460284)
  • Max-lines contract: Gateway test files are subject to a 1,000 counted-line maximum, and the repository’s ratchet explicitly requires splitting files rather than adding suppressions. (.oxlintrc.json:342, c6b339460284)
  • Test relocation preserves coverage: The proposed suite contains the six removed dedupe TTL/overflow tests; test totals remain 41 before and 35 plus 6 after, with the same maintenance-timer owner exercised. (src/gateway/server-maintenance.dedupe.test.ts:101, 8d8e181bb99d)
  • Runtime owner and caller: Gateway startup lazily starts the maintenance timer, whose dedupe loop owns active-run retention, TTL expiry, and overflow eviction; the PR does not change this production logic. (src/gateway/server-maintenance.ts:238, c6b339460284)
  • Merged-work context: Provided PR metadata identifies merged PR feat(security): require acknowledgement for install policy warnings #116489 as the CLI resolver migration context and merged PR fix(delivery): keep failed queue rows payload-free #123642 as the source of the later dedupe-maintenance coverage. (bf40269cb792)
  • History-inspection limitation: The checkout could read current source and the PR objects, but git blame/log attempted to fetch missing promisor objects and failed because GitHub DNS was unavailable; ownership routing therefore uses supplied merged-PR metadata.

Likely related people:

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-08-14T18:41:57.531Z sha 0955b5fb1bb588bf3c990faf5701f0d7ff233fac :: needs maintainer review before merge. :: none

#116489 migrated its last callers to resolveClawHubTargetWorkspace but left
the wrapper, failing check-prod-types (TS6133) on every merge-ref CI run.
server-maintenance.test.ts crossed the 1000-counted-line test cap when
#123642 added payload-retention coverage, failing check-lint-core-2 on
every merge-ref CI run. Move the dedupe TTL/overflow block into a themed
sibling; module mocks are hoisted per file so the mock preamble is
repeated while fixtures stay local. Test parity 41 = 41.
@steipete
steipete force-pushed the codex/autoqa-remove-dead-resolver branch from 0955b5f to 8d8e181 Compare August 14, 2026 18:49
@steipete steipete changed the title chore(cli): drop unused resolveClawHubTargetWorkspaceDir fix(ci): repair red merge-ref gates (dead CLI wrapper, oversized test file) Aug 14, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M and removed size: XS labels Aug 14, 2026
@steipete
steipete merged commit 3289e08 into main Aug 14, 2026
181 of 183 checks passed
@steipete
steipete deleted the codex/autoqa-remove-dead-resolver branch August 14, 2026 19:01
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

1 similar comment
@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 15, 2026
… file) (openclaw#123794)

* chore(cli): drop unused resolveClawHubTargetWorkspaceDir

openclaw#116489 migrated its last callers to resolveClawHubTargetWorkspace but left
the wrapper, failing check-prod-types (TS6133) on every merge-ref CI run.

* test: split dedupe maintenance suite below the max-lines cap

server-maintenance.test.ts crossed the 1000-counted-line test cap when
openclaw#123642 added payload-retention coverage, failing check-lint-core-2 on
every merge-ref CI run. Move the dedupe TTL/overflow block into a themed
sibling; module mocks are hoisted per file so the mock preamble is
repeated while fixtures stay local. Test parity 41 = 41.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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