Skip to content

fix(pull): resolve remote results dir by platform UUID, not project name (2.4.6)#22

Merged
jeffdi merged 1 commit intomainfrom
fix/pull-resolve-by-uuid
May 5, 2026
Merged

fix(pull): resolve remote results dir by platform UUID, not project name (2.4.6)#22
jeffdi merged 1 commit intomainfrom
fix/pull-resolve-by-uuid

Conversation

@jeffdi
Copy link
Copy Markdown
Contributor

@jeffdi jeffdi commented May 5, 2026

Summary

  • cf pull now resolves the remote SFTP results directory by platform_project_id (UUID) instead of by the local project name string. Survives case changes (e.g. kyttarKyttar) and platform-side renames.
  • Resolution priority (only when --project-name is not explicitly passed):
    1. Fetch canonical project name from the platform API via the stored UUID.
    2. Try outgoing/results/<canonical_name>.
    3. If that path is missing, scan outgoing/results/*/config/project.json and match on platform_project_id (authoritative UUID match). Warn the user that the SFTP dir name differs from the canonical platform name.
    4. Otherwise surface a clear error (no silent fallback).
  • The existing post-download merge step rewrites the local .cf/project.json with the pulled canonical config (preserving platform_project_id), so a single successful pull self-heals the local file.
  • --project-name NAME still bypasses UUID resolution as a literal override / debugging escape hatch.
  • Bumps version to 2.4.6 and aligns chipfoundry_cli/__init__.py (which had drifted to 2.4.1) with pyproject.toml.

Motivation

User report: David recreated a project as Kyttar (capital K) on the platform after deleting old data. Chuck still had kyttar (lowercase) in his local .cf/project.json. cf pull did a literal outgoing/results/kyttar lookup, which 404'd, and Chuck was stuck with No results found for project 'kyttar' even though his data was sitting there at outgoing/results/Kyttar. UUID-based resolution makes this just work.

Test plan

  • Manual: with mismatched local name vs. platform name (e.g. local kyttar, platform Kyttar), run cf pull and confirm:
    • Canonical name is fetched from platform API
    • outgoing/results/Kyttar is downloaded into sftp-output/Kyttar/
    • Warning is printed about the local-vs-platform name mismatch
    • Local .cf/project.json is rewritten with name: \"Kyttar\" (and platform_project_id preserved)
    • A second cf pull runs cleanly with no warning
  • Manual: cf pull --project-name SomethingElse still hits the literal directory and surfaces No results found for project 'SomethingElse' if it's missing (override path unchanged).
  • Manual: project where canonical name does match — ensure we hit step 2 quickly, no UUID scan, no warning.
  • Manual: project that's been renamed and the SFTP dir still has the old name — confirm UUID scan finds it and prints the "name on SFTP differs from platform name" warning.

Files changed

  • cf-cli/chipfoundry_cli/main.py — new helper _find_remote_results_dir_by_uuid; cf pull rewritten to use UUID resolution priority.
  • cf-cli/chipfoundry_cli/__init__.py — version aligned to 2.4.6.
  • cf-cli/pyproject.toml — version 2.4.5 → 2.4.6.
  • cf-cli/README.md — pull docs describe the new resolution flow.

Made with Cursor

…ame (2.4.6)

`cf pull` previously looked up `outgoing/results/<project_name>` using whatever
name was in the local `.cf/project.json` (or `--project-name`). This broke
whenever the project was renamed on the platform or the case differed between
the SFTP directory and the local file (e.g. customer had `kyttar` locally but
the SFTP directory was `Kyttar`), producing "No results found for project ..."
even though the data was right there.

Resolution priority (when --project-name is not explicitly passed):
  1. Fetch canonical project name from the platform API via the
     stored platform_project_id.
  2. Try outgoing/results/<canonical_name>.
  3. If that path is missing, scan outgoing/results/*/config/project.json
     and match on platform_project_id (authoritative UUID match).
  4. Otherwise surface a clear error.

The post-download merge step already overwrites the local .cf/project.json
with the canonical config (preserving platform_project_id), so the local
file self-heals on the next successful pull.

--project-name <NAME> still works as a literal-name override / escape hatch.

Also aligns chipfoundry_cli/__init__.py (was 2.4.1) with pyproject.toml.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jeffdi jeffdi merged commit 7577b6f into main May 5, 2026
12 checks passed
@jeffdi jeffdi deleted the fix/pull-resolve-by-uuid branch May 5, 2026 16:26
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.

2 participants