mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-13 03:24:49 +08:00
Make dump-manifests recoverable outside the inferred build tree
The backlog sweep found that the user-cited #21-#23 items were already closed, and the next real pain point was `claw dump-manifests` failing without a direct way to point at the upstream manifest source. This adds an explicit `--manifests-dir` path, upgrades the failure messages to say whether the source root or required files are missing, and updates the ROADMAP closeout to reflect that #45 is now fixed. Constraint: Preserve existing dump-manifests behavior when no explicit override is supplied Rejected: Require CLAUDE_CODE_UPSTREAM for every invocation | breaks existing build-tree workflows and is unnecessarily rigid Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep manifest-source override guidance centralized so future error-path edits do not drift Tested: cargo fmt --all; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace; architect review APPROVE Not-tested: Manual invocation against every legacy env-based manifest lookup layout
This commit is contained in:
@@ -174,13 +174,15 @@ fn dump_manifests_and_init_emit_json_when_requested() {
|
||||
fs::create_dir_all(&root).expect("temp dir should exist");
|
||||
|
||||
let upstream = write_upstream_fixture(&root);
|
||||
let manifests = assert_json_command_with_env(
|
||||
let manifests = assert_json_command(
|
||||
&root,
|
||||
&["--output-format", "json", "dump-manifests"],
|
||||
&[(
|
||||
"CLAUDE_CODE_UPSTREAM",
|
||||
&[
|
||||
"--output-format",
|
||||
"json",
|
||||
"dump-manifests",
|
||||
"--manifests-dir",
|
||||
upstream.to_str().expect("utf8 upstream"),
|
||||
)],
|
||||
],
|
||||
);
|
||||
assert_eq!(manifests["kind"], "dump-manifests");
|
||||
assert_eq!(manifests["commands"], 1);
|
||||
|
||||
Reference in New Issue
Block a user