Skip to content

Describe ext manage --from as a registry URL - #35

Closed
mgasner wants to merge 19 commits into
yas-run:mainfrom
indent-com:fix/ext-manage-from-help
Closed

mgasner wants to merge 19 commits into
yas-run:mainfrom
indent-com:fix/ext-manage-from-help

Conversation

@mgasner

@mgasner mgasner commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #34. Review only the top commit, "Describe ext manage --from as a registry URL".

The --from help text called it a directory, but it only accepts https:// URLs (or http:// on loopback). The help now calls it a registry URL.

Fork PR with the isolated diff: indent-com#17.

View in Indent
Tag @indent to continue the conversation here.

Two tests timed out on loaded CI runners. The fixture requested wl_touch
50 ms after enabling touch, and a wl_touch created before the seat advertises
the touch capability never receives events. direct_touch_has_its_own_browser_clock
read events 80 ms after sending them. The fixture now waits for the touch
capability, that test waits for its five motions, and dispatch waits up to 10 s.
A child that exited before SPAWN stored its handle left no WAIT replay, and
the Exit handler removed the route before recording the replay. A WAIT in
either window found neither and answered NotFound, which is how
uplink_cli_remote_execution_and_authentication failed in CI on
`yas run sh -c 'exit 7'`. The handle store and the exit record now
serialize on the replay table, the route retires after its replay is
recorded, and WAIT checks the replay again when the route is gone.
AbstractUnixSocketTransport length-prefixed every send, including the
8-byte preface, and left yasFraming unset, so YasConnection used message
framing and the server closed the link on the bad preface. The Node, Bun
and Deno Unix socket transports never reached HELLO.

The socket is a byte stream: the raw preface followed by u32
length-prefixed frames. Declare yasFraming = "stream" and pass bytes
through unchanged in both directions, as the WebTransport, WebRTC and
Relay transports do; YasConnection owns the framing.

Bun's socket.write accepts only what fits in the kernel buffer and drops
the rest, which corrupts a byte stream on large writes. Queue the
remainder and flush it on drain.
tsc with moduleResolution "bundler" emitted relative imports exactly as
written, without extensions, so importing the published @yas-run/core or
@yas-run/react dist from Node ESM failed with ERR_MODULE_NOT_FOUND.

Write explicit .js (or /index.js) extensions on every relative import and
compile with module/moduleResolution NodeNext, so tsc rejects an
extensionless relative import instead of shipping it. Solid's Vite build
already rewrote its JS; its emitted .d.ts now resolve under NodeNext too.
The Nix build's local @yas-run/browser package has no "type": "module", so
under NodeNext its default export types as the module namespace and tsc
rejects init() as not callable. Using the default export from the dynamic
import types the same way in both layouts.
@yas-run/core declared a peer on @yas-run/browser >=0.9.0, but the
browser package is versioned with each YAS release (0.3.0 today), so a
plain npm install failed with ERESOLVE.

Use ^0.3.0 and have prepare-release stamp ^<version> alongside the
package versions. The browser package is built from crates/browser
outside the pnpm workspace, so workspace:* cannot do this at publish.

Document the install and wait for the workspace to be ready before
creating a session in the Node example; createSession throws until the
Terminal family is negotiated.
YasSurfaceCanvas and both views default touchMode to "direct"; the view
prop comments claimed pointer emulation.
`yas remote add` writes the home server's `remotes` KV key, but
`--on NAME`, YAS_TARGET and `yas.target` were looked up in the legacy
yas.remotes file, so a freshly added remote was an unknown target and
`yas remote set-default NAME` broke every command.

