Conversation
Introduces resolve_path(value, source, cwd, config_dir, spec_dir) and unit tests. The helper encodes the rule that a relative path's resolution base is determined by where the value was written (shell, config file, or built-in default), not by which option key it sets. Not wired into argument parsing yet. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Records where each argument value came from in args.argument_sources, so downstream path resolution can anchor relative paths against the right base (CWD for CLI values, config file's directory for config values, spec file's directory for defaults). Replaces the previous default-equality heuristic with a precise set built from a SUPPRESS defaults pass of the parser. No path-resolution behavior change yet. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
--unittests-script, --conformance-tests-script, and --prepare-environment-script now resolve CLI-supplied values against CWD and config.yaml values against the config file's directory. Absolute paths are preserved. The previous renderer-directory fallback -- a third anchor invisible to users -- is removed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
--base-folder, --build-folder, --conformance-tests-folder, --build-dest, --conformance-tests-dest, and --template-dir now resolve CLI values against CWD, config.yaml values against the config file's directory, and defaults against the spec file's directory. The "output lives next to the spec" rule means an invocation from a different CWD (typical in CI) no longer scatters output into the CWD. Resolution runs before the build-folder/build-dest equality check so two relative paths that resolve to the same absolute path are caught. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CLI values anchor on CWD, config.yaml values on the config file's
directory, and the default ('logging_config.yaml') now resolves next
to the spec file rather than against CWD.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Removes the always-spec-dir-relative special case for --log-file-name.
CLI values now resolve against CWD, config.yaml values against the
config file's directory, and the default ('codeplain.log') continues
to land next to the spec file.
The --no-log-to-file compatibility check switches from a string
comparison against the default to a provenance check, so a
config-supplied log-file-name is also flagged as inconsistent.
get_log_file_path() is removed -- args.log_file_name is now an
absolute path by the time callers see it, so setup_logging and
dump_crash_logs use it directly.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Describe the rule in the parser description and regenerate the CLI reference. Also drop the now-incorrect "always resolved relative to the plain file directory" note from --log-file-name. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Splatting a plain dict made mypy infer dict[str, str] and reject it against ArgumentParser's varied kwarg types. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
No description provided.