Repository navigation
docker: repl entrypoint mode — orly-repl baked into the image (#538) - #539
Merged
Merged
Conversation
`docker run -it --rm ghcr.io/orlyatomics/orly repl` now starts the in-container mem-sim orlyi (logs to /var/log/orly/orlyi.log) and drops straight into orly-repl pointed at it -- package dir, orlyc, and ORLY_SRC_ROOT are all container-internal, so the REPL needs zero host setup. Flags after `repl` pass to orly-repl; an orly-repl shim on PATH serves `docker exec -it <ctr> orly-repl` against a default-entrypoint container. Build stage gains node/npm and builds clients/ts + clients/repl, pruning dev deps before they ride into the runtime stage through the existing /src/orly -> /opt/orly/src copy; the runtime stage gains nodejs. The entrypoint's orlyi flags move into a shared array used by both modes. The docker workflow's PR gate grows a repl-mode step: pipe an expression through `docker run -i ... repl` on the freshly built image and assert the value comes back -- covering runtime node, the baked REPL build, and the background-orlyi handshake in one check.
This was referenced Jul 7, 2026
Closed
ohohoreilly
added a commit
that referenced
this pull request
Jul 7, 2026
…#542) With piped stdin (printf ... | orly-repl, the docker repl mode's shape), readline's close event fires as soon as input is exhausted -- while the first entry is still compiling. quit() ran immediately, tearing down the WebSocket and scratch dir under the entry, and process.exit(0) then truncated the pending stderr write, so the failure was silent: banner, one prompt, exit 0, no output. The interactive path never hits this because stdin stays open; the smoke held its pipe open too, which is why CI on #536 was green. Stdin EOF now chains quit() onto the entry queue (quit after pending entries drain -- Ctrl-D semantics unchanged), and quit sets process.exitCode instead of calling process.exit, letting the event loop drain and output flush once stdin, readline, and the socket are all closed. The smoke gains a piped-EOF regression scenario: write an expression, close stdin immediately, require the result and exit 0. Verified additionally inside the published docker image against the exact failing invocation from the docker gate on #539.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #538. Follow-up to #536.
What
starts the usual in-container mem-sim orlyi (logs go to /var/log/orly/orlyi.log instead of the terminal) and drops straight into orly-repl pointed at it. Package dir, orlyc, and ORLY_SRC_ROOT are container-internal, so the REPL needs zero host setup — this replaces the shared-mount + docker-exec-orlyc recipe as the front-door way to try orlyscript.
replpass to orly-repl (e.g.repl --shared).orly-replshim on PATH servesdocker exec -it <ctr> orly-repl ...against a container running the default entrypoint.How
replmode backgrounds orlyi, waits for the WS port via /dev/tcp, and execs the REPL.CI
The docker workflow already builds the image and gates it on every PR touching these paths; this PR adds a repl-mode step — pipe
40 + 2;throughdocker run -i ... replon the freshly built image and assert42comes back. That one check covers runtime node, the baked REPL build, and the background-orlyi handshake. (The gated container runs its own orlyi inside, so it doesn't clash with the MCP-smoke container on the runner.)Docs
Dockerfile header, root README (one-liner under the docker section), clients/repl README (image mode first, host-side recipe kept as the alternative for joining host-agent povs), changelog fragment.