Skip to content

fix(varlock): name the failing keys on the invalid-config banner - #1247

Closed
b0dea wants to merge 1 commit into
dmno-dev:mainfrom
b0dea:fix-invalid-config-banner-key-names
Closed

b0dea wants to merge 1 commit into
dmno-dev:mainfrom
b0dea:fix-invalid-config-banner-key-names

Conversation

@b0dea

@b0dea b0dea commented Oct 23, 2026

Copy link
Copy Markdown

Fixes #1246

The "Configuration is currently invalid" banner now lists the failing keys on the same line, e.g. Configuration is currently invalid: DATABASE_URL, API_TOKEN. Tools that keep only the first stderr line of a failed process (container termination reasons, CI annotations, error-tracker titles) now say which variable is wrong. Only key names are added, never values.

  • checkForConfigErrors appends the failing keys to the banner.
  • New unit test in error-checks.test.ts loads a real graph with two empty required items and one valid item, and checks the first non-empty stderr line names both failing keys and not the valid one. It fails on main and passes with the change.
  • Updated the example output in getting-started/usage.mdx.

Existing smoke and framework tests match the banner with toContain('Configuration is currently invalid'), so they still match.

$ npx vitest run src/cli/helpers/test/error-checks.test.ts   # packages/varlock
 Test Files  1 passed (1)
      Tests  8 passed (8)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes: Reviewed the banner formatting change, its CLI and library callers, the regression test, and the documentation update.

  • Error banner: Adds error-state key names in schema order without reading values or changing validation and exit behavior.
  • Regression coverage: Checks that the first non-empty stderr line names both failing keys and excludes the valid key; all 23 focused tests passed, along with the Varlock build and changed-file lint check.
  • Documentation and release note: Updates the usage example and adds a patch release note describing the diagnostic improvement.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@theoephraim

Copy link
Copy Markdown
Member

thanks for the PR! ended up fixing in #1256 with some modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: "Configuration is currently invalid" banner doesn't name the failing keys

2 participants