Skip to content

fix: auto-detect .structkit.yaml for struct_file default - #4

Merged
httpdss merged 1 commit into
mainfrom
cursor/auto-detect-structkit-yaml-9657
Oct 8, 2026
Merged

httpdss merged 1 commit into
mainfrom
cursor/auto-detect-structkit-yaml-9657

Conversation

@httpdss

@httpdss httpdss commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Problem

structkit v3.3.0 renamed the default project file from .struct.yaml to .structkit.yaml. The CLI generate command prefers .structkit.yaml and falls back to .struct.yaml, but validate / vars / lint take an explicit path with no fallback.

This action still defaulted struct_file to .struct.yaml and runs validate by default, so repos that only have .structkit.yaml failed.

Solution

When struct_file is empty or unset, auto-detect the config file:

  1. Use .structkit.yaml if it exists
  2. Otherwise use legacy .struct.yaml
  3. Otherwise fail with a clear error that names both files and the struct_file input

Explicit struct_file values are passed through unchanged.

Also in this PR

  • Document auto-detect and the legacy .struct.yaml fallback in action.yml and the README
  • Note that no_hooks requires structkit >= 3.3.0
  • Point examples and CI at .structkit.yaml
  • Add fixtures and workflow jobs covering both file names, auto-detect, preference when both exist, and a missing-file error
  • Version tag / release-drafter / major tagging references are left as they are

Testing

  • Local: tests/resolve-struct-file.test.sh
  • Local: structkit validate (3.3.0) on both fixtures
  • GitHub Actions: expanded .github/workflows/test.yml jobs
Open in Web Open in Cursor 

structkit 3.3.0 renamed the default project file. The action still
defaulted struct_file to .struct.yaml and passed it to validate, so
repos that only have .structkit.yaml failed.

When struct_file is empty, prefer .structkit.yaml, then .struct.yaml,
or fail with a clear error. Explicit paths are unchanged.

Co-authored-by: Kenneth Belitzky <kenny@belitzky.com>
@httpdss
httpdss merged commit 5e4e436 into main Oct 8, 2026
20 checks passed
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