Skip to content

fix(ci): keep PR-exempt ownership proof within its timeout - #160408

Merged
steipete merged 1 commit into
mainfrom
fix/ci-plan-exempt-test-runtime
Sep 28, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/ci-plan-exempt-test-runtime

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the maintainer-assigned timeout in CI's complete PR-exempt ownership proof, which blocks main/release validation and PR #160306.

User Impact

CI retains complete exempt-file coverage within the existing 120-second case limit. There is no user-visible runtime change.

Why This Change Was Made

The 908-file proof already builds hourly and release plans once. Profiling found its changed-file consumer precheck sending 2,897 terms through a single Git fixed-string prefilter: that call took 198.711 seconds in an instrumented run, while hourly plan construction took 1.751 seconds. Git's prefilter now handles at most 64 terms; larger frontiers use the existing source reader's single-pass multi-term matcher and per-term cache over the same inventory.

The integration test, timeout, every exempt-file assertion, canonical ownership, and direct-edit opt-in remain unchanged. This reuses the matcher introduced in #157900 and does not touch #160254's packing hunks. Recent #160099, #160187, and #160260 edits affect a different integration case; #160376's matrix-cap behavior remains intact.

Evidence

  • Same focused command before/after: pnpm test test/scripts/ci-changed-node-test-plan.integration.test.ts -t "retains every PR-exempt file" --maxWorkers=1. Before: 181.640 s case / 194.53 s wall, timeout. After: 67.801 s case / 71.60 s wall, pass (62.7% lower case time). Reported user CPU dropped from 1,523.36 s to 57.97 s.
  • The unchanged integration case supplies the regression: it fails on the original code and passes after the owner fix. No duplicate timing test or relaxed assertion was added. The real-checkout file exceeds the usual 30-second budget because it proves all live exempt files through actual Node, plugin, and UI discovery; synthetic inventories cannot prove current repository completeness.
  • Formatting, scoped scripts oxlint, pnpm tsgo:scripts, line-cap ratchet, script erasability, and git diff --check passed. Independent Codex autoreview is clean through P2.
  • Full unchanged integration file: pnpm test test/scripts/ci-changed-node-test-plan.integration.test.ts --maxWorkers=1 — 7/7 passed, 262.29 s command wall; the exempt-file case took 66.520 s in that run. Other cases retain their existing real-checkout cost.
  • Focused native matcher/consumer-selection siblings: pnpm test test/scripts/test-projects.test.ts -t 'test selector native source facts|keeps deleted test files|keeps all changed manifests|retains mapped helper owners|keeps transitive consumers|keeps script owner consumers' --maxWorkers=1 — 12 passed, 70.64 s command wall including a cold worker compilation (44.02 s).
  • Local macOS / Node 26.9.0 evidence; GitHub CI timing is not yet available. No workflow reruns or dispatches were used for proof.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Sep 28, 2026
@steipete steipete self-assigned this Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 8:20 AM ET / 12:20 UTC.

ClawSweeper review

What this changes

The CI test selector now uses its existing source matcher for import frontiers above 64 terms, reducing the time needed to choose tests for changed files.

Merge readiness

✅ Ready for maintainer review

Keep this PR open. The fetched main still sends large term frontiers through Git’s fixed-string prefilter, while the proposed fix has focused before-and-after evidence and no actionable defect found in the introduced patch.

Priority: P2
Reviewed head: 4d320a8d6f493432a5ed4c30e3e11df91046fced

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused reuse of an established matcher has strong before-and-after real-checkout evidence and no identified correctness or security blocker.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed CI selector feeds real-checkout test planning; the PR reports the unchanged complete-ownership integration case timing out before the fix and passing in 67.801 seconds afterward on macOS/Node, with the full integration file passing. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed CI selector feeds real-checkout test planning; the PR reports the unchanged complete-ownership integration case timing out before the fix and passing in 67.801 seconds afterward on macOS/Node, with the full integration file passing. No stored-data contract changes.
Evidence reviewed 7 items Introduced selector change: The pinned merge-base-to-head patch skips Git grep above 64 uncached terms and passes the tracked inventory to the existing source reader; the verified test-merge result changes the same file.
Still needed on main: The fetched main version unconditionally invokes Git grep for every uncached term frontier, including the reported large case.
Existing matcher: The source matcher scans each source string once and returns literal matches and complete-token references; this PR reuses that implementation.
Findings None None.
Security None None.

