Repository navigation
M1 retrospective: patch the kit with 4 lessons from the nmap port - #11
Merged
Merged
Conversation
The compounding step for Milestone 1 — patch PLAYBOOK/harnesses and append LESSONS.md with what the nmap MVP taught the kit. Each edit names the failure it prevents next time. LESSONS #6 — scan_c_flaws read only .c/.h and reported nmap's ~9.4k LOC of C++ (.cc) as "0 flaws". Extension set widened to cover C++ (fix already in tree from PR #2); now pinned with a self-test that iter_c_files yields .cc/.cpp/.hpp and ignores non-source. Phase 0: confirm the scanner reads the target's languages before believing a low count. LESSONS #7 — diff_run.py is case-granular, so an MVP that intentionally renders a subset of C output can't be diffed raw (every case diverges) or ledgered (the whole case goes blind). Documented the canonical-projection pattern: wrap both sides in a filter that emits only the semantic result, canonicalizing both representations so real regressions still break the match. Phase 4 gate 2. LESSONS #8 — Miri can't execute real I/O (tokio connect aborts under Miri). Split the pure decision (verdict) from the syscall and cfg(miri)-ignore the I/O tests, so "Miri can't run this" never becomes "no Miri coverage." Phase 4 gate 4. LESSONS #9 — the linear six-gate model implies every module needs a fuzz tick, but fuzzing is threat-model-scoped (parsers, not renderers/models). And `cargo fuzz run <t> seeds/<t>` writes discovered inputs back into the seeds dir. gen_fuzz_target.sh guidance now shows corpus/<t> seeds/<t> (writable, read-only) and scopes the gate. Phase 4 gate 3. Meta: 3 of 4 are the same shape as winlsof #2-#4 — a control that inspects less than its green checkmark implies; the defense (retrospective step 0: run every harness against the real target and eyeball what it inspected) held again. check-kit: all harness self-tests + skills integrity green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01JfEzHqD7a7TKDuUs5GwZ2w
kj299
marked this pull request as ready for review
July 10, 2026 08:24
kj299
added a commit
that referenced
this pull request
Jul 18, 2026
* M2 retrospective: patch the kit with 2 lessons from the async-engine port The compounding step for Milestone 2 — ran every harness against real nmap (0 unsafe; 8/8 differential MATCH incl. multi-host + rate cases), then patched the playbook/harnesses and appended LESSONS.md. LESSONS #10 — ThreadSanitizer is unsound as a gate over an async runtime. CI's tsan job went red while every test passed: TSan flagged tokio's own work-stealing scheduler (a false positive in the runtime's atomics), and because app code runs inside the runtime, suppressions can't separate a runtime false-positive from a real app race. Guidance added to PLAYBOOK Phase 4 gate 4 + run_sanitizers.sh (header caveat + a stderr warning on the tsan path): for async concurrency prove race-freedom structurally (no shared mutable state + Send/Sync on spawn) plus Miri on the pure logic, and keep a multi-thread liveness test; reserve TSan for OS threads over genuinely shared state. LESSONS #11 — a differential must reject a non-file "binary". Passing a directory as --rust didn't error (a dir has the +x bit, so -x/os.access pass), reached exec, and surfaced as a confusing parse-error two layers downstream. diff_run.py gained require_binary() (regular-file + executable, called before any case) and run_one now catches IsADirectoryError/PermissionError; pinned with self-tests. Also recorded two positive validations (no change needed): the spike-the-scary- module habit graduated the congestion math straight into the module with no pivot, and the pure/impure split scaled to the whole engine — which is exactly why M2 stayed at 0 unsafe and made #10's structural-race-freedom argument possible. check-kit: all harness self-tests + skills integrity green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01JfEzHqD7a7TKDuUs5GwZ2w * M2 close-out: mark milestones 1 & 2 DONE, set M3 current in PLAN Status-tracker bookkeeping now that the M2 async engine + retrospective are merged. M1 and M2 rows flip to DONE; the "we are here" note summarizes the shipped ultra_scan engine (0 unsafe, 8/8 differential) and points at Milestone 3 (-sV service/version detection) starting at Phase 0, with the regex-fidelity decision flagged. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01JfEzHqD7a7TKDuUs5GwZ2w --------- Co-authored-by: Claude <[email protected]>
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.
The kit's non-negotiable compounding step for Milestone 1 — run every harness against the real target, then patch
PLAYBOOK.md/harnesses and appendLESSONS.md. Kit changes only; nonmap-rs/or C source touched.make -C porting-kit check-kitgreen (all harness self-tests + skills integrity).Step 0 — harnesses run against real nmap (what each found)
scan_c_flaws.pyover the M1 C sources → 9 real sink sites (services.cc:134/140strcpy,output.cc:1564/2003/2027/2048sprintf/strcat, 2 format-string) — the exact set the ledger tracks. (Only found after the C++-extension fix; see nmap C→Rust — M1: sys::net (async TCP connect + DNS via tokio) #6.)audit_unsafe.pyovernmap-rs/crates/→ 0 unsafe blocks in the whole workspace.The four lessons
.c/.hreports a C++ codebase as "0 flaws"scan_c_flaws.pyC++ extensions + self-test; Phase 0 notegen_fuzz_target.sh, Phase 4 gate 3Meta: 3 of 4 (#6/#7/#8) are the same shape as winlsof's #2–#4 — a control that inspects less than its green checkmark implies. The standing defense (retrospective step 0: run the harnesses against the real target and eyeball what they actually inspected) caught #6 and surfaced #7/#8. The one thing the kit still couldn't force: the insight that the differential needed a semantic projection — same "kit buys time, not the design" limit as #1.
Files
porting-kit/LESSONS.md— entries 006–009 + metaporting-kit/PLAYBOOK.md— Phase 0 + Phase 4 gates 2/3/4porting-kit/harnesses/c-flaw-scan/scan_c_flaws.py— C++-coverage self-testporting-kit/harnesses/fuzz/gen_fuzz_target.sh— seeds/corpus + scoping guidance🤖 Generated with Claude Code
https://claude.ai/code/session_01JfEzHqD7a7TKDuUs5GwZ2w
Generated by Claude Code