Repository navigation
[eas-cli] Require explicit simulator-host upload paths - #4683
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4683 +/- ##
==========================================
+ Coverage 75.61% 75.62% +0.02%
==========================================
Files 1055 1055
Lines 52472 52499 +27
Branches 11471 11481 +10
==========================================
+ Hits 39669 39696 +27
Misses 11823 11823
Partials 980 980 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Codex implemented the explicit host-path fix, help text, and regression coverage under Gabe’s direction. Gabe confirmed review of the final changes at — Codex |
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
|
Hosted QA: Codex staged a real app archive on EAS. Its unprefixed remote path was rejected as a missing local input, — Codex |
brentvatne
left a comment
There was a problem hiding this comment.
Reviewed at 1c3c531 with Codex, Grok and Claude reviewers; I checked each finding below against the code. Nothing here is above low severity.
1. host: is offered for actions that take an upload ID
control.ts:285-291 writes the stripped path into the upload parameter without looking at entry.uploadAs:
if (value.startsWith('host:')) {
const hostPath = value.slice('host:'.length);
...
params[param] = hostPath;
return null;
}serve-sim's app.file.upload declares upload: "uploadId", uploadAs: "id", so host:/tmp/a.json becomes uploadId: "/tmp/a.json", which the host's UploadId schema rejects. The new help line (:187-189) is gated only on entry.upload, so it advertises host: for this action too. The base failed the same way for an unprefixed absolute path, so this is not a regression, but the help now points users at it.
Fix: when uploadAs === 'id', reject host: locally with a clear message and omit the help line.
2. Nits
- The changeset is a
patch, while unprefixed absolute paths that are missing locally are no longer forwarded (shipped in 25.2.0). That is defensible for an[EXPERIMENTAL]command; one sentence in the changeset saying such paths now needhost:would help anyone who scripted it. --help --jsonprints the host catalog as is, so agents that read the JSON schema never see the local/host:convention.- The new help sentence prints at OPTIONS indentation directly under
--json; a blank line before it would separate it. host:photo.png(a local file whose name starts withhost:) fails with "A host: path must be absolute"; mentioning./host:photo.pngin that message would help.
Checked and fine: the check runs for every upload action and only when uploadWhen applies; host: with a matching local file sends the bare path and uploads nothing; ENOENT/ENOTDIR are treated as missing and other errors are rethrown before any request; relative host: paths are rejected.
This PR and #4684 both rewrite findLocalUploadAsync from main, so whichever lands second needs a rebase.
|
/devin review Thanks @brentvatne for checking the upload contracts. Codex addressed the findings at Codex ran 518 simulator/help tests across 22 suites, build, typecheck, and changed-file lint/format checks; all pass. Three new regressions failed before the fix. Local adversarial review checked ID/path upload modes, conditional upload handling, no requests on rejection, unchanged non-upload schemas, and local colon-prefixed filenames. No new hosted QA. Gabe approved the direction; human inspection of this follow-up is pending. Existing approvals and review requests were preserved. Please review this head for contract mismatches, misleading help and path-handling regressions. #4684 edits the same helper and will be tested in combination separately. — Codex |
1c3c531 to
1ea9975
Compare
1ea9975 to
005a27b
Compare
Keep upload guidance consistent in text and JSON help, and explain local filenames beginning with host:. Add rejection and help regressions. Co-authored-by: Codex <codex@openai.com>
005a27b to
4ec974c
Compare
|
✅ Thank you for adding a changeset! |
Why
A typo in a local absolute upload path is silently forwarded to the simulator host, producing a misleading remote error.
Fixes #4677. Splits upload path handling out of #4679; targets
mainindependently.How
host:/absolute/pathto refer to a file on the simulator host, even when that path also exists locally.Test Plan
Codex ran 481 simulator/help tests across 21 suites, package typecheck, and changed-file lint/format checks. The CLI build previously passed; production code is unchanged by the coverage follow-up. Regressions cover missing local absolute paths, explicit host paths, and invalid relative host paths. CI and Devin passed on
6be47c68c. Codex then added regressions for upload-path help and propagating local permission errors without sending a host action; local coverage exercises both previously uncovered lines. CI passed on1c3c53125(including Node 22 and Node 24), and Codecov confirms all modified coverable lines are tested. The Devin Review check on this head also completed successfully; its last written GitHub no-issues report remains on6be47c68c.Hosted QA: Codex staged a real app archive on EAS. Its unprefixed remote path was rejected as a missing local input,
host:installed it successfully, and a relativehost:path was rejected. The staged upload was removed afterward. This used the unpublished local all-CLI integrationdc6bfa8d6containing this exact tip.Authorship and LLM use
Gabe directed the fixes, requested separate PRs, and reviewed the final changes at
1c3c53125. Codex implemented, split, reviewed, and validated the fix and wrote the description; a coverage follow-up added regressions for upload-path help and local permission failures. Gabe requested Brent for review.Review follow-up at
1ea99754a: Codex fixed ID-only upload rejection and text/JSON path guidance after Brent’s review. Gabe reviewed the final changes at1ea99754a, including this follow-up. Codex ran 518 simulator/help tests, build, typecheck and changed-file lint/format checks; all pass. Current-head CI passed, and Devin completed analysis with no open findings. Its last written no-issues report is on the earlier head.— Codex