fix(data): preserve workspace paths in home reset - #238
Draft
Emin017 wants to merge 1 commit into
Draft
Conversation
run_flow_with_progress() calls home.reset() at the start of every
progress-mode run, and reset() restored the default template including
empty parameters/flow/checklist path fields. STA's
rebuild_home_checklist() then picked up the empty checklist path (the
.get default only applies to a missing key), built Path("") which
resolves to the process cwd, and json_write() failed with
IsADirectoryError trying to replace the repository directory. The same
empty path also silently dropped every home checklist update during CLI
runs.
reset() now clears only per-run state (layout/metrics/monitor) and keeps
the workspace-lifetime path fields, matching how both callers use it
(prepare_workspace_for_rerun re-sets the same paths immediately after).
rebuild_home_checklist() additionally recovers home.json files already
corrupted by earlier runs: when the stored checklist path is empty it
falls back to the default home/checklist.json location and persists the
healed path, so subsequent home checklist updates resolve as well.
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.
run_flow_with_progress() calls home.reset() at the start of every progress-mode run, and reset() restored the default template including empty parameters/flow/checklist path fields. STA's rebuild_home_checklist() then picked up the empty checklist path (the .get default only applies to a missing key), built Path("") which resolves to the process cwd, and json_write() failed with IsADirectoryError trying to replace the repository directory. The same empty path also silently dropped every home checklist update during CLI runs.
reset() now clears only per-run state (layout/metrics/monitor) and keeps the workspace-lifetime path fields, matching how both callers use it (prepare_workspace_for_rerun re-sets the same paths immediately after). rebuild_home_checklist() additionally recovers home.json files already corrupted by earlier runs: when the stored checklist path is empty it falls back to the default home/checklist.json location and persists the healed path, so subsequent home checklist updates resolve as well.
What Changed
Scope
Select the areas touched by this PR:
uv.lock, or release artifacts.Runtime And Packaging Impact
ecc-toolsorecc-dreamplacedependency changedNotes:
Validation
List the commands you ran. Mark checks that are not applicable as N/A.
uv run pytest test/uv run ruff check chipcompiler testuv run ruff format --check chipcompiler testecc --help,ecc --version,ecc version --jsonnix run .#cli -- --helpSkipped checks and reason:
Checklist