Skip to content

[eas-cli] Require explicit simulator-host upload paths - #4683

Merged
gwdp merged 3 commits into
mainfrom
gwdp/simulator-control-explicit-host-paths
Oct 27, 2026
Merged

gwdp merged 3 commits into
mainfrom
gwdp/simulator-control-explicit-host-paths

Conversation

@gwdp

@gwdp gwdp commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

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 main independently.

How

  • Treat upload paths as local and report missing files before sending an action.
  • Require host:/absolute/path to refer to a file on the simulator host, even when that path also exists locally.
  • Document the distinction in action help and preserve unexpected filesystem errors.

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 on 1c3c53125 (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 on 6be47c68c.

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 relative host: path was rejected. The staged upload was removed afterward. This used the unpublished local all-CLI integration dc6bfa8d6 containing 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 at 1ea99754a, 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

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as outdated.

@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.62%. Comparing base (8070663) to head (4ec974c).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp

gwdp commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Codex implemented the explicit host-path fix, help text, and regression coverage under Gabe’s direction. Gabe confirmed review of the final changes at 1c3c53125 and requested Brent for review. No code changed during this handoff.

— Codex

@gwdp
gwdp marked this pull request as ready for review October 18, 2026 03:49
@gwdp
gwdp requested a review from brentvatne October 18, 2026 03:49
@github-actions

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
packages/eas-cli/** @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

@gwdp

gwdp commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

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 relative host: path was rejected. The staged upload was removed afterward. This used the unpublished local all-CLI integration dc6bfa8d6 containing this exact tip.

— Codex

@gwdp
gwdp requested a review from szdziedzic October 19, 2026 04:46

@brentvatne brentvatne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 need host: would help anyone who scripted it.
  • --help --json prints 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 with host:) fails with "A host: path must be absolute"; mentioning ./host:photo.png in 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.

@gwdp

gwdp commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

/devin review

Thanks @brentvatne for checking the upload contracts. Codex addressed the findings at 1ea99754a: ID-only actions reject host: locally, text and JSON help explain the accepted source, help spacing is fixed, and errors explain ./host:photo.png. The changeset calls out the explicit host-path requirement.

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

@gwdp
gwdp force-pushed the gwdp/simulator-control-explicit-host-paths branch from 1c3c531 to 1ea9975 Compare October 23, 2026 06:55
@devin-ai-integration

Copy link
Copy Markdown

Starting Devin Review.

Devin Review

@gwdp
gwdp requested a review from brentvatne October 23, 2026 16:18
@gwdp
gwdp force-pushed the gwdp/simulator-control-explicit-host-paths branch from 1ea9975 to 005a27b Compare October 27, 2026 00:00
gwdp and others added 3 commits October 27, 2026 11:52
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>
@gwdp
gwdp force-pushed the gwdp/simulator-control-explicit-host-paths branch from 005a27b to 4ec974c Compare October 27, 2026 18:52
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

@gwdp
gwdp merged commit 62df1ba into main Oct 27, 2026
10 checks passed
@gwdp
gwdp deleted the gwdp/simulator-control-explicit-host-paths branch October 27, 2026 19:34
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.

simulator:control: a missing local absolute path is silently sent as a simulator-host path

3 participants