Repository navigation
fix: read a Codex config whose multi-line string holds non-ASCII text - #3
Merged
VikramLex merged 1 commit intoOct 18, 2026
Conversation
`codex_config::scan` follows a multi-line string one byte at a time and tested for its closing delimiter with `line[i..].starts_with(...)`. When the string holds a multi-byte character (an accent, an em dash), `i` stops inside it and the slice panics: "byte index is not a char boundary". Every reader of `~/.codex/config.toml` goes through `scan` (agent detection, `graphicle connect codex`, `graphicle disconnect`), so one `developer_instructions = """..."""` with an accented word made them panic instead of finding the `[mcp_servers.*]` tables. The delimiter test now compares bytes, which never slices the line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
VikramLex
added a commit
that referenced
this pull request
Oct 18, 2026
…-off Dashboard: the app that `graphicle open` shows, and its product and documentation pages, get a light theme. It follows the operating system's light or dark setting; Settings > Appearance picks System, Light or Dark, kept per browser. The theme is set before the first paint by /theme.js (the Content-Security-Policy allows no inline script). Every colour of the stylesheets is a token whose dark value is the old colour, so the dark theme is unchanged; in the light theme, text is at least 4.5:1 against its background, and control borders and focus rings at least 3:1. MCP Registry: from this release on, the mcp-registry workflow adds one MCP bundle (.mcpb) for each release target to the GitHub release and lists the release as io.github.Graphicle-AI/graphicle (packaging/mcpb/, .github/workflows/mcp-registry.yml, glama.json). Update check: each check is recorded before its request goes out, so a check still running when a command ends counts as that day's check instead of running again with the next command. Checks whose requests fail, or that GitHub refuses or limits, back off a day, then two, then four. Still one GET with no code or data, and the notice at most once a day. Other changes: - The rcfile tests that use the process-wide state hold a lock, so one test can no longer clear the warned folders between another's calls. - The engine's file ledger marks each application module with a passing comparison receipt against Graphify 0.9.91 as verified; STATUS.md, AUDIT.json and PROGRESS.json describe the 0.9.91 port. - cargo-deny ignores RUSTSEC-2026-0367, RUSTSEC-2026-0368 and RUSTSEC-2026-0369 (zip 8.6.0): they affect only zip's extract-to-disk APIs, and Graphicle reads archive members in memory and never extracts them. The ignores go once calamine moves to zip 9. - Every crate is at 0.1.2, with a CHANGELOG entry. It also credits the four contributed fixes merged just before this commit: #3 (a Codex config with non-ASCII text in a multi-line string), #4 (a conversation opening cut on a character boundary), #5 (initialize answers a protocol version the engine speaks) and #6 (Method not found for an unknown MCP method), all by @rudycelekli. Closes #2 Signed-off-by: VikramLex <vikramlex@karlexai.com>
Member
|
Thank you, @rudycelekli. Merged for 0.1.2: comparing the closing delimiter on bytes is exactly right, and the test pins it down. The CHANGELOG credits you. |
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.
graphicle connect codex,graphicle disconnectand agent detection panic when~/.codex/config.tomlholds a multi-line string with a non-ASCII character in it.What happens
A Codex config like this one:
makes every reader of the file panic:
Root cause
codex_config::scanfollows an open multi-line string ("""or''') one byte at a time and tested for its closing delimiter withline[i..].starts_with(delimiter). Inside the string,ican stop on the second byte of a multi-byte character, and slicing the&strthere panics. All three readers of the file (agent_detect,agent_setupforconnect codex,disconnect) go throughtables()→classify()→scan().Change
The delimiter test compares bytes (
bytes[i..].starts_with(delimiter.as_bytes())), so it never slices the line. Nothing else changes: the delimiters are ASCII, so the comparison finds the same positions as before.Test
codex_config::tests::tables_read_past_multi_line_strings_with_non_ascii_text: a basic and a literal multi-line string holdingç,—andé, followed by an[mcp_servers.docs]table, which is found with its command. Onmainthe test panics as shown above.Verification
In
crates/graphicle, with Rust 1.95.0:cargo fmt --check: cleancargo clippy --locked --all-targets -- -D warnings: clean on Rust 1.95.0 (macOS). Not run locally with--features local-inference; CI covers that.cargo test --locked --all-targets: 690 passed, 0 failed.I left
CHANGELOG.mdto you.🤖 Generated with Claude Code