Skip to content

refactor(config): simplify declarative validation phases - #5263

Merged
kwakayama merged 1 commit into
mainfrom
chore/sonar-declarative-validation-batch-48
Oct 18, 2026
Merged

kwakayama merged 1 commit into
mainfrom
chore/sonar-declarative-validation-batch-48

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Declarative hosted-config evaluation mixes AST resource accounting, environment prototype/descriptor validation, key ordering, and program admission with evaluation. Extract private synchronous validation phases while retaining captured intrinsics, indexed traversal, shared budgets, reflection order, import/default-export checks, separate validation/evaluation environments, and parser error metadata. Replace nested key/error classification expressions with explicit decisions and remove one redundant continue.

Validation:

  • Full-file local Sonar findings reduced from 52 to 41, clearing 11 findings including four HIGH complexity findings. No new local findings or suppressions.
  • Repository test runner: 34 tests with 492 steps passed across direct evaluation, workers/runner isolation, config loading, hosted compatibility, and cache cancellation. The focused 54-step suite passed before edits.
  • All 4,923 before/after comparisons matched: 2,055 environment/descriptor/reflection cases, 1,502 AST queue/budget cases, and 1,366 parsed evaluation/error cases. Includes null prototypes, symbol keys, hostile descriptors and reflection traps, cycles, node/entry limits, Unicode ordering, rejected statements/imports, and parser reason/location getter order.
  • Full typecheck, API-reference check (49 files), affected lint/format checks, anti-slop and await audits, and git diff --check passed.
  • Complete branch diff, prepared environment/fingerprint consumers, program admission/evaluation ordering, worker error mapping, hosted compatibility, and loader/cache callers reviewed.

Public APIs, cache identities, and asynchronous execution paths are unchanged. All current-commit CI workflows pass. Sonar Cloud quality gate passes with 84.6% new-code coverage, zero new open issues, and 0.0% new duplication.

@github-actions

Copy link
Copy Markdown

📦 Client bundle boundary

Entrypoint Modules Source size Server leaks
src/index.client.ts 65 360 KiB ✅ 0
src/react/components/Head.tsx 5 74 KiB ✅ 0
src/react/router/index.tsx 5 74 KiB ✅ 0
src/react/context/index.tsx 5 74 KiB ✅ 0
src/react/fonts/index.ts 6 81 KiB ✅ 0
src/react/components/ui/index.ts 111 715 KiB ✅ 0
src/react/components/ui/adapter/contract.ts 1 18 KiB ✅ 0
src/react/components/ui/icons/index.ts 3 17 KiB ✅ 0
src/chat/index.ts 301 2015 KiB ✅ 0
src/chat/ag-ui.ts 61 455 KiB ✅ 0
src/chat/protocol.ts 1 11 KiB ✅ 0
src/chat/types.ts 45 240 KiB ✅ 0
src/chat/message-prep.ts 65 506 KiB ✅ 0
src/markdown/index.ts 6 30 KiB ✅ 0
src/mdx/index.ts 2 2 KiB ✅ 0
src/agent/identity-contracts.ts 1 2 KiB ✅ 0
src/schemas/index.ts 42 214 KiB ✅ 0
src/platform/env.ts 5 53 KiB ✅ 0
src/workflow/claude-code/react/index.ts 9 88 KiB ✅ 0
src/events/index.ts 31 568 KiB ✅ 0
src/events/ag-ui/public.ts 30 561 KiB ✅ 0
src/run-events/index.ts 53 315 KiB ✅ 0

A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in scripts/lint/client-bundle-baseline.json to burn down.

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.92063% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/config/declarative-evaluator.ts 84.92% 15 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@kojiwakayama
kojiwakayama marked this pull request as ready for review October 18, 2026 00:04
@github-actions

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T00:05:53.984595Z 978fab7 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 978fab7cb7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@kwakayama
kwakayama added this pull request to the merge queue Oct 18, 2026
@sonarqubecloud

Copy link
Copy Markdown

Merged via the queue into main with commit 1eaea68 Oct 18, 2026
452 checks passed
@kwakayama
kwakayama deleted the chore/sonar-declarative-validation-batch-48 branch October 18, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants