-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Currently, the behavior of the same CLI is primarily driven by task-specific configurations in same.yaml or workspace-wide settings in same.work.yaml. We need to introduce a dedicated global configuration file located at .same/config.yaml to control the tool's internal behavior.
The first priority for this configuration is version validation. This will allow teams to pin a specific version of the same binary for a project. If a developer runs the project with a different version of the CLI, the tool should issue a warning to ensure consistency across environments, fulfilling our brand promise of reliability and determinism.
Goals
- Establish a pattern for global tool configuration following Clean Architecture principles.
- Provide a mechanism to enforce or suggest specific CLI versions for a repository.
- Ensure the configuration is discoverable in both standalone and workspace modes.
Acceptance Criteria
1. Configuration Loading
- The CLI must attempt to load
.same/config.yamlduring initialization. - In a workspace setup, the file should be searched for relative to the workspace root defined in
same.work.yaml. - In standalone mode, it should be searched for in the
.samedirectory relative to thesame.yaml. - The configuration must be unmarshaled into a new
SameConfigdomain model.
2. Version Validation logic
- The
config.yamlmust support a top-levelversionfield (e.g.,version: "0.1.0"). - The tool must compare this value against the internal
build.Version. - If the versions do not match, a warning must be printed to
stderrusing the standard logger. - The CLI must continue execution after the warning (non-breaking validation).
3. Technical Standards
- Implementation must use
go.trai.ch/zerrfor any loading errors. - The loading logic must be added as a port in
internal/core/portsand implemented ininternal/adapters/config. - All new logic must be verified with
nix develop -c go test -race ./cli/.... - Documentation in
docs/must be updated to include the new configuration file schema.
Metadata
Metadata
Assignees
Labels
No labels