Repository navigation
Comment routing: a pure adapter crate from a stored math result to the equation library's inputs (dormant; nothing calls it) - #3501
Draft
colinmegill wants to merge 10 commits into
Draft
colinmegill wants to merge 10 commits into
colinmegill wants to merge 10 commits into
Conversation
…ult into the routing equation's typed frames (draft for the box check) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… comes from in the math result Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…can and dependency rule are tightened, from review The derived struct decoders also accepted positional sequences, which the walk does not count by name: a positional base-cluster list could hide its members from the memberships limit and the reservation. Group bodies, cells, the pca object, group clusters and base clusters now decode only from objects, with regressions for all five shapes, for absent and null membership sources, for a truly escaped duplicate key and for empty and partial group frames. The source scan reads each file whole, so whitespace, line breaks and a std alias cannot hide a forbidden path, and it carries its own witnesses. The dependency rule also checks resolved package identities: the equation crate at its own path and the other three from crates.io. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on is limited at parse (draft for the box check) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he comment id union at parse Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ys, at parse Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l; what the parse charge covers is written down From review. The counting allocator in the tests subtracted the old buffer before adding its replacement, so a reallocation that moves was undercounted; it now counts both. A constructed input (distinct keys, then compact repeats just past a capacity boundary) proves the scanner's spill term is needed. The README says what the parse charge covers (additional heap during parse), what it does not (the caller's input buffer, inline and stack space, allocator overhead), and how ownership of what is kept passes on. No runtime code changes.
This branch has not been deployed
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 this is
A new, pure Rust crate,
queue-rs/polis-routing-plan, stacked on PR #3500. It holds one thing so far: the adapter that turns the parts of a stored math result into the typed input frames of the comment routing equation library. Nothing calls it, so nothing a person can observe changes.queue-rs/polis-api/.What it does
Projection::parse_reservation(len, limits)gives, before parsing starts, an upper bound on the additional heap parsing can hold at once, for inputs that will be refused too; it is deliberately loose and is true on every constructed case, including one built to exercise the scanner's spill. The README says what that charge covers and what it does not (the caller's input buffer, inline and stack space, allocator overhead).make check-polis-routing-planis the one local entry point; the hosted job calls the same command.Checks
Passed locally at this head:
make check-polis-routing-plan(42 tests, formatting, clippy, the source scan, the dependency rule),make check-polis-routing-equation(157 tests; today's equation still 1,386 of 1,386 grid cases and 3,257 of 3,257 replayed cells bit for bit against the Python formula) andmake check-vote-sign-lint. Reviewed by the second reviewer over three rounds; its corrections are in the history.All fixtures are constructed; no real conversation's data is used. Nothing here is a statement about speed.
🤖 Generated with Claude Code