feat: verify DNS patches with stock build compatibility (US-205)#106
Merged
tervezo-ai[bot] merged 2 commits intomainfrom Mar 14, 2026
Conversation
Add scripts/verify-dns-compat.sh that automates all US-205 acceptance
criteria checks:
- Check 1: Vanilla Wasmtime compatibility (patched sysroot, no shims)
- Check 2: Stock build cleanliness (stock sysroot compiles and runs)
- Check 3: Binary size delta within 5% tolerance
- Check 4: Weak symbol fallback equivalence (identical PASS/FAIL)
Extend test_dns_compat.c from 11 to 13 tests with edge cases:
- gethostbyname("") empty string handling
- getnameinfo with zero-length service buffer
Closes #29
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…heck Fix two bugs in the DNS compatibility verification script: 1. compile_compat_test failure detection: The previous pattern used `compile_compat_test ... 2>&1 | tail -1` which masked the exit code of the compile function (pipeline exit code was from tail, not clang). Now the function captures compiler output internally and returns the actual exit code on failure. 2. Division by zero guard in check_binary_size: Added a guard for stock_size=0 to prevent awk division by zero producing inf/NaN instead of a clear failure message. Co-Authored-By: Claude Opus 4.6 <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.
Summary
scripts/verify-dns-compat.sh— automated verification of all US-205 acceptance criteria: vanilla Wasmtime compatibility, stock build cleanliness, binary size delta ≤5%, and weak symbol fallback equivalence between stock and patched sysrootslibc-patches/tests/test_dns_compat.cfrom 11 to 13 tests with edge cases forgethostbyname("")andgetnameinfowith zero-length service bufferVerification checks
test_dns_compatcompiled against patched sysroot runs in vanilla Wasmtime (no shims) without crashtest_dns_compatcompiled against stock sysroot runs without crashlibc.ais within 5% of stocklibc.aCI integration note
The CI workflow step (
scripts/verify-dns-compat.shaftertest-libc.sh --allin thewasi-libcjob) could not be pushed due to GitHub App token permissions. The following change should be added to.github/workflows/ci.yml:(After the
Test both sysrootsstep in thewasi-libcjob.)Closes #29
Test plan
scripts/build-libc.sh --bothto build both sysrootsscripts/verify-dns-compat.shand confirm all 4 checks passscripts/test-libc.sh --alland confirm all tests pass (including new tests 6 and 11)🤖 Generated with Claude Code