How this fits together

OpenClaw’s CI planner turns changed files and repository source references into test assignments. This selector finds import consumers before the planner builds the CI test plan.

flowchart LR
  A[Changed files] --> B[Test selector]
  B --> C{More than 64 terms?}
  C -- No --> D[Git prefilter]
  C -- Yes --> E[Tracked source reader]
  D --> F[Import matches]
  E --> F
  F --> G[CI test plan]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +5. Total +5 across 1 file.

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

Review metrics

Metric Value Why it matters
Focused ownership case 181.640 s timeout → 67.801 s pass; 62.7% less case time The contributor’s real-checkout comparison puts the unchanged case within its 120-second limit.

Technical review

Best possible solution:

Keep the bounded Git prefilter and existing native matcher as one selector path while preserving the complete ownership assertions and 120-second case limit.

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

Yes. The unchanged real-checkout ownership case is a concrete reproduction path, and the PR records a pre-fix timeout; this read-only review did not rerun it.

Is this the best way to solve the issue?

Yes. The change stays with the existing selector and reuses its source matcher without relaxing ownership assertions or the timeout.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: The timeout obstructs CI and release validation, but the patch has no user-visible runtime effect.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed CI selector feeds real-checkout test planning; the PR reports the unchanged complete-ownership integration case timing out before the fix and passing in 67.801 seconds afterward on macOS/Node, with the full integration file passing. No stored-data contract changes.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed CI selector feeds real-checkout test planning; the PR reports the unchanged complete-ownership integration case timing out before the fix and passing in 67.801 seconds afterward on macOS/Node, with the full integration file passing. No stored-data contract changes.

Label justifications:

  • P2: The timeout obstructs CI and release validation, but the patch has no user-visible runtime effect.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed CI selector feeds real-checkout test planning; the PR reports the unchanged complete-ownership integration case timing out before the fix and passing in 67.801 seconds afterward on macOS/Node, with the full integration file passing. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed CI selector feeds real-checkout test planning; the PR reports the unchanged complete-ownership integration case timing out before the fix and passing in 67.801 seconds afterward on macOS/Node, with the full integration file passing. No stored-data contract changes.

Evidence

What I checked:

  • Introduced selector change: The pinned merge-base-to-head patch skips Git grep above 64 uncached terms and passes the tracked inventory to the existing source reader; the verified test-merge result changes the same file. (scripts/test-projects.test-support.mts:2107, 4d320a8d6f49)
  • Still needed on main: The fetched main version unconditionally invokes Git grep for every uncached term frontier, including the reported large case. (scripts/test-projects.test-support.mts:2104, 2da0e9a4c85b)
  • Existing matcher: The source matcher scans each source string once and returns literal matches and complete-token references; this PR reuses that implementation. (scripts/lib/test-source-term-matcher.mts:24, 4d320a8d6f49)
  • Matcher history: Merged commit 24827cd introduced the matcher in a new file for the earlier large-source-selection repair; its raw recorded parent lacks that file. (scripts/lib/test-source-term-matcher.mts:24, 24827cd1a9e7)
  • Ownership proof path: The unchanged integration case builds real-checkout PR, hourly, and release plans and checks ownership of every PR-exempt test file. (test/scripts/ci-changed-node-test-plan.integration.test.ts:50, 4d320a8d6f49)
  • Reported real-checkout proof: The captured PR body reports the same focused macOS/Node integration case timing out at 181.640 seconds before the change and passing at 67.801 seconds afterward; it also reports all seven integration cases passing. These measurements were reported by the contributor and were not rerun in this read-only review.

