Repository navigation
fix: the behaviours the code-quality round found - one rule in both packs for addresses, globs, numbers, tickets and rest.yaml flags - #152
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: the Python twin took digits of any script and refused the JSON float 16000.0, which this pack cannot tell from 16000 and accepted. 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 (U+FEFF is no longer one of them here), 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 Python 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. This one accepted a stray character after a
payload and answered 403 where the Python twin answered 400 for a part that is too short; the twin verified a
part that ended in a newline. 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: `Last-Event-ID` went through Number() here (1.0, 1e3 and 0x10 passed), while the Python twin
read a row id and the header with int() (" 7 ", -3, +7 and 1_0 passed). 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. Above 2^53-1 the id is carried as a BigInt, into the reader's lookup only. The cursor of a stream is
`Last-Event-ID`, else `since`, else the start.
The shared vectors pin both, byte-identical with the Python 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`. rest.yaml is read with the boolean words of the Python pack's reader and the engine's, so the single
letters y and n are text here as they are there.
- The upload bound counted a text field by the length of its text. Each field counts as the bytes of its part
in the body. The body is read within the bound and 1 MiB; past that the rest is let go by unread, so the
client takes the 413 instead of a broken connection.
- nextSegment wrote the keep-alive comment on a stream that is not Server-Sent Events when the idle timer fired
a moment before the clock reached the deadline: `: ping` in the body of a text/plain stream. A keep-alive is
written only when a keep-alive interval has passed.
- A reply the serializer refuses was the host's catch-all 500 with no trace record, and a stream was destroyed.
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 request body had no limit: 40 MiB was read into memory and delivered. The host takes the Python pack's
16 MiB. Behind REST automation a body over it is the engines' error body, 413 `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 was delivered as a text field, or as a file of that type. It is
refused: 400 `Upload takes text fields and files, not a nested multipart part`. An upload whose parts do not
follow the boundary its content type declares is a 400 as well, as it is in the Python pack.
rest-automation-vectors.json is version 3 (14 load cases for the flags), byte-identical with the Python twin.
The three sequential awaits of the host's start and stop carry their reason on the line. 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' address check read an IPv4-mapped IPv6 address written in hex (`::ffff:7f00:1`) as public, where the dotted spelling of the same address was loopback and the Python twin refused both; and its list of blocks was shorter than the twin's. 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 (the documentation, benchmarking and protocol-assignment blocks are new here) and the shared address space. 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. The table is read by the runtime's own subnet list (net.BlockList): the module parses no address itself. Globs. A pattern that ends in `**` returned nothing from file.list and file.search, and the Python twin's Path.glob read `**` differently from one Python version to the next. Both packs now compile a glob by one grammar: `**` 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 - as an expression, three stars against a name of 1,500 characters did not finish in two minutes, with the event loop blocked. 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. Also: the HTML reader looks a name from a page up in the tables' own keys only (`&constructor;` gave the text of a function, a `<constructor>` element was a heading); a crawl that starts on an address literal or on a host written with a dot at its end follows its links; an allowlist entry that starts with a class is a pattern (`[ab].example.com` was read as the address `ab`), and one with a bracket that never closes is the pattern it spells, where it was a 500 at the first request; file.write under a file is 400 `<path> is not a directory`; a redirect to an address that cannot be read is a 400. test/agent-tools.test.mjs: 59 pass before, 78 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 Python 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
…151) and the defect round (#152), 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 (127 analyzer rows, 107 fixed and 20 kept with their reason) and the round that fixed what it had written down, in lockstep with the Python 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, a limit on a request body and 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 #152. 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 (#151) found and left alone, fixed here and in the Python 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.
**returned nothing; both packs now compile a glob by one grammar. A pattern is matched item by item, in time bounded by the pattern's length times the name's. Six 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 #151: 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:
net.BlockList) reads the addresses, so the module parses none. Every IPv6 address outside the global unicast block is refused by the last row, so no block has to be listed to be refused.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 parsing code in this pack and is where the 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.2001::/23,2002::/16,3fff::/20and everything outside2000::/3. That last one includes64:ff9b::/96: on a network that reaches IPv4 sites through it,web.fetchrefuses those sites unlesstools.web.allow.private=true.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).url has an invalid portin 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
BigInt, into the reader's lookup, comparisons and text only. The alternative was to stop at 2^53-1 in both packs, below what the store's id column holds.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.rest.yamlis read with the boolean words of the Python pack's reader and the engine's. The single lettersyandnwere booleans here and are text now, as they are there. Onlyrest.yamlgoes through this reader.Reply cannot be rendered; the serializer's reason, which this pack sent before, 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. This pack delivered it before; the twin could not.NOSONARreasons insrc/server.ts, on sequential awaits of the start and the stop that the first round had left reported.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.rest.upload.max.bytes.tools.web.allow.private=true.Verification
Run on a clean checkout of this branch's last commit, not on the working tree.
npm test: 1,466 tests, 1,390 passed, 76 skipped, none failed (812 passed before this round). With a live Redis, PostgreSQL and Neo4j in throwaway local containers: 1,458 passed and 8 skipped, none failed (the 8 need the live MCP recipe servers). CI has no such services, so that is their only run.mkdocs build --strict.Beside this pull request
Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com
🤖 Generated with Claude Code