Repository navigation
feat(jq): halt/debug inside the command, -a/--raw-output0/--seq/--stream, $__loc__, ?// and date/base64 fixes - #2606
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | e822127 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 10:13 PM |
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.
Requested by Михайло · project thread
What changed
haltandhalt_errorend the jq command with their exit code and skip any remaining input, as in jq. They used to fail with "halt is disabled in the bashkit sandbox". They stop only the jq command, never the shell or the host: the run loop never unwraps a halt.stderranddebugwrite to jq's stderr. Messages are buffered per command and capped at 1 MiB (TM-INF-023 updated).-a/--ascii-outputescapes non-ASCII as\uXXXX.--raw-output0is like-rwith a NUL after each output; a string containing NUL is an error, as in jq.--seqwrites RS (0x1e) before each output and treats RS in input as a value separator.--streamfeeds path events, the same onestostreamproduces.$__loc__gives{"file":"<top-level>","line":N}.. as P1 ?// P2 | bodytry each pattern in turn. Every variable named in any pattern is bound, null if its pattern didn't set it, and an error moves on to the next pattern.implodesubstitutes U+FFFD for invalid code points.strptimeuses jq's mismatch error text.fromdateiso8601andfromdatefollow jq.@base64daccepts missing padding and uses jq's error texts.Why
These come from the Debian-oracle jq cases in pseudo-linus, which are recorded against jq 1.7.1.
halt_errorand--streamshow up in real agent scripts, and before this they either errored or were rejected as unknown options.Before / After
With #2602, the Debian-oracle jq score goes from 84.0% to 88.7% (lenient).
Risk
?//and$__loc__are implemented as source rewrites before compiling, aware of strings and comments, with at most 16 rewrites per filter. An unusual filter could be rewritten wrongly. The tests cover nesting, strings, comments and the cases where every pattern errors.Checklist
Generated by Claude Code