Skip to content

Typecheck file access and watchers - #27582

Merged
nwparker merged 1 commit into
mainfrom
nwparker/runtime-file-ownership
Oct 14, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/runtime-file-ownership

Conversation

@nwparker

@nwparker nwparker commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​218 $\color{#cf222e}{\Huge{\mathbf{−}}}$​28 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​190
Prod 32 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1263 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1187 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​76

ELI5

Type errors now surface in file access and watchers. Users keep the same behavior.

What Changed

Removes 8 unchecked-file baseline entries. Replaces unchecked assumptions with types from the existing producers and installed services. Moves include src/main/runtime/runtime-file-path-existence.ts → src/main/runtime/files/file-path-existence.ts, src/main/runtime/runtime-file-commands-read-file-explorer-preview.ts → src/main/runtime/files/file-reads.ts.

Why

Keep contracts tied to the code that implements them, without a broad assertion on the runtime or a duplicate host model.

Linked Issue

N/A — maintainer restructuring.

Visual Proof

N/A — no visual or interaction change.

Testing

All 32 runtime stages passed the main/runtime typecheck. Four compiler projects and 2,029 affected tests under each runner passed (one existing skip); the packaging prerequisite leaves those TypeScript inputs unchanged.

The cumulative stack at 5c731f58 passed the full five-shard unit run: 116,625 tests passed, with no unhandled errors. Actual macOS arm64 and Windows packages passed CLI checks; macOS also covered folder workspaces, measured terminal sizing and an older managed SSH peer, and Windows covered ConPTY cleanup and packaged/standalone host commands. The actual Linux AppImage passed the canonical Ubuntu 20.04 runtime-floor check.

Separate full mobile verification also passed. The complete hosted run also passed: changed E2E, managed SSH (38 passed, two explicit skips), layout (21 passed) and terminal sizing (18 passed). In one matched CI pair, preflight took 179 seconds before and 192 seconds after; the slowest unit job took 620 and 613 seconds. The baseline’s unchanged 1ms-sensitive assertion passed one targeted retry. Queue and retry time remain separate; no overall speedup is claimed. Individual PR checks are tracked separately from this cumulative evidence.

Review

Merge 5/33, after nwparker/runtime-browser-typed. Human review and merge only; no auto-merge.

Agent skill upstream boundary

  • Not applicable; no upstream skill source is copied.

Notes

Execution-host ownership and mixed-peer behavior are preserved. Final validation includes Windows, SSH and folder workspaces.

Checklist

  • Explained the behavior, mechanism and approach.
  • No visual change; relevant local checks pass.
  • Reviewed initialization, compatibility and execution ownership.
  • Final-stack macOS, Windows and Linux runtime-floor checks complete.
  • Full-stack hosted CI passed; individual PR results are available in the Checks tab.

@nwparker nwparker mentioned this pull request Oct 11, 2026
6 tasks done
@nwparker
nwparker force-pushed the nwparker/runtime-file-ownership branch from e8de580 to 99cd26d Compare October 13, 2026 18:36
@nwparker nwparker changed the title refactor(runtime): compose typed file access and watcher owners Typecheck file access and watchers Oct 13, 2026
@nwparker
nwparker force-pushed the nwparker/runtime-file-ownership branch from 99cd26d to 71d1be5 Compare October 13, 2026 20:53
@nwparker
nwparker marked this pull request as ready for review October 13, 2026 23:31
@nwparker
nwparker force-pushed the nwparker/runtime-file-ownership branch from 71d1be5 to d3eb4cf Compare October 14, 2026 01:37
@nwparker
nwparker force-pushed the nwparker/runtime-browser-typed branch from 27cc7c3 to c28489c Compare October 14, 2026 07:58
@nwparker
nwparker force-pushed the nwparker/runtime-file-ownership branch from d3eb4cf to 24da39e Compare October 14, 2026 07:58
@nwparker

Copy link
Copy Markdown
Contributor Author

Rebased again onto current main, which had moved 69 commits. #28240 added a position argument to openMobileFile and the host's openFile in the old runtime-file-command-access.ts and runtime-file-command-host.ts. This PR deletes those files, so I carried the change into files/file-access.ts and files/file-command-host.ts: openMobileFile accepts the optional position and passes it on as ...(position ? [position] : []), the same as main. The old files stay deleted.

@nwparker
nwparker force-pushed the nwparker/runtime-browser-typed branch from c28489c to 80521b5 Compare October 14, 2026 08:01
@nwparker
nwparker changed the base branch from nwparker/runtime-browser-typed to main October 14, 2026 08:03
@nwparker
nwparker force-pushed the nwparker/runtime-file-ownership branch from 24da39e to c0756f1 Compare October 14, 2026 08:03
@nwparker
nwparker merged commit 663cab3 into main Oct 14, 2026
4 checks passed
5hseok added a commit to 5hseok/orca that referenced this pull request Oct 15, 2026
Upstream split the runtime file commands into typed domain owners
(stablyai#27582), so files.formatOnSave moves from the mechanically split class
chain to its own RuntimeFileFormatting owner composed into
RuntimeFileCommands, with its test alongside.
marinhooodev added a commit to marinhooodev/orca that referenced this pull request Oct 16, 2026
…-image

Port the existing-parent upload rule into the runtime file-mutations
module that replaced the per-command runtime classes (stablyai#27582), and
declare files.upload-existing-parent.v1 beside the other file-mutation
capability in runtime-capability-constants.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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