Repository navigation
fix: the behaviours the code-quality round found - one rule in both packs for addresses, globs, numbers, tickets and rest.yaml flags - #91
Merged
Conversation
… wrong audit grace or retention stops the start
A number in a request or a setting was read by each pack's own reader. Here digits of any script were taken
("٣" was 3; "²" raised out of prepare(), the host's 500 where the contract says 400) and the JSON float 16000.0
was refused, while the Node twin, which cannot tell it from 16000, accepted it. Both packs now read one rule: a
JSON number with a whole value or a string of ASCII digits, with the 24 white-space characters both runtimes'
trim take ignored around it, at most 9007199254740991. A duration and a page list follow it. The refusals keep
their messages.
A malformed llm.transcript.audit.grace or llm.transcript.audit.retention was read inside the save of a loop's
closing turn: a 503 after the model had been called, the turn unsaved. Both are read when the helper starts and
stop the start by name, as its other settings do.
llm-helper-vectors.json gains the `numbers` section - 98 probes, each read as a whole number, a duration and a
page list - byte-identical with the Node twin; the digest pin moves with it.
The README's sentence on the upload bound follows the REST automation: files and text fields, in bytes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nd one for a row id and a stream cursor
ask-person: the packs answered a mangled ticket differently, and this one verified a part that ended in a
newline (its pattern matched with `$`). One rule now: three non-empty parts; the payload and the signature
canonical unpadded base64url from start to end - the alphabet, and the text equal to its own decoding encoded
again; the signature exactly the 32 bytes of the MAC. A ticket that is not well-formed is 400 `Ticket is
malformed`; a well-formed one whose MAC does not verify is 403 `Ticket signature is invalid`, compared in
constant time as before. A second spelling of a valid ticket, which differs only in the unused bits of a last
character, was accepted by both packs and is a 400 now.
agent-question: a row id and `Last-Event-ID` went through int() here (" 7 ", -3, +7 and 1_0 passed), while the
Node twin took 1.0, 1e3 and 0x10 as a `Last-Event-ID`. One rule: 1 to 19 ASCII digits from start to end, at
most 9223372036854775807 - the BIGINT of the store's id; anything else is the 400 that was there. The cursor of
a stream is `Last-Event-ID`, else `since`, else the start.
The shared vectors pin both, byte-identical with the Node twin: ask-person-vectors.json version 3 (146 cases,
68 of them tickets to verify) and agent-question-vectors.json version 4 (111 cases, 40 row ids and 51 cursors).
One existing ticket vector changed: the tampered signature now ends canonically and stays a 403, and its old
spelling is the next case, a 400.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…bound in bytes, the engines' error body where the host answered its own
- A flag of an entry - tracing, stream, upload - was on only for the YAML boolean, so `tracing: "true"` and
`tracing: ${TRACING:true}` stayed off without a word. It is read as the Java engine reads it: the boolean or
the text `true` in any letter case turns it on; `false`, no value and an empty one leave it off. Any other
value, which the engine reads as off silently, fails the load by name: `rest[N] 'tracing' must be true or
false`.
- The upload bound counted a text field by the length of its text. It counts the bytes of every part as they
arrive, and a field is read in chunks, so the 413 comes the moment the total passes.
- A keep-alive comment is written only when a keep-alive interval has passed. The Node twin wrote it on a
stream that is not Server-Sent Events when the idle timer fired a moment early; the same fall-through is
guarded here, on the REST edge and on the Event API.
- A reply the serializer refuses was the web framework's own 500 page, with no trace record. It is the engines'
error body, 500 `Reply cannot be rendered`, with the edge's http.request record; a streamed segment fails
the stream in band. The serializer's reason goes to the log.
- A body over the 16 MiB the host reads into memory was the web framework's text/plain 413. Behind REST
automation it is the engines' error body, `Request body exceeds 16777216 bytes`; on the Event API's own
handler it is a 413 envelope, as its other transport failures are.
- A part of an upload that is multipart itself failed the upload or was dropped, by its place in the body. It
is refused: 400 `Upload takes text fields and files, not a nested multipart part`.
rest-automation-vectors.json is version 3 (14 load cases for the flags), byte-identical with the Node twin and
pinned by digest here as it is there. The guides, the configuration reference and the README follow.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s, a pattern matched in bounded time, and the smaller differences Addresses. The web tools asked the ipaddress module which addresses are private, and its lists differ from one Python version to the next; the Node twin kept its own list and read an IPv4-mapped IPv6 address written in hex as public. Both packs now carry one table, the same text, and the first row of an address's own family that holds it decides. An IPv4 address is refused inside the special-purpose blocks that are not globally reachable and the shared address space (100.64.0.0/10, new here). An IPv6 address is reached only inside the global unicast block 2000::/3, outside 2001::/23, 2001:db8::/32, 2002::/16 and 3fff::/20: every other IPv6 address is refused, an IPv4-mapped one in any spelling among them, so no block has to be listed to be refused. Globs. file.list and file.search used Path.glob, whose reading of `**` changed between Python 3.12 and 3.13, and the Node twin returned nothing for a pattern that ends in `**`. Both packs now compile a glob by one grammar and walk the workspace themselves: `**` is any run of folders and, at the end, everything beneath; a slash at the end names folders only; a symbolic link is an entry and is never descended into; `..` and an absolute pattern are refused by name. A name is matched item by item, going back to the last star only, so the time is bounded by the pattern's length times the name's, however many stars the pattern has. The walk enters only the folders a pattern can still match beneath. The host patterns of tools.web.allow are matched by the same function; fnmatch is no longer used, and differs on one construct (a `!` after a backwards range in a class is a member here, as it already was in the globs). Also, where this pack answered a 500 or differed from its twin: file.list skips a symbolic link whose target is gone; file.write under a file is 400 `<path> is not a directory`; an address on a page that cannot be read stays as written and its link is skipped, and a redirect to one is a 400; a link's scheme is read in any letter case; file.search counts lines by the line feed; `pages` takes the digits 0 to 9 only; an allowlist entry that starts with a class is a pattern. tests/test_agent_tools.py: 165 passed before, 184 now (1 skipped, the live graph). The probes of the address table, of the globs and of the host patterns are the same text in the Node twin's test file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…grade note The agent tools' address check, globs and bounded matching; the LLM helper's one rule for a number and the audit settings refused at start; the ticket rule and the row id of ask-person and agent-question; REST automation's flags, upload bound and error bodies. Entries 4 to 7 of Unreleased Fixed in the Python pack, 3 to 6 in the Node.js pack. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
acn-ericlaw
added a commit
that referenced
this pull request
Nov 30, 2026
…90) and the defect round (#91), both merged; a kept finding says why on its line; the round's defects thread closed Two session logs: the round with no behaviour change (432 analyzer rows, 398 fixed and 34 kept with their reason) and the round that fixed what it had written down, in lockstep with the Node pack - one address table and one glob grammar for the agent tools with a matcher bounded in time, one rule for a number in the LLM helper, one for a ticket and for a row id, rest.yaml flags as the Java engine reads them, the engines' error body at the edge. Continuity: the rule for a kept finding and for re-scanning a round with the IDE's own analyzer, the maintainer's ruling of 2026-11-29. The thread that held the first round's findings is closed with #91. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
What
The behaviours the code-quality round of 2026-11-29 (#90) found and left alone, fixed here and in the Node.js pack in lockstep: places where the two packs answered differently, where this one answered a 500, or where a wrong value was accepted without a word. Four areas, one commit each, and the CHANGELOG.
Path.glob. A pattern is matched item by item, in time bounded by the pattern's length times the name's. Seven smaller differences from the twin are closed.llm.transcript.audit.graceorllm.transcript.audit.retentionstops the start instead of failing the closing turn of a loop.Why
The maintainer's instruction after #90: a second round for the defects the first round's review wrote down. Everything touched was added after the 4.12.30 release, so no released behaviour changes.
Two later rulings are applied in this pull request rather than in a later one, since the code was still open:
For the reviewer
Each of these is a decision where another behaviour was defensible.
Agent tools
reserved), in any spelling. The alternative was to classify it by the IPv4 address it carries, which needs code in both packs and was where the twin's defect sat. No resolver returns such an address for a name; only a URL that writes one is affected.192.0.0.9and192.0.0.10and the six globally reachable blocks inside2001::/23are refused with the block around them. None is a web site.100.64.0.0/10is refused, new in this pack. The twin already refused it.**. Before,link/*.pylisted the files beneath a link to a folder; the twin never did.src/**namessrcitself and everything beneath it;**alone does not name the folder that is listed..and./as a pattern are a 400 with a new text,glob is not a valid pattern (it names no entry).fnmatch. The two differ on one construct: in a class such as[b-a!x], a!that follows a backwards range is a member here and a negation infnmatch. It is 4 of 3,000,000 random pairs, and a test pins it in both packs.url has an invalid porthere and the general message in the twin. It is on the next round's list.LLM helper
"1 3"is page 13 in both packs, pinned in the vectors). It is on the next round's list.ask-person and agent-question
REST automation and the host
truenorfalsefails the start. The Java engine reads such a value as off without a word, which is how a flag meant to be on stays off." true "with spaces and a reference that resolves to nothing are refused; an empty value is off. The Rust engine takes the YAML boolean only, sotracing: "true"is off there without a word; whether it follows the Java engine too is a question for the family, outside these two repositories.Reply cannot be rendered; the serializer's reason goes to the log. A streamed segment fails the stream in band, because the head is already sent.POST /api/eventwithout REST automation is a 413 envelope, not JSON, as that handler's other transport failures are and as the Java engine'sEventApiServiceanswers.multipart/*type is refused, for example a saved web archive sent asmultipart/related.Upgrade note
The agent tools, REST automation and the two person-in-the-loop extensions are in no release yet. For an application that runs them from
main:rest.yamlentry whose flag is written as anything buttrueorfalsestops the start. Writetrueorfalse.100.64.0.0/10and an IPv4-mapped address are refused unlesstools.web.allow.private=true.rest.upload.max.bytesby its bytes.Verification
Run on a clean checkout of this branch's last commit, not on the working tree.
pytest: 1,502 passed and 76 skipped (921 and 76 before this round). With a live Redis, PostgreSQL and Neo4j in throwaway local containers: 1,570 passed and 8 skipped (the 8 need the live MCP recipe servers). CI has no such services, so that is their only run.mkdocs build --strict.ruff check .clean;basedpyright0 errors, also with--pythonversion 3.11; the three format-clean files still are.Beside this pull request
mercury-nodejs, on a branch of the same name.Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com
🤖 Generated with Claude Code