Skip to content

feat(config): publish x-secret markers in the config JSON schema - #7330

Merged
Coly010 merged 2 commits into
developfrom
columferry/cli-2858-publish-secret-markers-in-the-config-schemas
Oct 26, 2026
Merged

Coly010 merged 2 commits into
developfrom
columferry/cli-2858-publish-secret-markers-in-the-config-schemas

Conversation

@Coly010

@Coly010 Coly010 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

secret() and env({ secret: true }) mark config fields with x-secret, but the published config.schema.json never carried it, because the JSON Schema generator only emits standard keywords. The only hint a field held a secret was the "do not commit" note in its description, which tools can't act on.

The published CLI config schema now has "x-secret": true on every field the schema marks secret. That includes the remotes.* copies and the values of db.vault and edge_runtime.secrets. Editors ignore unknown keywords, so validation and completion behave the same, and nothing changes in how config is loaded.

  • toPublishedJsonSchemaDocument now generates both published schemas itself and lets only x-secret through, so internal annotations like x-env-deferred stay out
  • project-config.schema.json doesn't change, since it already leaves secret fields out altogether
  • apps/docs/public/cli/config.schema.json is regenerated, and the only change is the added markers

Linked issue

Closes CLI-2858

The published CLI config schema now carries `"x-secret": true` on every
field the schema marks secret, so tooling can tell secrets apart without
parsing descriptions. The project-config schema already omits secret
fields, so it is unchanged.
@Coly010
Coly010 requested a review from a team as a code owner October 26, 2026 13:10
@Coly010 Coly010 self-assigned this Oct 26, 2026

@github-actions github-actions 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.

🤖 AI Review

Both independent reviews were available. Confirmed Claude's single nit: the published-schema test walker skips $defs. Neither current schema uses definitions, so this is a future coverage gap, not a current schema defect. No additional findings. Tests were not run because dependencies are absent.

Findings

Severity Location Category Sources Claim
⚪ NIT packages/config/src/json-schema-document.unit.test.ts:29 test-coverage claude The secret-marker walker skips $defs, so the project-config negative assertion would miss secret markers inside definitions if the generated schema starts using them.

Stats

Claude findings: 1 · Codex findings: 0 · Confirmed: 1 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread packages/config/src/json-schema-document.unit.test.ts
@Coly010
Coly010 added this pull request to the merge queue Oct 26, 2026
Merged via the queue into develop with commit f6f7859 Oct 26, 2026
47 checks passed
@Coly010
Coly010 deleted the columferry/cli-2858-publish-secret-markers-in-the-config-schemas branch October 26, 2026 14:24
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