Add robustness badges mined from each parser's source and behavior#19
Merged
Conversation
New featurescan crate parses each parser's library src with syn, counting panic-inducing constructs (panic, unreachable, unimplemented, todo, unwrap, expect, indexing) and unsafe usage, reading the crate's own lint policy, and probing recursion depth in a child process. Counts exclude tests, benches, examples, cfg(test) items, and test-helper files, and are a code-smell proxy rather than a crash proof. Grading now tells a caught panic apart from an honest error via a ParseOutcome enum, so each parser page reports its empirical panic rate on the real corpus. qusql-parse is the only non-zero offender (84 of 101085, 0.083 percent), all Option::unwrap on None. Each parser page gains six badges in the existing metadata grid (panic discipline, empirical panic rate, unsafe, recursion depth, deps, serde AST). The redundant hand-recorded unsafe pill is removed in favor of the scanned count. The feature scan and depth probe run as part of cargo regen, the shared schema lives in viz, and both committed snapshots are baked into the wasm at build time.
Replaces prose semicolons with periods in doc and code comments across the repo, per the no-semicolons-in-prose convention. Literal semicolon characters inside backticks (discussing SQL or code) are left intact. Comments only, no code or behavior change.
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.
Adds per-parser robustness badges to each parser page (static panic discipline, empirical panic rate on the real corpus, unsafe surface, recursion-depth resilience, dependency count, serde-on-AST), produced by a new offline featurescan crate that scans each parser's source with syn and probes recursion depth in a child process, plus a ParseOutcome enum that lets grading tell a caught panic apart from an honest error. qusql-parse is the only parser that panics on real input, and only sqlparser-rs and sqlite3-parser are depth-guarded among the pure-Rust parsers (polyglot-sql overflows at depth 232). Also strips prose semicolons from rustdoc across the repo.