Repository navigation
refactor(normalization): deslop string and URL helpers - #164269
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
7645e13 to
c38fb04
Compare
c38fb04 to
1394ab7
Compare
Reuse canonical string, list, ID and truncation helpers; remove parse-only URL exception scaffolding while preserving each callers validation and fallback contract. Share duration rendering and remove redundant private normalization wrappers. No user-visible configuration, persisted-data, protocol, CLI or UI output changes intended.
Reuse the relative label for both normal display and the calendar-date fallback. The regression returns in 8d instead of 8d ago when Intl rejects the timezone. Document intentional OSC 8 control delimiters for the lint rule.
1394ab7 to
41c1728
Compare
|
Exact-head CI 37171670932 tested The failing case is I reproduced the same file sequentially on clean checkouts of the exact CI main parent and exact tested merge, on AWS lease The producer is main commit The previously failing node-worker launch-wire e2e passed on this exact CI head (1/1, 122.05 seconds). The Google Meet/Copilot shard also passed. Both cycle checks, both typechecks, and all 410 focused cases passed for the pushed head on Linux. Separately, the local full-contract proof reproduced xAI's two missing TypeScript path aliases identically on candidate and pinned main. Independent main CI evidence confirms that mismatch, and #164714 owns its six-line configuration fix. It is not an additional failing job in this PR's hosted run. No assertion, timeout, authority check, or baseline was weakened in this PR. Manual review-tool qualification: the old ClawSweeper input hold is a synthetic URI comment example, not an identified live credential. A private pinned-version diagnostic with verification disabled found only that identical comment on original/current patches. No scanner policy or bot hold was cleared, and no ClawSweeper review verdict is claimed; independent autoreview is the code-review evidence. |
Consolidate duplicated string, list, ID, formatting, truncation, and syntax-only URL helpers through canonical owners while preserving Unicode, empty-value, protocol, credential, rounding, and output contracts. Keep ASCII-control detection private to bundled plugins without expanding the public SDK. Preserve future direction in the relative-time fallback when calendar formatting fails. Retain main semantics through conflict-only refreshes, dropping cleanup hunks already handled by main. Validation includes independent review, zero import cycles, core and extension typechecks, 410 focused tests, and paired candidate/main plugin contracts. The sole shared contract failure is the unchanged xAI TypeScript path-map mismatch documented in the PR. Hosted CI passed every non-aggregate job except main's stale ACPX process-fixture canonical-key assertion, reproduced identically on the exact clean main parent and tested merge. The node-worker wire e2e passed. Landed under the maintainer-authorized inherited-main exception; details and remaining fixture coverage are recorded in the PR.
Integrate main after the normalization owner landed in #164269. The remaining contribution is 22 route-level normalization cases; production matches main. Preserve the original PR ancestry and historical proof. Current-head review and hosted CI remain required before landing.
* refactor(channels): reuse conversation id normalization * chore(channels): retain route normalization coverage on current main Integrate main after the normalization owner landed in #164269. The remaining contribution is 22 route-level normalization cases; production matches main. Preserve the original PR ancestry and historical proof. Current-head review and hosted CI remain required before landing. Co-authored-by: Vincent Koc <[email protected]>
) * refactor(channels): reuse conversation id normalization * chore(channels): retain route normalization coverage on current main Integrate main after the normalization owner landed in openclaw#164269. The remaining contribution is 22 route-level normalization cases; production matches main. Preserve the original PR ancestry and historical proof. Current-head review and hosted CI remain required before landing. Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Removes repeated string, list, ID, formatting, and URL-parsing scaffolding through existing normalization owners across core, packages, plugins, and the Control UI.
User Impact
Existing normalization, Unicode, empty-value, protocol, credential, rounding, and output contracts are preserved. The relative-time formatter now retains future wording when calendar formatting fails. Bundled plugins share ASCII-control detection through the existing private-local SDK subpath; the public SDK surface is unchanged.
Simplifications
URL.parseorURL.canParse, retaining catches that also own decoding, callbacks, or network failures.The original batch removed 1,001 net production lines. After conflict-only refreshes onto current main, the remaining diff removes 995 net production lines across 198 production files. Main independently retired Telegram's runtime API-root repair and simplified TTS auto-mode parsing; both overlapping hunks were dropped. The remaining patches retain their earlier review.
Fixes Found Along the Way
When calendar formatting rejected its timezone, a timestamp eight days in the future incorrectly fell back to
8d ago. The direction-aware relative label now producesin 8d. The regression failed on the original implementation. It belongs to the existing formatter suite and adds no process fixture, real timer, retry, or worker configuration.Evidence
Current candidate:
41c1728628046eefc1e20ece6fca1b832ccbfb89, based on main1836ae2146443e952337bce1bccb41c524ea0639.Exact-head hosted CI 37171670932 completed with one inherited failing test: the ACPX process fixture still expects
shared-projectinstead of the canonicalagent:main:shared-projectnow returned by main's Doctor migration #162920. Clean checkouts of the exact tested main parent and synthetic merge reproduce the identical assertion (1 failed / 2 passed each). All other checks passed or were skipped. The node-worker launch-wire e2e passed (1/1, 122.05 seconds), as did the Meet/Copilot shard. Pinned attribution evidence records the producer, exact output, and the named-key assertions not reached by the stale fixture. No authority refusal or owner collision was observed.On AWS Linux lease
cbx_46b89728ea2f, runrun_7a36b059f9ec5f262b43d31704779755, the exact candidate commit/tree was verified before execution. Node 24.19.0 and frozen pnpm 12.5.1 were used for both head and main:The original batch also passed 4,903 focused tests, a full build, changed-file lint, SDK API comparison, and independent review. The earlier SDK budget regression was repaired by keeping ASCII-control detection on the private-local subpath, without raising budgets. Conflict refreshes preserve main's configured GitHub-host checks, extracted credential parser, private URI helper, Doctor-owned Telegram migration, and TTS schema owner. Range-diffs show only the dropped overlapping Telegram and TTS hunks after the previously reviewed resolutions.
The formatter suite's initial measured run took 18.51 seconds wall on the loaded Mac (about 1.94 seconds of test work). Remote proof supplements the required exact-head hosted CI gate.
Independently attributed main failure
Both current candidate and clean main fail
src/plugins/contracts/extension-package-project-boundaries.test.ts:300,keeps xai's boundary-specific path overrides derived from the shared package boundary map, with:The missing entries are
@openclaw/gateway-protocoland@openclaw/gateway-protocol/*. The test derives the expected xAI TypeScript path map from the shared package map; this PR changes neither JSON map nor the test. This is a type-project configuration mismatch, not a runtime authority, permission, approval, or sandbox failure. No assertion or baseline was changed in this PR.Earlier failure investigation retained
The refresh incorporates the coordinator's Copilot fixture repair
af10ddf84e6, Google Meet native-identity fixture repair71772d690c4, and knip entry repairbf4fe3ace57. Main separately fixed the Feishu expectation ina6357978b73. The grouped Meet/Copilot run now passes all 120 cases on both the Mac refresh and Linux candidate proof.On the earlier rebased head
1394ab7e0e4, local contracts twice hitPluginInstanceUnavailableErrorin the admitted-registry session-patch case. The stack reached the fulfilled completion mapper after callback assertions and lease release, with the existing five-second retirement fence active. A clean-base single-file run passed all 52 cases but failed temporary-directory teardown withENOTEMPTY; a full-base attempt aborted with exit 137. These local attempts did not establish a current-main red or a fixed flake. The current Linux comparison passes the same retirement case on both head (726 ms) and main (723 ms). No timer, assertion, or authority guard was changed, and no authority-related admin exception is claimed.The earlier node-worker wire e2e returned
Shared-state read and cleanup failed; later local attempts stalled before that assertion. Current main's prebuilt-Gateway fixture change is incorporated; the wire case passed on the exact hosted head as recorded above.Blacksmith lease
tbx_01m42450ga6emw9vc5nav6v8s7remained queued and was stopped without executing proof. Required local fallback commands ran sequentially withnice -n 15. Protected staging and recovery state were preserved.Review tooling qualification
ClawSweeper's automated review did not run because its input scanner held an existing synthetic credential-bearing URI example in a comment at
extensions/elevenlabs/shared.ts:22. A private diagnostic used the pinned TruffleHog 3.97.4 archive/checksum with external verification disabled on both the original and current patches. Each patch produced only that identical comment finding (line digestf0fe8e6ce48d44762445ed1ddf3e1571a919d5ac1525fb4916080aec10760481); no additional credential material was reported. The example uses placeholder credentials and host. Scanner policy and the bot's hold were not changed, and no automated bot review verdict is claimed. Independent autoreview remains the code-review evidence.