Skip to content

fix(cli): survive ktx.yaml version skew and derive repo ownership from disk#293

Merged
andreybavt merged 3 commits into
mainfrom
debug-ktx-config-fields
Jun 11, 2026
Merged

fix(cli): survive ktx.yaml version skew and derive repo ownership from disk#293
andreybavt merged 3 commits into
mainfrom
debug-ktx-config-fields

Conversation

@andreybavt

Copy link
Copy Markdown
Contributor

Summary

Loading ktx.yaml is now tolerant of keys this ktx version does not recognize: they are stripped from the in-memory config without ever rewriting the file on disk, while invalid values on recognized fields still fail hard. ktx status reports the ignored fields as non-blocking warnings (exit 0) via a new severity on config issues, in both plain and JSON output. Repo ownership is now derived from observed state — a .git directory plus a root ktx.yaml — instead of the ktx.managed git-config marker, so projects created by any past or future ktx version classify identically. initKtxProject runs an explicit foreign-repo pre-check and writes ktx.yaml before initializing git, so an interrupted init leaves only recoverable residue instead of a bare .git misread as a foreign repo. Docs for ktx.yaml validation and ktx status are updated to match.

Test Plan

  • Full CLI suite (384 files, 2869 tests) passes
  • pnpm --filter @kaelio/ktx run type-check
  • pnpm run dead-code (Biome + Knip default and production)
  • New tests: tolerant load is read-only on disk, unknown llm.models roles warn, mixed error+warning doctor rendering, legacy repo (history + untracked ktx.yaml) accepted, foreign repo rejected with no writes, half-init recovery

…m disk

Loading ktx.yaml is now tolerant of keys this ktx version does not
recognize: they are stripped from the in-memory config (the file on disk
is never rewritten) and reported by ktx status as non-blocking warnings,
while invalid values on recognized fields still fail hard. Repo
ownership is derived from observed state (a .git directory plus a root
ktx.yaml) instead of a ktx.managed git-config marker, so projects
created by any past or future ktx classify identically. initKtxProject
now runs an explicit foreign-repo pre-check and writes ktx.yaml before
initializing git, so an interrupted init leaves only recoverable
residue instead of a bare .git misread as foreign.
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ktx-docs-site Ready Ready Preview, Comment Jun 11, 2026 5:44pm

Request Review

@codecov-commenter

Copy link
Copy Markdown

@andreybavt andreybavt merged commit 0689d70 into main Jun 11, 2026
9 checks passed
@andreybavt andreybavt deleted the debug-ktx-config-fields branch June 11, 2026 20:10
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