Skip to content

test: expand invariant, protocol, and fuzz coverage - #340

Merged
joshrotenberg merged 3 commits into
mainfrom
test/295-invariants-and-protocols
Oct 20, 2026
Merged

joshrotenberg merged 3 commits into
mainfrom
test/295-invariants-and-protocols

Conversation

@joshrotenberg

@joshrotenberg joshrotenberg commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

The feature matrix did not exercise the modern MCP wire contract or enough cross-layer invariants. Add configured library/CLI protocol checks, generated authorization/configuration properties, controlled cancellation schedules, and finite coverage-guided fuzz smoke checks.

Closes #295.

  • Assert the selected legacy 2025-11-25 baseline for five requested revisions, with initialized notification, exact tool listing/call/denial, argument transformation and session cleanup. Assert modern per-request metadata/header behavior, sessionless execution, malformed request/credential denials and explicit unsupported-version errors without the feature.
  • Generate equivalent/invalid configuration revisions, aliased request envelopes and role combinations. Exercise verified JWTs through the configured proxy, including direct/search calls, deny/filter precedence, management separation and zero backend calls after denial. Generate follower cancellation/completion/expiry schedules with a paused clock and check fresh generation recovery without replay.
  • Share pure parser/transform assertions between ordinary property tests and two isolated cargo-fuzz targets. Commit seed inputs and the fuzz lockfile; pin nightly/cargo-fuzz, explicitly use the installed compiler's host target for sanitizer compatibility with prebuilt cargo-fuzz, cap input/run/time/RSS budgets, use temporary mutation corpora and retain crash reproducers.
  • Add protocol-only and OAuth/discovery CI builds, a bounded fuzz job, formatting for the isolated workspace, a separate fuzz dependency audit, and the coverage/reproduction matrix in CONTRIBUTING.md.

Validation on tree 7f022a99d8d77c728a7d290855de0592e10fbd77:

  • All six AGENTS.md gates passed: format, strict all-target/all-feature Clippy, 381 unit tests, 244 integration tests, strict rustdoc and 26 doctests; zero failures or ignored tests.
  • Docker 28.4.0 and required nginx:1.28-alpine / redis:7-alpine images prepared; real balancer/Redis fixtures passed.
  • Focused config/invariant/protocol tests on the same Rust sources passed sequentially with no default features (21), protocol-only (21), OAuth/discovery (22), and default features (21).
  • Both instrumented fuzz targets passed 256 runs each with CI's RUSTFLAGS=-Dwarnings and an explicit compiler host target, fixed seed 1, 4 KiB inputs, 30-second total / 5-second per-input limits, 1 GiB RSS cap; isolated lock stayed unchanged.
  • Negative control: temporarily corrupting actual alias rewriting made the shared seed assertion fail; source restored before final gates. Fuzz formatting, shell syntax, workflow parsing and diff checks passed.

Both upstream crates remain pinned to approved revision 1eb3e4ec5f004dfb884004b2be2b083fafdbe88c. Release publication remains held. The hourly backlog schedule has been paused at the user's request; this PR is the final scheduled item.

The CI fuzz runner uses the compiler host explicitly because prebuilt cargo-fuzz binaries can default to a static musl target, which AddressSanitizer rejects. The host-selection fix passed both instrumented targets locally, then all six pre-push gates passed again before the second push.

@joshrotenberg joshrotenberg changed the title test: cover protocol eras and bounded application invariants test: expand invariant, protocol, and fuzz coverage Oct 20, 2026

@joshrotenberg joshrotenberg left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review of the actual pushed diff at 1ae1710: passed; no findings requiring changes.

Fetched the published commit and verified its tree (242ddd35fd313f09896bed500ba7a0e6a4c9d89a) and all 21 GitHub file blob IDs against the source that passed final checks. Reviewed configured library/CLI protocol paths, exact HTTP/RPC status and payload assertions, no-dispatch denials, generated JWT role order/duplicate/filter cases, immediate-poll cancellation/generation schedules, shared transformation oracle and pure parser boundary. The deliberate alias corruption failed the shared assertion before restoration and final validation.

Reviewed CI feature separation, isolated fuzz lock and exact approved upstream pins, bounded offline fuzz execution, temporary corpus cleanup and failure artifacts, both dependency audits, documentation claims and release hold. Existing configured startup/Hyper readiness regressions remain in the full suite. Local evidence: 381 unit + 244 integration + 26 doctests; strict Clippy/rustdoc/format; four focused feature builds; 512 instrumented fuzz runs; zero ignored tests. Proceed to ready, then wait for every required/relevant CI/security check on this exact head before merging. Hourly backlog execution is paused by user request.

@joshrotenberg
joshrotenberg marked this pull request as ready for review October 20, 2026 17:59
@joshrotenberg
joshrotenberg marked this pull request as draft October 20, 2026 17:59

@joshrotenberg joshrotenberg left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review of the actual second pushed diff at 89882d6: passed; no findings requiring changes. Fetched the commit and verified tree 7f022a99d8d77c728a7d290855de0592e10fbd77 and all 21 GitHub file blob IDs against the tested source.

The follow-up explicitly derives the installed rustc host and passes --target to cargo-fuzz, removing the prebuilt tool's musl-target assumption that caused the first CI fuzz build to fail. AddressSanitizer, offline locked dependencies, execution/input/time/RSS limits and crash artifact handling remain enforced. Reproduction/minimization commands use the same host selection. Reviewed those two changed files in the actual fetched diff; prior protocol/authorization/configuration/cancellation assertions are unchanged.

The fixed runner passed both instrumented targets (256 runs each) with RUSTFLAGS=-Dwarnings, then every mandatory pre-push gate passed again: fmt, strict all-target/all-feature Clippy, 381 unit + 244 integration + 26 doctests, strict rustdoc, zero ignored tests. Isolated fuzz formatting, shell and diff checks also passed. The first CI run passed every other job, including both security audits, all three MSRV/test modes, reduced feature contracts, coverage and Helm. Mark ready and wait for all checks on this new head before merging. The hourly schedule remains paused; releases and dependency pin changes remain held.

@joshrotenberg
joshrotenberg marked this pull request as ready for review October 20, 2026 18:07
@joshrotenberg
joshrotenberg merged commit 5fd2c93 into main Oct 20, 2026
22 checks passed
@joshrotenberg
joshrotenberg deleted the test/295-invariants-and-protocols branch October 20, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[A27] Expand invariant, protocol, feature-boundary, and concurrency tests

1 participant