Skip to content

refactor(execute): reshape for IPC server lifecycle#406

Closed
branchseer wants to merge 1 commit into
feat/runner-js-bridgefrom
feat/runner-execute-refactor
Closed

refactor(execute): reshape for IPC server lifecycle#406
branchseer wants to merge 1 commit into
feat/runner-js-bridgefrom
feat/runner-execute-refactor

Conversation

@branchseer
Copy link
Copy Markdown
Member

Reshape vite_task::session::execute (and the supporting modules:
spawn, fingerprint, cache, tracked_accesses, event, and the
summary reporter) to accommodate a per-task IPC server. The server
itself is a placeholder on this branch: instead of actually calling
vite_task_server::serve(...), we construct an empty Recorder
whose driver future resolves immediately with no traffic, and bind
a StopAccepting::noop(). The downstream plumbing — async-join of
the child with the server, Reports flowing into post-run
fingerprinting and into the cache update — is fully in place but
sees only the empty Reports, so behaviour is byte-for-byte
identical to today's runner.

The follow-up wires up the real serve(...), embeds the napi
addon, and injects VP_RUN_NODE_CLIENT_PATH into the child. That
PR's serve(Recorder::new(env_map)) is the only call that changes
from "future::ready(Ok(recorder))" to the real bind.

Adds StopAccepting::noop() to vite_task_server for the same
placeholder use case; it's a tiny helper that's also useful for
tests that need a value of the type without running a server.

Also folds in the unrelated-but-blocking output-config refactor
(output: Option<UserInputsConfig> instead of
Option<Vec<UserOutputEntry>>) — both sides now route through
ResolvedGlobConfig::from_user_config. The 80-odd plan-snapshot
updates are mechanical consequences of that type change.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Copy link
Copy Markdown
Member Author

branchseer commented May 28, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dd2800e233

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

> = Box::pin(std::future::ready(Ok(recorder)));
Some(Tracking {
input_negative_globs: negatives,
ipc_envs: Vec::new(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Populate IPC envs before spawning

When automatic tracking is enabled, this constructs a completed dummy recorder and injects no VP_RUN_IPC_NAME into the child environment (ipc_envs is empty). Any runner-aware child using the provided client (Client::from_envs(std::env::vars_os())) will conclude it is outside the runner, so calls such as disableCache, ignoreInput, ignoreOutput, or tracked env reads are never reported; the parent then updates the cache with incomplete reports, which can leave watch/dev tasks cached or archive outputs the tool explicitly tried to exclude. This path needs to bind vite_task_server::serve(...) and pass its env entries to spawn() before enabling cache updates for runner-aware reporting.

Useful? React with 👍 / 👎.

@branchseer branchseer force-pushed the feat/runner-js-bridge branch from 6b6728f to 69e90aa Compare May 28, 2026 08:02
@branchseer branchseer force-pushed the feat/runner-execute-refactor branch 4 times, most recently from 07c0122 to f256aae Compare May 28, 2026 08:29
@branchseer branchseer force-pushed the feat/runner-js-bridge branch from 69e90aa to 887d8a1 Compare May 28, 2026 08:29
@branchseer branchseer changed the title feat(runner): refactor execute module for runner-aware IPC refactor(execute): reshape for IPC server lifecycle May 28, 2026
@branchseer branchseer force-pushed the feat/runner-js-bridge branch from 887d8a1 to cef2366 Compare May 28, 2026 09:07
@branchseer branchseer force-pushed the feat/runner-execute-refactor branch from f256aae to 58b706e Compare May 28, 2026 09:07
@branchseer branchseer force-pushed the feat/runner-js-bridge branch from cef2366 to d3bc701 Compare May 28, 2026 09:09
@branchseer branchseer force-pushed the feat/runner-execute-refactor branch 2 times, most recently from a92c611 to 70fab43 Compare May 28, 2026 09:11
@branchseer branchseer force-pushed the feat/runner-js-bridge branch 2 times, most recently from 3925257 to f0aef36 Compare May 28, 2026 09:57
@branchseer branchseer force-pushed the feat/runner-execute-refactor branch 2 times, most recently from b293a61 to 9abf3f6 Compare May 28, 2026 10:13
@branchseer branchseer force-pushed the feat/runner-js-bridge branch 2 times, most recently from 90e6422 to 9975d4c Compare May 28, 2026 10:43
@branchseer branchseer force-pushed the feat/runner-execute-refactor branch from 9abf3f6 to 514e25c Compare May 28, 2026 10:43
Reshape `vite_task::session::execute` (and the supporting modules:
`spawn`, `fingerprint`, `cache`, `tracked_accesses`, `event`, and the
summary reporter) to accommodate a per-task IPC server. The server
itself is a placeholder on this branch: instead of actually calling
`vite_task_server::serve(...)`, we construct an empty `Recorder`
whose driver future resolves immediately with no traffic, and bind
a `StopAccepting::noop()`. The downstream plumbing — async-join of
the child with the server, `Reports` flowing into post-run
fingerprinting and into the cache update — is fully in place but
sees only the empty `Reports`, so behaviour is byte-for-byte
identical to today's runner.

The follow-up wires up the real `serve(...)`, embeds the napi
addon, and injects `VP_RUN_NODE_CLIENT_PATH` into the child. That
PR's `serve(Recorder::new(env_map))` is the only call that changes
from "future::ready(Ok(recorder))" to the real bind.

Adds `StopAccepting::noop()` to `vite_task_server` for the same
placeholder use case; it's a tiny helper that's also useful for
tests that need a value of the type without running a server.

Also folds in the unrelated-but-blocking output-config refactor
(`output: Option<UserInputsConfig>` instead of
`Option<Vec<UserOutputEntry>>`) — both sides now route through
`ResolvedGlobConfig::from_user_config`. The 80-odd plan-snapshot
updates are mechanical consequences of that type change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@branchseer branchseer force-pushed the feat/runner-js-bridge branch from 9975d4c to 7d95cc5 Compare May 28, 2026 11:46
@branchseer branchseer force-pushed the feat/runner-execute-refactor branch from 514e25c to 4c0ac3d Compare May 28, 2026 11:46
@branchseer
Copy link
Copy Markdown
Member Author

Superseded by restructured 2-PR stack:

@branchseer branchseer closed this May 28, 2026
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