Skip to content

fix(data): preserve workspace paths in home reset - #238

Draft
Emin017 wants to merge 1 commit into
mainfrom
emin/fix-sta-json-write-fail
Draft

fix(data): preserve workspace paths in home reset#238
Emin017 wants to merge 1 commit into
mainfrom
emin/fix-sta-json-write-fail

Conversation

@Emin017

@Emin017 Emin017 commented Aug 22, 2026

Copy link
Copy Markdown
Member

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:

  • CLI - command behavior, Typer command surface, output formats, or workspace commands.
  • Flow/runtime - workspace lifecycle, EngineFlow, step execution, logs, metrics, or artifacts.
  • EDA integration - Yosys, ECC-Tools, DreamPlace, KLayout, PDKs, or native/runtime wrappers.
  • Build/package - Nix, PyInstaller, wheels, uv.lock, or release artifacts.
  • CI/release - GitHub Actions, version checks, changelog, or release automation.
  • Tests/docs only

Runtime And Packaging Impact

  • No runtime or packaging impact
  • CLI output or machine-readable contract changed
  • Workspace layout, flow state, or artifact paths changed
  • Native toolchain or wrapper behavior changed
  • ecc-tools or ecc-dreamplace dependency changed
  • PyInstaller, Nix, or release artifact changed

Notes:

Validation

List the commands you ran. Mark checks that are not applicable as N/A.

  • uv run pytest test/
  • uv run ruff check chipcompiler test
  • uv run ruff format --check chipcompiler test
  • PyInstaller smoke: ecc --help, ecc --version, ecc version --json
  • Nix smoke: nix run .#cli -- --help
  • Manual flow smoke:
  • Other:

Skipped checks and reason:

Checklist

  • I kept the change scoped to ECC.
  • I updated docs or user-facing CLI text where behavior changed.
  • I included lockfile or version metadata updates when dependencies changed.
  • I documented any submodule updates and why they are needed.
  • I did not include local caches, virtual environments, or generated build outputs.
  • I explained skipped validation and remaining risk.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant