Commit Graph

6616 Commits

Author SHA1 Message Date
Tianyi Cui
fbceb8dcd5 fix(pty-local): restore the session-resolved workspace policy
The linear replay resurrected the July spawn path: mode folded inline
and both confinement and the default cwd fenced to the deployment
workspaceRoot. Master (and the pre-rebase merge result) resolve the
policy once per spawn — resolve({ session }) — so session.header.cwd
is both the workspace-write boundary and the default shell cwd, as the
README already states. Restores the single resolve, threads the policy
through spawnArgv and the cwd fallback, re-expresses master's
session-root test on the terminal spec, and pins the recorded confine
policy in the explicit-cwd test.

Also from the same review round: the Python SDK exe build stages
pty.node from subprocess-local (node-pty's home since the relocation),
and fs-local's README counts the seam's eleven primitives.
2026-08-08 21:28:00 +08:00
Tianyi Cui
18ab9f6db2 fix(rebase): migrate the replayed stack onto current master APIs
The linear replay carried each commit's own lineage, so this checkpoint
restores the master-owned surfaces the conflicted regions clobbered and
migrates branch-owned code to master's post-rebase APIs:

- rebuild subprocess-local spawn.ts on master's tree-exit-observer
  machinery, keeping the branch's win32 childEnv key semantics and the
  Linux zombie-quiescence probe; the zombie test reaps its survivor
  directly since a confirmed-absent verdict is a permanent
  no-more-signals boundary
- migrate pty-local test stubs to the Inbox-model Agent interface,
  Session.create, runnerFailureRules, and the new turn/start payload
- implement the seam's resolveExecutable/spawnTerminal abstracts in the
  new pwsh-local and tool-fs-search test fakes
- restore code-runtime, atomic-write, pwsh-local, and app-boot to
  master's exact content (the net-zero code-runtime churn is pruned
  from this history) and drop rename-detection graft debris
- re-apply the PR's architecture rows and execution-world paragraph,
  re-record bilingual pairings, regenerate catalogs, and reconcile the
  lockfile
2026-08-08 21:27:59 +08:00
Tianyi Cui
e385c11e8e fix(pty,subprocess,lsp): address review round on cancellation, lookup, and contracts
- pty-local: a pre-write inspection rejection no longer releases a canceled
  send while its foreground SIGINT is in flight; the interrupt path retains
  the slot and its post-signal tail resumes polling. Regression pins the
  failure-shaped cancellation and a close-during-write release.
- pty-local: SEND_ACTIVE names which provider operation is draining; README
  states the never-settling-provider outcome (slot retained, close recovers).
- subprocess-local: resolveExecutable rejects relative paths containing
  separators instead of expanding them per PATH entry with a misleading
  not-found error; seam JSDoc pins the rule for every provider.
- subprocess-local: LocalTerminalHandle documents why the seam's
  in-flight-join promise holds without operation tracking.
- lsp-local: the oversized-source diagnostic reports the observed byte lower
  bound; README documents that processId: null trades away server-side
  orphan cleanup after a hard-killed harness.
- pty/subprocess seams: cross-reference the twin five-member signal unions.
- pty-local: TODO markers for send-state consolidation and initialize-race
  relocation.
2026-08-08 21:27:59 +08:00
Tianyi Cui
a662af94df test(lsp): accept eager dead-slot eviction 2026-08-08 21:27:59 +08:00
Tianyi Cui
d689907c12 test(subprocess): drop obsolete cwd stubs 2026-08-08 21:27:59 +08:00
Tianyi Cui
6e4bdbf0df fix(pty): wire persistent Bash through subprocess 2026-08-08 21:27:59 +08:00
Tianyi Cui
921f4ff7a3 fix(pty): retain sends through cancellation polling 2026-08-08 21:27:59 +08:00
Tianyi Cui
e67a824604 docs(code-runtime): restore worker-only package summary 2026-08-08 21:27:59 +08:00
Tianyi Cui
4d5345794d refactor(code-runtime): remove subprocess backend 2026-08-08 21:27:59 +08:00
Tianyi Cui
c1d08edd83 refactor(runtime): remove duplicate terminal ownership state 2026-08-08 21:27:59 +08:00
Tianyi Cui
87b2c5d93f docs(runtime): remove stale runtime storage claims 2026-08-08 21:27:59 +08:00
Tianyi Cui
22fc228b97 refactor(runtime): collapse unused setup layers 2026-08-08 21:27:59 +08:00
Tianyi Cui
e8409cf928 fix(code-runtime): track generated runner source 2026-08-08 21:27:58 +08:00
Tianyi Cui
68ccf50a77 refactor(code-runtime): generate shared subprocess runner 2026-08-08 21:27:58 +08:00
Tianyi Cui
ff86795b15 fix(pty): close provider cancellation races 2026-08-08 21:27:58 +08:00
Tianyi Cui
b71dbbe766 fix(runtime): close review lifecycle and bound gaps 2026-08-08 21:27:58 +08:00
Tianyi Cui
674d23118b fix(runtime): close measured portability defects 2026-08-08 21:27:58 +08:00
Tianyi Cui
124fc6a611 fix(runtime): close portable backend boundary gaps 2026-08-08 21:27:58 +08:00
Tianyi Cui
c1d550de58 refactor(runtime): collapse speculative portability layers
Remove the one-consumer bounded-read primitive and shared terminal lifecycle controller, make terminal cleanup one awaited provider operation, and reuse one Code Runtime contract suite. Keep only reproduced cancellation and policy fixes; defer unproven replacement, prompt-attribution, and streaming-frame concerns to scoped markers.
2026-08-08 21:27:58 +08:00
Tianyi Cui
4fecc54998 fix(runtime): close teardown gaps and simplify framing 2026-08-08 21:27:58 +08:00
Tianyi Cui
045e8462ee fix(pty): drain public signals during close 2026-08-08 21:27:58 +08:00
Tianyi Cui
727546ce6d fix(code-runtime): bound every subprocess frame hop 2026-08-08 21:27:58 +08:00
Tianyi Cui
7eedfda961 fix(pty): fence delayed signal prompts 2026-08-08 21:27:57 +08:00
Tianyi Cui
277870dac2 Revert "fix(pty): fence delayed signal prompts"
This reverts commit a78958eeeaf04a3acdf22ef8a26dec370661a51d.
2026-08-08 21:27:57 +08:00
Tianyi Cui
d6b3de6e0d fix(pty): fence delayed signal prompts 2026-08-08 21:27:57 +08:00
Tianyi Cui
be3533fa19 fix(subprocess): clean runtime state after teardown failure 2026-08-08 21:27:57 +08:00
Tianyi Cui
0fec058a48 fix(pty): retain send ownership through cancellation 2026-08-08 21:27:57 +08:00
Tianyi Cui
4d63552d00 fix(lsp): preserve workspace cancellation reason 2026-08-08 21:27:57 +08:00
Tianyi Cui
098f826001 fix(subprocess): honor teardown and PATH semantics 2026-08-08 21:27:57 +08:00
Tianyi Cui
f61a4943bd fix(lsp): preserve POSIX backslash paths 2026-08-08 21:27:57 +08:00
Tianyi Cui
71e0eeac40 fix(code-runtime): contain hostile boundary failures 2026-08-08 21:27:57 +08:00
Tianyi Cui
f84f63ccd7 test(runtime): finish zombie quiescence migration 2026-08-08 21:27:57 +08:00
Tianyi Cui
562cd154a8 docs(lsp): remove resolved URI limitation 2026-08-08 21:27:57 +08:00
Tianyi Cui
ea047cc634 test(subprocess): accept zombie quiescence 2026-08-08 21:27:57 +08:00
Tianyi Cui
06a9224904 fix(subprocess): retain failed terminal cleanup 2026-08-08 21:27:57 +08:00
Tianyi Cui
a95e01d8b0 fix(pty): detach cancellation before close drain 2026-08-08 21:27:57 +08:00
Tianyi Cui
6e5d711099 fix(lsp): cancel executable setup on disposal 2026-08-08 21:27:57 +08:00
Tianyi Cui
f2a3cc450e fix(lsp): retain drive syntax in UNC worlds 2026-08-08 21:27:57 +08:00
Tianyi Cui
3572c65d57 fix(pty): join asynchronous terminal operations 2026-08-08 21:27:57 +08:00
Tianyi Cui
d29c73ddd6 fix(subprocess): treat zombie-only groups as quiescent 2026-08-08 21:27:56 +08:00
Tianyi Cui
ea75333c92 fix(lsp): compare UNC paths case-insensitively 2026-08-08 21:27:56 +08:00
Tianyi Cui
f5f40c7403 fix(pty): discard pre-write readiness evidence 2026-08-08 21:27:56 +08:00
Tianyi Cui
587fff9fe7 fix(runtime): honor platform quiescence semantics 2026-08-08 21:27:56 +08:00
Tianyi Cui
4997fb219e fix(lsp): preserve execution-world URI semantics 2026-08-08 21:27:56 +08:00
Tianyi Cui
3537665806 fix(subprocess): honor Windows environment key casing 2026-08-08 21:27:56 +08:00
Tianyi Cui
03f1c8eb43 fix(subprocess): absolutize relative PATH lookups 2026-08-08 21:27:56 +08:00
Tianyi Cui
a0200376a1 fix(pty): defer the first readiness poll 2026-08-08 21:27:56 +08:00
Tianyi Cui
65264f6c80 refactor(subprocess): share terminal lifecycle 2026-08-08 21:27:56 +08:00
Tianyi Cui
32bce339da fix(runtime): close lifecycle teardown races 2026-08-08 21:27:56 +08:00
Tianyi Cui
c17727d43d test(subprocess): cover terminal release cleanup 2026-08-08 21:27:56 +08:00