Skip to content

feat(config): require merged top-level defaults#1514

Open
dcoric wants to merge 2 commits intofinos:mainfrom
dcoric:feat/require-config-defaults
Open

feat(config): require merged top-level defaults#1514
dcoric wants to merge 2 commits intofinos:mainfrom
dcoric:feat/require-config-defaults

Conversation

@dcoric
Copy link
Copy Markdown
Contributor

@dcoric dcoric commented Apr 29, 2026

Summary

Fixes #1287.

This updates config loading so user override files can keep using the generated optional GitProxyConfig type, while the merged runtime configuration is narrowed to a stricter FullGitProxyConfig after defaults are applied and verified.

Changes

  • Add a FullGitProxyConfig type for the merged runtime configuration.
  • Validate that default-backed top-level config values are present after merging defaults and user overrides.
  • Keep deprecated compatibility fields optional where the default config does not set them.
  • Remove fallback values from config accessors that now read from the validated merged config.
  • Remove the duplicate session max-age fallback in service session setup.
  • Add tests covering defaulted top-level values and partial user overrides.

Validation

  • npm run check-types:server
  • npm test -- test/testConfig.test.ts
  • Commit hook ran prettier, eslint fixes, and npm run lint

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 29, 2026

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit e5f1d82
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/69f1fbff62ef090008081947

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.78%. Comparing base (6981427) to head (e5f1d82).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1514      +/-   ##
==========================================
+ Coverage   90.21%   90.78%   +0.56%     
==========================================
  Files          69       69              
  Lines        5511     5543      +32     
  Branches      944      939       -5     
==========================================
+ Hits         4972     5032      +60     
+ Misses        521      494      -27     
+ Partials       18       17       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dcoric dcoric marked this pull request as ready for review April 29, 2026 12:52
@dcoric dcoric requested a review from a team as a code owner April 29, 2026 12:52
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.

Require top-level config values while allowing to override config file

1 participant