Repository navigation
feat(config): allow supported asset and risk profile overrides - #2045
Open
woahwhattheheck wants to merge 4 commits into
Open
woahwhattheheck wants to merge 4 commits into
woahwhattheheck wants to merge 4 commits into
Conversation
Commit a43dd17 (Commitlabs-Org#1986) replaced this file with a base64-encoded blob that is not parseable TypeScript, contains a stray invalid character at offset 8679, is truncated at the _cachedEnv declaration (dropping getValidatedEnv, _resetEnvCache and the production fail-fast check used by src/lib/backend/config.ts), and carries identifier typos (10x zZ.*, 2x PASSTHRASE, plus a dropped space in the URL message). This restores the exact pre-change source (blob 53aaa7a), undoing that corruption with no other semantic change.
Closes Commitlabs-Org#1939. Adds COMMITLABS_SUPPORTED_CONFIG_JSON as a server-side JSON override for supported assets and risk profiles. Missing fields retain the existing defaults, invalid entry shapes fail with a targeted configuration error, and parameter bounds remain unchanged. The environment example documents the JSON shape and the env schema recognizes the new variable. Focused coverage verifies the default path and a deployment override.
Rewrite env.ts, .env.example and the focused test with LF line endings to satisfy the repository prettier format check.
|
@woahwhattheheck is attempting to deploy a commit to the 1nonly's projects Team on Vercel. A member of the Team first needs to authorize it. |
The restored env schema omits COMMITLABS_FEATURE_ANALYTICS_PROTOCOL and COMMITLABS_FEATURE_MARKETPLACE_MOCK_DATA even though getFeatureFlags reads both. Its inferred type lacks the fields and z.object strips them during parsing, preventing individual env settings from reaching existing analytics/marketplace consumers. Declare both as optional strings, matching the other feature toggles. Preserve JSON precedence, analyticsProtocol=false and marketplaceMockData=true defaults, all auth/production validation, and the supported-config override. Only two lines in src/lib/backend/env.ts change; PR2044's independent restoration branch is untouched. Static source inspection of config, schema and actual analytics/marketplace consumers; Zod object behavior confirmed against official API documentation. No tests, fixtures, typecheck, build, runtime, deployment or Vercel authorization was performed. The repository's native acceptance remains pending; no broader clean-build claim.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1939.
Adds
COMMITLABS_SUPPORTED_CONFIG_JSONas a server-side JSON override for supported assets and risk profiles. Missing fields retain the existing defaults, invalid entry shapes fail with a targeted configuration error, and parameter bounds remain unchanged. The environment example documents the JSON shape.Focused coverage verifies the default path and a deployment override. No unrelated config or test expansion is included.
Note:
src/lib/backend/env.tson currentmasteris corrupted (identifier substitutions and a truncated tail), which blocks compilation independent of this change; the one-line schema addition here is stacked on top of the dedicated repair in #2044, so the env.ts portion of this diff reduces to the single new field once that repair lands.