Skip to content

Verify discovery queue capacity with SnaKt - #412

Closed
rotilho wants to merge 1 commit into
mainfrom
codex/add-snakt
Closed

rotilho wants to merge 1 commit into
mainfrom
codex/add-snakt

Conversation

@rotilho

@rotilho rotilho commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Use the same capacity calculation when validating discovery configuration and when allocating the discovery channel. The SnaKt contract verifies that valid inputs add exactly the requested headroom and identifies the boundary at which the sum reaches the unlimited-channel sentinel.

The isolated proof build uses Kotlin 2.3.0 and Z3 4.8.7. The PR workflow runs it on changes to discovery, the proof, or the workflow. The README links to local verification instructions.

Verification

  • The SnaKt proof passed. Adding one extra slot in a temporary checkout broke the production calculation’s postcondition and failed compilation.
  • ktlintFormat and all 29 tests across DiscoveryPropertiesTest, DiscoveryQueueTest, and BootstrapLoadMonitorTest passed. The property tests exercise the largest bounded capacity, the unlimited sentinel, and integer overflow on the JVM.

@rotilho
rotilho requested a review from a team as a code owner November 23, 2026 21:31
with:
distribution: temurin
java-version: '21'
- uses: gradle/actions/setup-gradle@v6
@rotilho rotilho closed this Nov 23, 2026
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.

2 participants