fix(tests): isolate CLAW_CONFIG_HOME in resumed_status JSON test#2992
Merged
code-yeongyu merged 1 commit intomainfrom May 4, 2026
Merged
fix(tests): isolate CLAW_CONFIG_HOME in resumed_status JSON test#2992code-yeongyu merged 1 commit intomainfrom
code-yeongyu merged 1 commit intomainfrom
Conversation
resumed_status_command_emits_structured_json_when_requested was reading the real ~/.claw/settings.json, causing loaded_config_files to be 1 instead of the expected 0 on machines with user config present. Root cause: unlike other tests (e.g. resumed_config_command_loads_settings_files), this test did not pass an isolated CLAW_CONFIG_HOME env var to run_claw, so claw fell back to the real HOME and loaded the developer's settings file. Fix: create a temp config-home dir and pass it as CLAW_CONFIG_HOME via run_claw_with_env. This gives the assertion a clean 0-file baseline. Unblocks PRs #2973, #2988, #2990 which all failed this same test on main. Ref: ROADMAP #65
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.
Problem
resumed_status_command_emits_structured_json_when_requestedwas reading the real~/.claw/settings.jsonon developer machines, causing:This was a pre-existing
mainfailure blocking PRs #2973, #2988, #2990 from showing clean CI.Root Cause
Unlike other tests (e.g.
resumed_config_command_loads_settings_files), this test did not pass an isolatedCLAW_CONFIG_HOMEenv var torun_claw. So claw fell back toHOMEand loaded whatever~/.claw/settings.jsonthe developer had present.Fix
Create a temp config-home dir and pass it as
CLAW_CONFIG_HOMEviarun_claw_with_env. This gives the assertion a clean 0-file baseline, consistent with all other test isolation patterns.Test
Closes ROADMAP #65.