Repository navigation
Sonny's promises out of the box: Mermaid and math in QuickJS, bubblewrap on Linux, a name-scan test - #488
Merged
Conversation
The vendored Pele and MathJax bundles ran in a node or bun process per picture, which neither the formula nor install.sh installs. Each bundle now loads once, on the first picture that needs it, into a QuickJS engine on its own thread (rquickjs, already linked for exec); later pictures only render. An interrupt handler keeps the five-second limit, and an engine whose job failed is loaded again for the next. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8fnU69QW3VW23RGg
Like tests/daemon_knows_no_client.rs one layer up: what Sonny ships for its agents names nothing of the person's world (services, hosts, web addresses); the person brings those through memory, their own skills, MCP and the lookout. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8fnU69QW3VW23RGg
…manager The daemon's default sandbox runs commands in bubblewrap and Sonny's agents search code with ripgrep; the Homebrew formula brings ripgrep, but a tarball install brought neither. install.sh now installs what is missing with apt, dnf, pacman, zypper or apk (through sudo when not root), says what to install when it cannot, and SONNY_PACKAGES=0 leaves the system alone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8fnU69QW3VW23RGg
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8fnU69QW3VW23RGg
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5c82b70a2
ℹ️ 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".
… its path in The daemon looks for bwrap only in system folders, never on PATH, so a Linuxbrew bubblewrap under its own prefix was never found. A build may now fix one more place with AGENT_BWRAP, as Flatpak's --with-system-bubblewrap does, and the agent formula sets it to its bubblewrap's opt path on Linux. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8fnU69QW3VW23RGg
…'s stack A persistent engine kept what a process per picture threw away: each formula made a TeX input and registered a handler that MathJax keeps for good, so the heap grew about 70 MB per thousand formulas. The entry now makes one adaptor, handler and document, as MathJax's server examples do, and resets tags per formula as MathJax.texReset() does (bundle rebuilt with esbuild 0.24.2, which reproduces the old bundle byte for byte from the old entry). A thousand formulas now hold the heap flat at 14 MB. The engine's thread gets twice the stack QuickJS may use, so recursion that never ends throws instead of overflowing the thread and ending Sonny. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8fnU69QW3VW23RGg
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.
Three gaps from the Sonny-vs-person audit, where Sonny promised something on first run that the install didn't bring.
Mermaid and math drawn by Sonny's own QuickJS
sonny/src/js.rsspawnednodeorbunper picture, and neither the formula nor install.sh installs them, so on a clean machine every diagram said "needs node or bun on PATH". Now each vendored bundle (Pele, MathJax) is ajs::Engine: rquickjs (already linked for exec) on its own thread, loaded once on the first picture that needs it, then reused, so later pictures only render (0.5 to 35 ms in the bench, against 88 to 146 ms for a cold load). It works from any thread and keeps one copy of each bundle per process.js::testscover reuse, reloading after a failure, and the time limit. FEATURES.md row updated.bubblewrap (and ripgrep) on Linux
apt-get updateon fresh images). When it can't, it prints what to install.SONNY_PACKAGES=0leaves the system's packages alone. I checked this on Ubuntu 24.04, where it installed bubblewrap 0.9.0. README updated.agentformula getson_linux do depends_on "bubblewrap" endand setsAGENT_BWRAPto that bubblewrap'sopt_bin/bwrapat build time. The daemon (src/sandbox.rs) checks that build-time path first, then the system folders. It still never searches PATH, so a sandboxed command can't plant abwrap. The precedent is Flatpak's--with-system-bubblewrap. Without this change, Linuxbrew'sbwrapsits under its own prefix and the daemon would never find it. The rendered formula passesruby -c, and the formula tests cover it. docs/RUST_PROTOTYPE.md updated.A name-scan test for shipped skills and roles
sonny/tests/shipped_text_names_no_service.rsworks liketests/daemon_knows_no_client.rs, one layer up. It fails when anything insonny/skillsorsonny/agentsnames a service (GitHub, Slack, Linear, Google, S3, …), a host (*.com,.io,.dev,.ai, …) or a web address. The SVG namespace is allowed, and file names likesetup.shdon't count. Main passes it today. The rule is also in AGENTS.md.🤖 Generated with Claude Code