Repository navigation
fix(ci): keep chat attachment controls within lint limit - #160159
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed September 28, 2026, 1:36 AM ET / 05:36 UTC. ClawSweeper reviewWhat this changesMoves clipboard image data-URL decoding into the existing image helper so chat attachment controls fall below the UI lint line limit. Merge readiness⛔ Needs changes before merge - 1 item remains Keep open. Current main still exceeds the configured lint limit, and review found no functional or security defect in this focused repair. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI attachment controls accept pasted images for chat and related composers, then pass admitted files into the attachment payload flow. Core lint checks the controls module against a 700-line limit. flowchart LR
A[Clipboard image paste] --> B[Attachment controls]
B --> C[Image decoder helper]
C --> D[File admission]
D --> E[Composer attachment]
F[Core lint rule] --> G[Source line check]
B --> G
G --> H[CI result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0. Total 0 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the focused module split through the repository’s native PR workflow so core lint passes while attachment behavior remains unchanged. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source counts 716 nonblank, noncomment lines against the 700-line rule; I did not run lint in this read-only checkout. Is this the best way to solve the issue? Yes. Moving the unchanged decoder into an image module the controls already import is a narrow repair that preserves the existing call paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against be535fd24bee. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
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.
Reuse the existing typing interval resolver for recovery-owned activity, preserving the documented six-second default and configured cadence. Cover default and nondefault scheduling through the existing lifecycle test. Include the exact already-landed upstream lint repair from 2e95cdb (openclaw#160159), by Peter Steinberger, so the older branch can pass its full preparation gate without a fork-wide merge or lint suppression. Both UI files match the canonical blobs; existing attachment behavior is unchanged. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: VACInc <[email protected]>
* fix(agents): show activity while yielded parents resume * fix(agents): honor resumed typing cadence Reuse the existing typing interval resolver for recovery-owned activity, preserving the documented six-second default and configured cadence. Cover default and nondefault scheduling through the existing lifecycle test. Include the exact already-landed upstream lint repair from 2e95cdb (#160159), by Peter Steinberger, so the older branch can pass its full preparation gate without a fork-wide merge or lint suppression. Both UI files match the canonical blobs; existing attachment behavior is unchanged. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: VACInc <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…0159) 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.
) * fix(agents): show activity while yielded parents resume * fix(agents): honor resumed typing cadence Reuse the existing typing interval resolver for recovery-owned activity, preserving the documented six-second default and configured cadence. Cover default and nondefault scheduling through the existing lifecycle test. Include the exact already-landed upstream lint repair from 87b7350 (openclaw#160159), by Peter Steinberger, so the older branch can pass its full preparation gate without a fork-wide merge or lint suppression. Both UI files match the canonical blobs; existing attachment behavior is unchanged. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: VACInc <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
#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
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
* fix(cli): release plugin resources when help finishes Uncached CLI metadata loads now use the existing inspection acquisition when an executable invocation owns them. The source-plugin regression verifies that invocation release joins module disposal. Caller-owned programs retain their existing lifetime. * fix(plugins): release retired registry preparation scope Create the aggregate retirement observer outside the registry preparation scope so it retains only child waiters. Preserve per-observation options, cleanup ordering, failure identity, and deferred consumer results. The unchanged cold registry-retention regression failed on the CI Bun runtime before this change and passes after it. The original seven-file shard passes all 172 cases, and Node retirement coverage passes 20 cases. * fix(ci): carry the chat attachment lint repair Carry the exact two-file fix from 2e95cdb (#160159). Move the unchanged image decoder into its existing helper to restore the 700-line limit without changing attachment behavior. Targeted lint and all 21 attachment tests pass on this candidate. Independent review found no actionable defects. * test: retain complete lifecycle helpers in lease fixtures * test: isolate local command fixtures and join recovery cleanup * test(ci): preserve CLI runtime ownership and harness staging Keep the moved CLI command fixture in its runtime prerequisite group and preserve complete agent coverage across the core and CLI process owners. Carry the test-only trusted-harness fixture fix from #160024. Co-authored-by: Vincent Koc <[email protected]> * fix(tests): scope Vitest preload to test workers Apply the jsdom adapter only at Vitest worker entry points while preserving package-local runtime resolution. Ordinary Workers may inherit the preload without having a Vitest dependency. Exercise default native inheritance and await worker termination. Copy the static-check evidence helper into lint fixtures so the real oxlint entry point can load its current import closure. Validation: reproduced both original failure causes before repair; all 76 affected tests pass (351.44 seconds in Vitest), as do canonical changed-file checks and independent review. * test: isolate public runtime surface planning fixtures Verify public runtime entries and packaged assets with a synthetic publishable plugin after the Diffs forwarding APIs were retired. Preserve the existing planner assertions without depending on one bundled plugin layout. * fix(ci): carry shared lint repairs into CLI preparation * test(tooling): repair extracted PR and npm fixtures * test: retain gateway cleanup and isolate Windows temp paths Close the prewarm gateway when client connection fails and retain cleanup errors during orphaned recovery. Keep Windows-under-Bun coverage on host-owned temporary directories, matching the fixture fix in #160985. Validation: 13 focused fixture tests and canonical changed-file checks. * fix(ci): keep extracted manifest within script contracts Resolve inherited manifest lint errors without changing job selection. Move its closed true/1 flag parsing to the dependency-free argument owner and include that helper in trusted fixture copies. Validation passed 718 tests with eight existing skips, canonical changed checks, fixture lint, and independent review. The 74-case argument helper file took 1.79 seconds at one worker with warm inputs. * test(state): apply upstream snapshot custody fixture isolation Reuse the fixture repair from #161598 (af16b80). Keep the real exit callback and every custody assertion while isolating the synthetic cleanup owner from preceding files. * test(pr): drain fake GitHub streams before exit --------- Co-authored-by: Vincent Koc <[email protected]>
* fix(cli): release plugin resources when help finishes Uncached CLI metadata loads now use the existing inspection acquisition when an executable invocation owns them. The source-plugin regression verifies that invocation release joins module disposal. Caller-owned programs retain their existing lifetime. * fix(plugins): release retired registry preparation scope Create the aggregate retirement observer outside the registry preparation scope so it retains only child waiters. Preserve per-observation options, cleanup ordering, failure identity, and deferred consumer results. The unchanged cold registry-retention regression failed on the CI Bun runtime before this change and passes after it. The original seven-file shard passes all 172 cases, and Node retirement coverage passes 20 cases. * fix(ci): carry the chat attachment lint repair Carry the exact two-file fix from 87b7350 (openclaw#160159). Move the unchanged image decoder into its existing helper to restore the 700-line limit without changing attachment behavior. Targeted lint and all 21 attachment tests pass on this candidate. Independent review found no actionable defects. * test: retain complete lifecycle helpers in lease fixtures * test: isolate local command fixtures and join recovery cleanup * test(ci): preserve CLI runtime ownership and harness staging Keep the moved CLI command fixture in its runtime prerequisite group and preserve complete agent coverage across the core and CLI process owners. Carry the test-only trusted-harness fixture fix from openclaw#160024. Co-authored-by: Vincent Koc <[email protected]> * fix(tests): scope Vitest preload to test workers Apply the jsdom adapter only at Vitest worker entry points while preserving package-local runtime resolution. Ordinary Workers may inherit the preload without having a Vitest dependency. Exercise default native inheritance and await worker termination. Copy the static-check evidence helper into lint fixtures so the real oxlint entry point can load its current import closure. Validation: reproduced both original failure causes before repair; all 76 affected tests pass (351.44 seconds in Vitest), as do canonical changed-file checks and independent review. * test: isolate public runtime surface planning fixtures Verify public runtime entries and packaged assets with a synthetic publishable plugin after the Diffs forwarding APIs were retired. Preserve the existing planner assertions without depending on one bundled plugin layout. * fix(ci): carry shared lint repairs into CLI preparation * test(tooling): repair extracted PR and npm fixtures * test: retain gateway cleanup and isolate Windows temp paths Close the prewarm gateway when client connection fails and retain cleanup errors during orphaned recovery. Keep Windows-under-Bun coverage on host-owned temporary directories, matching the fixture fix in openclaw#160985. Validation: 13 focused fixture tests and canonical changed-file checks. * fix(ci): keep extracted manifest within script contracts Resolve inherited manifest lint errors without changing job selection. Move its closed true/1 flag parsing to the dependency-free argument owner and include that helper in trusted fixture copies. Validation passed 718 tests with eight existing skips, canonical changed checks, fixture lint, and independent review. The 74-case argument helper file took 1.79 seconds at one worker with warm inputs. * test(state): apply upstream snapshot custody fixture isolation Reuse the fixture repair from openclaw#161598 (0cadcec). Keep the real exit callback and every custody assertion while isolating the synthetic cleanup owner from preceding files. * test(pr): drain fake GitHub streams before exit --------- Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Full core lint fails on main because
chat-attachments.tshas 716 counted lines against the 700-line limit.User Impact
No attachment or visual behavior changes. This restores the existing lint gate without an exception or baseline increase.
Why This Change Was Made
Move the unchanged image data-URL decoder into the existing image helper module, which the attachment controls already import. The two existing callers consume that export. No templates, styles, configuration, dependencies, tests, or lint policy change.
Evidence
check-changedon the commands CI merge. Both affected source files were byte-identical on fresh main317f4755b84before applying this repair.tbx_01m3jzxt3evb7j4511jf2zrgmk: the exact two-file patch passed all five core lint stripes (341s), targetedcheck-changedincluding affected types and UI checks (448s), andpnpm ui:build(8s).This is a CI-only main-breakage repair. Per the maintainer's explicit instruction, submit an exact-head squash merge after completed Testbox proof without waiting for another hosted CI cycle. The commands and Gateway PRs remain unmerged.