Repository navigation
feat: make --config a command-local flag - #241
Merged
Merged
Conversation
Remove the global --cfg/--config flag and EASYP_CFG. lint and breaking select a policy file, generate selects a generation file (replacing --gen-config), and validate-config selects a file or directory, each through its own --config flag. File kinds come from names: easyp.yaml and *.easyp.yaml are policies, easyp.gen.yaml and *.easyp.gen.yaml are generation configs. Commands reject a recognized file of another kind, and validate-config now validates named profiles with the right schema and discovers them when scanning a directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
The GitHub Actions follow-up is in easyp-tech/actions#1: the actions now detect whether the image takes |
Yakwilik
approved these changes
Oct 13, 2026
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.
Summary
The global
--cfg/--configflag was read by onlylint,breaking, andvalidate-config, which declared it again locally anyway.generate,mod,get,ls-files,init, andmigrateaccepted it and ignored it without any message. For example,easyp --cfg x generatesucceeded and did nothing withx. A globalEASYP_CFGalso leaked into every command that reads it.This PR replaces the global flag with a single command-local
--config:--configselectslint,breakingeasyp.yaml(unchanged)generate--gen-config; still exclusive with--project/--alleasyp.gen.yaml(unchanged)validate-configmod,get,ls-files,init,migrateEASYP_CFGis removed.--frozen,--debug, and--formatstay global.File kinds by name
New
v1.KindOf/v1.RequireKindininternal/config/v1/files.gorecognize these names:easyp.yaml,*.easyp.yamleasyp.gen.yaml,*.easyp.gen.yamlprotobuf.modprotobuf.lockHow the kind is used:
lint --config easyp.gen.yamlfails witheasyp.gen.yaml is a generation config; this command expects a policy config. Before, such a file failed with a confusing YAML decode error.strict.yamlstill work.validate-config: this fixes a bug. Before,validate-config --config private.easyp.gen.yamlvalidated the file as a policy and reportedadditional property "plugins" is not allowed. Directory scans skipped named profiles entirely. Now they are found and validated with the right schema. The policyextendscheck also skips generation profiles.Breaking for nightly users
easyp --cfg strict.yaml linteasyp lint --config strict.yamleasyp generate --gen-config private.easyp.gen.yamleasyp generate --config private.easyp.gen.yamlEASYP_CFG=…The old forms now fail with
flag provided but not defined.--gen-configshipped only inv1.0.0-nightly.20261009.1.Follow-ups (not in this PR)
lintandbreakingpass theconfiginput as a global--cfg=…beforemod downloadand the command. With a v1 image that includes this change, settingconfigbreaks the action. The action has to place--configafterlint/breakingwhen the image is v1. The vendored skill already tells users to leaveconfigunset with v1 images until then..agents/skills/protobuf-expert-skillhere.Docs
.spec/CLI.md,README.md, andV1_RELEASE_NOTES.md(new "Command-local configuration selection" section)..agents/skills/{epctl-commands,go-testing,protobuf-expert-skill}.Test plan
go test -race -count=1 ./...passes, exceptinternal/adapters/gitmodulesTestGitTimeoutStopsModuleCandidateSearch. That test fails identically on pristinemain(987036e) on this machine. It depends onGIT_SSH_COMMANDbeing honoured, and this machine's git config intercepts it. It is unrelated to this change.v1.KindOf/RequireKindtables;validate-confignamed-profile discovery and explicit selection;--configfor lint/breaking/generate/validate;cmd/easyp:--configis not global, is registered exactly on lint/breaking/generate/validate-config, and the global--cfgis rejected.--gen-configtests moved to--config, with precise error assertions.golangci-lintv2.14.0 (repo pin) on the changed packages: 0 issues;gofmtclean.--cfgis rejected;lint --config private.easyp.gen.yamlandgenerate --config easyp.yamlare rejected with kind errors;lint --config strict.easyp.yamllints;validate-configpasses on a directory with named profiles.🤖 Generated with Claude Code