Likely related people:

  • Peter Steinberger: Raw commit 24827cd adds scripts/lib/test-source-term-matcher.mts:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 24827cd1a9e7; files: scripts/lib/test-source-term-matcher.mts)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit 8aec780 into main Sep 28, 2026
159 checks passed
@steipete
steipete deleted the fix/ci-plan-exempt-test-runtime branch September 28, 2026 12:24
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 28, 2026
Apply the canonical planner repairs from #160408, #160458, #160531, and
#160517 to the runtime cleanup branch. Preserve complete source facts,
canonical command ownership, and the existing PR-exempt test inventory.

The merged cohort passed its old-reader regression control, owner suites,
scoped changed checks, and 20 full original-group repetitions on two CPUs.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
steipete added a commit that referenced this pull request Sep 29, 2026
#158916)

* refactor(runtime): deslop tasks, daemon, node-host and tui second pass

* test(update): mock canonical systemd activation admission

Keep native-start and retained-restart fixtures on the lifecycle admission owner after consolidation. Preserve real executor revocation, native command ordering and every assertion.

* test(runtime): track relocated decoder suppression

* test(tui): synchronize terminal fixture readiness

Inspect the current completed target screen instead of cumulative terminal output. Wait for startup readiness and command publication while isolating unrelated fd discovery in the exact-argument completion fixture.

* test(tui): isolate fallback projection from vendor policy loading

Use distinct synthetic provider/model identities while retaining foreign-run and malformed-event rejection, exact footer replacement, unchanged backend calls, and clean exit. Include captured terminal output when the exit assertion fails.

* test(tui): group session mode proof with identity fixtures

Move the self-contained mode-scoping case out of the general harness to retain the line cap. Preserve every assertion, the 20-second operation budget, the 25-second test budget, and owned fixture cleanup.

* refactor(runtime): reuse projection and worker dispatch values

