Skip to content

fix(framework-config): distinguish invalid environment values from missing settings - #2902

Merged
kang-heewon merged 3 commits into
trunkfrom
fix/2323-config-validation-diagnostics
Sep 24, 2026
Merged

kang-heewon merged 3 commits into
trunkfrom
fix/2323-config-validation-diagnostics

Conversation

@kang-heewon

@kang-heewon kang-heewon commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Report missing environment settings separately from supplied values that fail type, format, or enum validation.
  • Keep diagnostics tied to safe schema field names and Zod issue codes without including configured values or custom error text.
  • Update the generated ConfigValidationProblem API reference and include a patch changeset for @croco/framework-config.

Closes #2323

Validation

  • Standard profile: the missing, malformed, enum, transform, and secret-safety assertions failed against the pre-fix behavior and pass on the pushed head.
  • @croco/framework-config tests passed 75/75; package lint, typecheck, and build passed.
  • Full pnpm build passed 238/238 tasks. pnpm public-api:check, pnpm docs:api:check, and pnpm changeset-required:check passed.
  • The pre-push hook passed full tests and typechecks, 239/239 tasks each.
  • The generated-app smoke command reached its 45-minute limit on two PR heads without an assertion failure. Its limit is now 75 minutes within the existing 90-minute CI job. The final-head generated-apps and split-validation-shadow jobs passed; the manifest suite passed 59/59 and independent review passed.
  • The review finding for renamed fields in transformed input is addressed and regression-covered. Independent follow-up code review passed. The fix follows Zod 4.3.6's raw parse issues to identify which validation stage produced an error; Zod updates should rerun the regression suite.
  • Local pnpm check passed 26 gates with one not applicable; its Problem Registry gate reports missing codes in event and context packages outside this PR's diff. Final-head CI passed repository-contracts. A direct Problem Registry check on the combined tree with trunk 7d9c92b6aa841e782b620ea6a202b3bf0f847a84 passed with 794 codes and 762 discoveries; the later trunk change left the registry artifacts unchanged.

Integration

  • Head: c4e533a0589ceaaee5142f1e3862454e23910747.

  • Final pre-merge trunk tip: b8f4a48aebfcb971e1aec4cd28cc0aafb9512f1a; GitHub reported no conflict. The combined candidate tree a430d253fbea39b71d6cf68ea2ccdd902de1f701 passed verification-manifest (59/59), CI performance budget (43/43), and CI workflow (68/68) tests. All required and impact-selected CI checks passed on the final head.

  • Ordinary squash merge completed as 9cb6b878ea0a1076acfbc71e04a7baa418f01261.

Visual evidence

The generated API page was inspected at 1280×720 and 390×844. The diagnostics parameter is visible, with no page or console errors or horizontal overflow.

  • ConfigValidationProblem, 1280×720: ConfigValidationProblem API page desktop
  • ConfigValidationProblem, 390×844: ConfigValidationProblem API page mobile

Copilot AI lite review requested due to automatic review settings September 24, 2026 14:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 5ba9ad08-eeb6-4bc7-ae26-1692fb1df1cf

📥 Commits

Reviewing files that changed from the base of the PR and between 3342494 and c4e533a.

📒 Files selected for processing (7)
  • .changeset/clear-config-validation-diagnostics.md
  • packages/docs/src/content/docs/api/framework-config/src/classes/ConfigValidationProblem.md
  • packages/framework-config/src/libs/problems/ConfigProblems.ts
  • packages/framework-config/src/tests/ValidateConfig.spec.ts
  • packages/framework-config/src/validateConfig.ts
  • scripts/tests/verification-manifest.spec.ts
  • scripts/verification-manifest.mts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 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-09-24T14:35:04.353177Z 33bedd9 PR opened
ℹ️ 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33bedd9081

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/framework-config/src/validateConfig.ts Outdated
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 62.8μs 30.0ms 8.2μs +668.0% ❌ -
CrocoApp lambdaHandler (10 controllers) 2.3ms 50.0ms 258.4μs +775.4% ❌ -
Lambda cold-start simulation 2.5ms 80.0ms 418.1μs +500.9% ❌ -
Lambda cold-start with headers 1.7ms 80.0ms 369.7μs +347.0% ❌ -
Lambda cold-start with binary body 1.6ms 80.0ms 339.1μs +365.1% ❌ -
Lambda cold-start with query params 1.6ms 80.0ms 301.3μs +419.7% ❌ -
Lambda cold-start with authorizer context 1.6ms 80.0ms 299.8μs +423.5% ❌ -
Lambda cold-start realistic scenario 1.6ms 80.0ms 299.2μs +421.6% ❌ -
EventBusConfig.start (10 handlers) 1.7μs 10.0ms 1.4μs +18.8% ✅ -
EventPublisher.publishNow single event 1.8μs 2.0ms 1.7μs +7.7% ✅ -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs +0.0% ✅ -
Container.get singleton (cold) 95.8μs 5.0ms 70.3μs +36.3% ❌ -
Container.register × 50 components 3.1ms 10.0ms 3.2ms -3.1% ✅ -
Container.validate (50 components) 4.0ms 20.0ms 3.4ms +18.7% ✅ -
Container.get singleton (warm) 1.4μs 500.0μs 1.6μs -16.0% ✅ -
TelemetryRuntime.init (lambda preset) 13.1μs 200.0ms 1.1ms -98.8% ✅ -
lambdaPreset config creation 1.5μs 2.0ms 1.4μs +6.3% ✅ -

Updated: 2026-09-24T16:50:09.423Z · Commit: c4e533a

@kang-heewon
kang-heewon merged commit 9cb6b87 into trunk Sep 24, 2026
21 checks passed
@kang-heewon
kang-heewon deleted the fix/2323-config-validation-diagnostics branch September 24, 2026 17:59
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.

[framework-config] Invalid environment values are reported as missing required variables

2 participants