fix(pull): resolve remote results dir by platform UUID, not project name (2.4.6)#22
Merged
fix(pull): resolve remote results dir by platform UUID, not project name (2.4.6)#22
Conversation
…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>
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.
Summary
cf pullnow resolves the remote SFTP results directory byplatform_project_id(UUID) instead of by the local project name string. Survives case changes (e.g.kyttar→Kyttar) and platform-side renames.--project-nameis not explicitly passed):outgoing/results/<canonical_name>.outgoing/results/*/config/project.jsonand match onplatform_project_id(authoritative UUID match). Warn the user that the SFTP dir name differs from the canonical platform name..cf/project.jsonwith the pulled canonical config (preservingplatform_project_id), so a single successful pull self-heals the local file.--project-name NAMEstill bypasses UUID resolution as a literal override / debugging escape hatch.chipfoundry_cli/__init__.py(which had drifted to2.4.1) withpyproject.toml.Motivation
User report: David recreated a project as
Kyttar(capital K) on the platform after deleting old data. Chuck still hadkyttar(lowercase) in his local.cf/project.json.cf pulldid a literaloutgoing/results/kyttarlookup, which 404'd, and Chuck was stuck withNo results found for project 'kyttar'even though his data was sitting there atoutgoing/results/Kyttar. UUID-based resolution makes this just work.Test plan
kyttar, platformKyttar), runcf pulland confirm:outgoing/results/Kyttaris downloaded intosftp-output/Kyttar/.cf/project.jsonis rewritten withname: \"Kyttar\"(andplatform_project_idpreserved)cf pullruns cleanly with no warningcf pull --project-name SomethingElsestill hits the literal directory and surfacesNo results found for project 'SomethingElse'if it's missing (override path unchanged).Files changed
cf-cli/chipfoundry_cli/main.py— new helper_find_remote_results_dir_by_uuid;cf pullrewritten 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