Bare names now resolve against the home server (YAS_SOCK, else the
default local instance), following name-to-name entries with cycle
detection and refusing disabled entries. `yas remote` verbs without
--on also edit the home server rather than the default target, so
`toggle` after `set-default` reaches the catalogue that defines the
name. Help text and docs describe the catalogue instead of the file.
read_remotes_full wrote `local = local` to a missing yas.remotes, so a
lookup created a file. A missing file now reads as an empty list.
A SEQUENCE cursor beyond the terminal's output produced an OutputResult
whose start lay after its next cursor. Encoding rejected it and the
server answered Internal, so `yas terminal history ID --since SEQ` with
a future cursor failed. seq_text now clamps such a cursor to the end and
returns no text.
The CLI capped the collected OUTPUT reply at the requested text size, but
the reply is an encoded OutputResult with 36 bytes of fixed fields ahead
of the text. The cursor probe asks for 1 byte of text, so every probe
failed with "query returned 36 bytes; collection limit is 1". That broke
`yas terminal wait --pattern` and `yas terminal history --since now`
outright, and a full-size `output`/`history` page could trip the same
check. The collection limit now adds the framing.

With the probe working, `wait --pattern` again takes the cursor before
reading and matches only output produced after the wait began.
A command wait that expired before any command it could report on had
started answered NOT_FOUND, so `output --wait` without an index exited 1
with a NotFound error instead of the documented 124. The server now
answers TIMEOUT in that case (NOT_FOUND stays for an exited terminal or
an evicted index), and the CLI maps it to exit 124 with a "timed out"
message. A command that is still running at the deadline also prints a
timeout note alongside the existing 124.

The index-less wait keeps waiting for the running command, or for the
next one to start when none is running, so `send` followed by `output
--wait` cannot race to the previous command's result. The help,
learn.md, and design docs now say so.

Adds a server test covering this and the past-end OUTPUT cursor.
`yas terminal start --wait CMD | head -1` panicked with "failed printing
to stdout: Broken pipe" once head exited, because the terminal commands
printed with println!. They now write through a helper that treats
EPIPE as success, so the command finishes normally and exits with its
own status (the command's exit code for `start --wait`). Other stdout
errors are reported on stderr.
WRITE is a fire-and-forget event, so sending to an exited terminal (or
a nonexistent id) silently did nothing and exited 0. The CLI now looks
the terminal up first and fails with a clear error and exit 1 when it
does not exist or has exited, pointing at `yas terminal restart`.
Restart: the replayable launch record lived in a per-connection map, so
RESTART with REPLAY only worked on the connection that created the
terminal. Every CLI command opens a new connection, so `yas terminal
restart` always answered Unsupported. The launch record now lives on the
terminal itself and is replaced by a successful REPLACE restart.

Environment: --export-sock / YAS_EXPORT_SOCK and --inject-path /
YAS_INJECT_PATH only applied to the Derived environment base, which
native launches never use. They now apply to the Server base as well.
A Server-base terminal also no longer inherits a YAS_SOCK that names a
different server (for example when the server was started from a shell
inside another YAS server); an inherited YAS_SOCK equal to this server's
own socket is kept, and --export-sock always sets it.

Missing program: a CREATE whose argv program is not on the child's PATH
answered ResourceExhausted, and a RESTART with one answered Io. Both now
answer NotFound, and `yas terminal start` prints "PROGRAM: command not
found".
… them

follow_until_terminal returned as soon as a snapshot showed the definition
stopped, skipping any attempt it had not followed yet. A short attempt that
started and finished between two snapshots printed nothing. Follow every
new attempt before honoring a terminal phase; FOLLOW replays retained output
for a stopped attempt.

Human output now also names a trapped or failed attempt and its detail on
stderr, and a DEPLOY conflict on a name still held by another definition says
which one and what to do, instead of 'Conflict: no detail'.
It only accepts https:// or loopback http:// URLs, never a directory.
@indent

indent Bot commented Sep 28, 2026

Copy link
Copy Markdown

Warning

This organization's free trial has ended, so Indent couldn't start this review. Manage billing to resume reviews on this repository.

@mgasner

mgasner commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #62, reopened from a yas-run/yas branch and restacked.

@mgasner mgasner closed this Sep 28, 2026
pcarrier pushed a commit that referenced this pull request Oct 10, 2026
Stacked on #61. Replaces #35, which was opened from indent-com/yas.

The `--from` help text called it a directory, but it only accepts `https://` URLs (or `http://` on loopback). The help now calls it a registry URL.

[![View in Indent](https://assets.indent.com/view-in-indent.svg)](https://app.indent.com/c/01a0db15-330c-717e-9ec3-032c80770b1c)
Tag `@indent` to continue the conversation here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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