Skip to content

fix(build): scope normalization declarations to package sources - #157174

Merged
vincentkoc merged 1 commit into
mainfrom
fix/normalization-core-declaration-scope-20260924
Sep 24, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/normalization-core-declaration-scope-20260924

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Direct builds of @openclaw/normalization-core inherited the workspace TypeScript config, so declaration generation included application, UI, plugin, and sibling-package sources. The observed direct build did not finish within its 120-second limit.

User Impact

Developers can build the package’s JavaScript and declarations using only its own sources. There are no runtime API, dependency, or build-command changes.

Why This Change Was Made

Add a package-local source boundary while inheriting the existing compiler settings. rootDir and outDir match the package’s source and output directories, and colocated tests are excluded. The change adds nine configuration lines; a config-text test would not exercise the declaration emitter, so validation uses the real build and consumer.

Evidence

  • The unchanged pnpm --filter @openclaw/normalization-core build completed in 366.537 ms, selected the package-local tsconfig.json, and produced all 25 nonempty JavaScript/type export pairs (.mjs and .d.mts).
  • A real @openclaw/gateway-client consumer resolved and imported @openclaw/normalization-core/record-coerce from this build; the record guard accepted an object and rejected an array.
  • Testbox validation run: Node 24.19.0 on Linux x64. Source 6e2e5d8b9011486362d934925acf2638c4ba6d10 contains this exact signed change (81aeccb3db80136a118d6d2f98b67d836ec25e51) plus a separate tooltip browser regression. Package sources and dependency inputs were unchanged.
  • Configuration review and git diff --check passed. Exact PR-head CI and native landing checks remain pending.

The earlier run timed out at 120.073 seconds; that is a timeout observation, not a completed baseline duration or a measured speedup factor.

Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy.
@vincentkoc vincentkoc self-assigned this Sep 24, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 5:40 AM ET / 09:40 UTC (Revision 2).

ClawSweeper review

What this changes

Adds a package-local TypeScript configuration so direct builds of OpenClaw’s shared normalization package generate JavaScript and type declarations from its own sources.

Merge readiness

✅ Ready for maintainer review

Keep open for normal merge review. Current main and the latest release lack the package-local declaration boundary, the patch follows existing package conventions, and no correctness defect was identified. The earlier draft-state blocker is resolved.

Priority: P2
Reviewed head: 81aeccb3db80136a118d6d2f98b67d836ec25e51

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused configuration follows existing package conventions and has detailed reported validation, with no identified patch defect.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The contributor proof gate does not apply to this member-authored build configuration PR. Its body reports the changed direct package build and a real Gateway-client import after the fix, but the linked workflow was cancelled and this host could not inspect its logs; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The contributor proof gate does not apply to this member-authored build configuration PR. Its body reports the changed direct package build and a real Gateway-client import after the fix, but the linked workflow was cancelled and this host could not inspect its logs; no stored-data contract changes.
Evidence reviewed 10 items Introduced change: The pinned PR delta adds only a package-local TypeScript project with src as the root and output in dist.
Current build scope: Without a local project file, the root TypeScript project includes application, UI, extension, and package sources.
Existing package build: The unchanged direct package build requests declarations for its explicit source entry points.
Findings None None.
Security None None.

How this fits together

The normalization package supplies shared parsing and coercion helpers to other OpenClaw packages. Its build turns package sources into JavaScript and type declarations consumed by packages such as Gateway client.

flowchart LR
  A[Normalization sources] --> B[Package TypeScript scope]
  B --> C[Direct package build]
  C --> D[JavaScript exports]
  C --> E[Type declarations]
  D --> F[Gateway client]
  E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Config +9. Total +9 across 1 file.

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

Review metrics

None.

Technical review

Best possible solution:

Keep the package-scoped TypeScript project under the inherited compiler policy while preserving every existing JavaScript and declaration export.

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

No independently executed current-main reproduction was possible in this read-only review. The direct package build is a clear reproduction path from source, while the reported 120.073-second timeout remains an unverified runtime observation.

Is this the best way to solve the issue?

Yes. A package-local TypeScript boundary addresses the broad declaration input without changing the build command or export contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The defect affects direct developer builds of one shared package, with limited user-facing impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The contributor proof gate does not apply to this member-authored build configuration PR. Its body reports the changed direct package build and a real Gateway-client import after the fix, but the linked workflow was cancelled and this host could not inspect its logs; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-24T09:30:45.074Z sha 81aeccb :: needs changes before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 24, 2026 09:31
@clawsweeper

clawsweeper Bot commented Sep 24, 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.

@vincentkoc
vincentkoc merged commit 02ad6b7 into main Sep 24, 2026
205 checks passed
@vincentkoc
vincentkoc deleted the fix/normalization-core-declaration-scope-20260924 branch September 24, 2026 15:40
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit 'c4333da677cbdfe1bbaf783ed01c363ff39e93b8': (100 commits)
  fix(test): stop preflight mocks leaking into shared workers (#157207)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (122 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* test(ui): cover stack-free tooltip disconnect cleanup

* fix(build): scope normalization declarations to package sources

Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy.

* Merge normalization declaration scope for tooltip proof

* commit '81aeccb3db80136a118d6d2f98b67d836ec25e51':
  fix(build): scope normalization declarations to package sources

* fix(ui): avoid retaining tooltip anchors in abort reasons

* Merge main to include native wrapper source inventory repair

* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...

Co-authored-by: Vincent Koc <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…claw#157174)

Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* test(ui): cover stack-free tooltip disconnect cleanup

* fix(build): scope normalization declarations to package sources

Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy.

* Merge normalization declaration scope for tooltip proof

* commit '81aeccb3db80136a118d6d2f98b67d836ec25e51':
  fix(build): scope normalization declarations to package sources

* fix(ui): avoid retaining tooltip anchors in abort reasons

* Merge main to include native wrapper source inventory repair

* commit 'f11e16cd65951f284264bd202b49984e21091cf5': (134 commits)
  fix(build): scope normalization declarations to package sources (openclaw#157174)
  fix: exit after validating Codex model references (openclaw#157323)
  fix(gateway): guard workspace adoption during active work (openclaw#157259)
  fix(update): rebuild stale Git runtimes when source is already current (openclaw#156996)
  fix: require a click before diagnosing failed updates (openclaw#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (openclaw#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (openclaw#157352)
  fix(skills): refresh skills after watched directories are replaced (openclaw#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (openclaw#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (openclaw#157334)
  fix(gateway): retain owned suspension status during restart (openclaw#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (openclaw#157337)
  test(daemon): use the native PowerShell probe budget (openclaw#157289)
  fix(exec): avoid gateway stalls during background task writes (openclaw#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (openclaw#157315)
  ...

Co-authored-by: Vincent Koc <[email protected]>
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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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