Inline the one-use row identity before keyed refresh and integrate the deferred plugin-migration write-options cleanup from main (ad31034, #159426). Preserve worker admission, transaction ownership, options, and refresh order. Also use the synchronized current screen for the sibling stale-display-name assertion without changing its timeout or cleanup.

* test(tui): fence reused-session fixture transitions

* refactor(ui): colocate omitted media status rendering (#159938)

* fix(tui): preserve CLI lifecycle context for terminal events

Bind input and resize callbacks at terminal startup so later stdin events retain the existing CLI resource host and scheduler. Keep ingress authority and shutdown ownership unchanged. Add a focused callback-context regression; the real built CLI reproduces the original MCP scheduler error and passes with the adapter.

* fix(ci): keep chat attachment controls within lint limit (#160159)

Move the unchanged image data-URL decoder into the existing image helper to restore the 700-line lint limit.

Validated on Blacksmith Testbox: 34 attachment tests, all core lint stripes, targeted changed checks, and the UI build. Independent review found no actionable issues.

* test(daemon): assert incompatible custody release diagnostics

Align the four retained historical custody cases with b107d4a. Release now validates the stored generation directly rather than using the mutation-authority predicate, allowing paired cancellation settlement without hiding incompatible-row diagnostics. Require the full incompatibility error while preserving service callback refusal and exact sidecar identity, bytes, and stored-row assertions. Production behavior is unchanged.

Blacksmith Testbox tbx_01m3kf15jgcthvq4f69nxn8t28: pristine main ff8c752 fails 3/3 runs with the same four failures; the fix passes 24/24 tests in each of three runs through ci-run-node-test-shard with the daemon config, agentic-command-support shard, CI=1, and two workers. Three sibling files pass 32/32 tests. The single-worker pnpm test cost is 28.05s wall including cold compiler preparation. Targeted lint, formatting, and git diff --check pass.

check-changed runs but stops at pre-existing services graph TS2459 errors: package-update-activation-journal.test.ts:7 and package-update-activation-lifetime.test.ts:11 import assertReliabilityForcedExit, made private by 9491d5a. A clean baseline checkout with independent dependencies reproduces both exact errors. No unrelated fix, local validation, autoreview, or push is included; review and publication remain with the lead.

* fix(node-host): retain container timeout diagnostics

Restore the configured deadline and safe engine operation when runExec reports a sanitized timeout. Keep arguments and executable paths out of the diagnostic, preserve the original cause, and leave deadlines, daemon pinning, and cleanup unchanged.

Reproduced the container supervisor failure on main at 8b549de. The focused file now passes all 22 cases; the full supervisor, container, and process families pass 1193 tests with 49 skips across 110 files. Core typecheck, targeted lint/format, docs syntax, and independent P2 review pass. The new four-case deterministic file takes 1.82s Vitest wall; the existing integration file takes 41.03s, with no added processes or waits.

* fix(scripts): export assertReliabilityForcedExit for package update tests

#158491 imports it from two infra tests after #159362 made it module-local,
so the core test-types infra stripe failed on main with TS2459.

* fix(ci): keep test planning within its existing budgets

Apply the canonical planner repairs from #160408, #160458, #160531, and
#160517 to the runtime cleanup branch. Preserve complete source facts,
canonical command ownership, and the existing PR-exempt test inventory.

The merged cohort passed its old-reader regression control, owner suites,
scoped changed checks, and 20 full original-group repetitions on two CPUs.

* test(daemon): retain canonical stale-lease release expectation

Preserve #160288 when integrating main: a stale stored generation is rejected
before its replacement payload is decoded, so release returns false. Keep the
callback refusal and exact sidecar and database-row preservation assertions.

* fix(ci): adopt canonical Doctor repair lint fix

Apply #160715 so the pinned runtime branch includes the canonical repair
module split. Version and cohort planning use the existing targets owner;
installation retirement and transaction ordering stay with repair.

* ci: refresh runtime checks after canonical contract repairs

Refresh the PR merge ref after main fixed the unused 1Password dependency
in 4ed0cb3 and the retired runtime API
inventory in 5b76930.

The runtime source tree remains cd5b525,
matching the reviewed and completed Testbox proof.

* ci: refresh runtime validation after main CI fixes

* ci: refresh runtime checks after duplicate route repair
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 30, 2026
openclaw#158916)

* refactor(runtime): deslop tasks, daemon, node-host and tui second pass

* test(update): mock canonical systemd activation admission

Keep native-start and retained-restart fixtures on the lifecycle admission owner after consolidation. Preserve real executor revocation, native command ordering and every assertion.

* test(runtime): track relocated decoder suppression

* test(tui): synchronize terminal fixture readiness

Inspect the current completed target screen instead of cumulative terminal output. Wait for startup readiness and command publication while isolating unrelated fd discovery in the exact-argument completion fixture.

* test(tui): isolate fallback projection from vendor policy loading

Use distinct synthetic provider/model identities while retaining foreign-run and malformed-event rejection, exact footer replacement, unchanged backend calls, and clean exit. Include captured terminal output when the exit assertion fails.

* test(tui): group session mode proof with identity fixtures

Move the self-contained mode-scoping case out of the general harness to retain the line cap. Preserve every assertion, the 20-second operation budget, the 25-second test budget, and owned fixture cleanup.

* refactor(runtime): reuse projection and worker dispatch values

Inline the one-use row identity before keyed refresh and integrate the deferred plugin-migration write-options cleanup from main (13f2174, openclaw#159426). Preserve worker admission, transaction ownership, options, and refresh order. Also use the synchronized current screen for the sibling stale-display-name assertion without changing its timeout or cleanup.

* test(tui): fence reused-session fixture transitions

* refactor(ui): colocate omitted media status rendering (openclaw#159938)

* fix(tui): preserve CLI lifecycle context for terminal events

Bind input and resize callbacks at terminal startup so later stdin events retain the existing CLI resource host and scheduler. Keep ingress authority and shutdown ownership unchanged. Add a focused callback-context regression; the real built CLI reproduces the original MCP scheduler error and passes with the adapter.

* fix(ci): keep chat attachment controls within lint limit (openclaw#160159)

Move the unchanged image data-URL decoder into the existing image helper to restore the 700-line lint limit.

Validated on Blacksmith Testbox: 34 attachment tests, all core lint stripes, targeted changed checks, and the UI build. Independent review found no actionable issues.

* test(daemon): assert incompatible custody release diagnostics

Align the four retained historical custody cases with 82ab893. Release now validates the stored generation directly rather than using the mutation-authority predicate, allowing paired cancellation settlement without hiding incompatible-row diagnostics. Require the full incompatibility error while preserving service callback refusal and exact sidecar identity, bytes, and stored-row assertions. Production behavior is unchanged.

Blacksmith Testbox tbx_01m3kf15jgcthvq4f69nxn8t28: pristine main 5f12b85 fails 3/3 runs with the same four failures; the fix passes 24/24 tests in each of three runs through ci-run-node-test-shard with the daemon config, agentic-command-support shard, CI=1, and two workers. Three sibling files pass 32/32 tests. The single-worker pnpm test cost is 28.05s wall including cold compiler preparation. Targeted lint, formatting, and git diff --check pass.

check-changed runs but stops at pre-existing services graph TS2459 errors: package-update-activation-journal.test.ts:7 and package-update-activation-lifetime.test.ts:11 import assertReliabilityForcedExit, made private by 90bddde. A clean baseline checkout with independent dependencies reproduces both exact errors. No unrelated fix, local validation, autoreview, or push is included; review and publication remain with the lead.

* fix(node-host): retain container timeout diagnostics

Restore the configured deadline and safe engine operation when runExec reports a sanitized timeout. Keep arguments and executable paths out of the diagnostic, preserve the original cause, and leave deadlines, daemon pinning, and cleanup unchanged.

Reproduced the container supervisor failure on main at 2d04b95. The focused file now passes all 22 cases; the full supervisor, container, and process families pass 1193 tests with 49 skips across 110 files. Core typecheck, targeted lint/format, docs syntax, and independent P2 review pass. The new four-case deterministic file takes 1.82s Vitest wall; the existing integration file takes 41.03s, with no added processes or waits.

* fix(scripts): export assertReliabilityForcedExit for package update tests

openclaw#158491 imports it from two infra tests after openclaw#159362 made it module-local,
so the core test-types infra stripe failed on main with TS2459.

* fix(ci): keep test planning within its existing budgets

Apply the canonical planner repairs from openclaw#160408, openclaw#160458, openclaw#160531, and
openclaw#160517 to the runtime cleanup branch. Preserve complete source facts,
canonical command ownership, and the existing PR-exempt test inventory.

The merged cohort passed its old-reader regression control, owner suites,
scoped changed checks, and 20 full original-group repetitions on two CPUs.

* test(daemon): retain canonical stale-lease release expectation

Preserve openclaw#160288 when integrating main: a stale stored generation is rejected
before its replacement payload is decoded, so release returns false. Keep the
callback refusal and exact sidecar and database-row preservation assertions.

* fix(ci): adopt canonical Doctor repair lint fix

Apply openclaw#160715 so the pinned runtime branch includes the canonical repair
module split. Version and cohort planning use the existing targets owner;
installation retirement and transaction ordering stay with repair.

* ci: refresh runtime checks after canonical contract repairs

Refresh the PR merge ref after main fixed the unused 1Password dependency
in 3b5b7e1 and the retired runtime API
inventory in 1ed57fc.

The runtime source tree remains cd5b525,
matching the reviewed and completed Testbox proof.

* ci: refresh runtime validation after main CI fixes

* ci: refresh runtime checks after duplicate route repair
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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