Skip to content

test(fuzz): SharpFuzz libFuzzer harness over CLI argument-parse surface (issue 25) - #42

Merged
Xxx91n merged 12 commits into
mainfrom
arch/25-sharpfuzz-lenientargs
Sep 5, 2026
Merged

test(fuzz): SharpFuzz libFuzzer harness over CLI argument-parse surface (issue 25)#42
Xxx91n merged 12 commits into
mainfrom
arch/25-sharpfuzz-lenientargs

Conversation

@Xxx91n

@Xxx91n Xxx91n commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Stacked on arch/18 + arch/24 (fuzz seam IsWriteInvocationForFuzz rides in arch/24 commit ltl). Opening this draft PR fires the fuzz.yml pull_request short-run mode (workflow_dispatch requires the workflow on the default branch, which happens at stack merge). Includes harness project, 27-seed corpus, nightly workflow, csproj InternalsVisibleTo.

Env Manager Bot added 4 commits September 5, 2026 02:07
The verify job cargo compiles of the Tauri crate validate tauri.conf.json
bundle.resources, but the five declared files were never staged in CI
(locally frontend/scripts/prebuild.mjs does it during npm run build),
so every main push failed at "Run Tauri crate tests". Insert a fail-closed
staging step after "Build CLI" copying the five resources into
frontend/src-tauri/bin/. Docs synced: build-and-release.md CI section +
AGENTS.md Tauri-shell bullet.
…y (issue 17)

Run 33904993947 proved the five CLI resources stage correctly (5/5 logged)
and the resource gate passed, but compile then hit a second gate:
tauri::generate_context! (main.rs:1409) panics when frontendDist
("../../dist", repo-root dist/) does not exist - the real dist/ is only
produced by "Build frontend", which runs after the cargo steps. Seed a
dist/index.html placeholder in the same staging step; vite build
overwrites it with real output later.
… stryker job (issue 18)

- Survivor registry: 13 weak-assertion + 1 equivalent (cycle guard, process-inobservable),
  with per-mutant verdicts and LLM-detection reserve fields (.scratch report, gitignored)
- 6 kill tests across MutationSurvivorTriageTests / MutationSurvivorTriageStdoutTests
- New SetAppDataDirectoryForTests redirect seam in CliRuntime.cs (protection JSON stores)
- build.yml: workflow_dispatch stryker job + scripts/stryker-module-scores.mjs per-module scores
- stryker-config.json untouched (thresholds 85/70/60, mutate scope, ignore string/logical)
@Xxx91n
Xxx91n force-pushed the arch/25-sharpfuzz-lenientargs branch 2 times, most recently from b1073dd to 83b0096 Compare September 5, 2026 09:04
Env Manager Bot added 8 commits September 5, 2026 19:35
…, and exit code 2 (issue 19)

- ProfileEffective: PreflightResult + CollectPreflightWarnings + RunProfilePreflightDetailed (error tier ported verbatim; warn tier: undefined %VAR%, stale PATH entries, dangling launch targets) + EmitPreflightWarnReport (parseable JSON)
- ProfileCommand: profile apply/launch accept --strict; warn-only applies proceed with exit 2, --strict refuses with exit 1; profile help updated
- Program.cs: environment audit snapshot gate widened to exit 0 or 2 (audit continuity for warned applies)
- Tauri shell: run_cli maps exit 2 to GUI success (write did happen); stderr warning kept in logs
- Docs: cli-commands.md, architecture.md alignment, AGENTS.cli.md, hard-boundaries.md, backup-and-profiles.md, README + zh_CN
- Tests: 8 new ProfileSeamValidationTests facts (tier membership, strict escalation, exit codes 2/1/0, clean-path drift guard); CI-only verification per 2026-09-04 mandate

Rework per review 20: ticket-20 src hunk (IsProfileCreateHelp) withheld, re-homed to arch/20-profile-create-help.
…19 rework)

- docs/cli-commands.md:95, AGENTS.md:114, main.rs:498 comment: 'profile apply/launch' -> 'profile apply' (ProfileLaunch has no exit-2 path; review evidence confirmed)
- no code behavior change; report fact count 8->9 corrected in .scratch report
- per reviews/19-preflight-two-tier-validation.md
…sue 19 rework 2)

- CollectPreflightWarnings defined check adds Environment.GetEnvironmentVariable: %SystemRoot% is kernel-provided and absent from both registry env hives, so the registry-only surface misreported defined vars (CI run 33953937157 red); semantics = resolvable expansion => no warning
- Detailed_DefinedVarReference_NoWarning rewritten with a Process-scoped named var (set/clear in-test); undefined test pins process-env absence explicitly
- error tier and --strict contract unchanged
…urface with seed corpus and nightly workflow (issue 25)

- tests/EnvManager.Fuzz/: standalone harness (Fuzzer.LibFuzzer.Run, SharpFuzz 2.3.0) driving LenientArgs.Tokenize + WasArgsCorruptedByTrailingBackslashQuote + IsWriteInvocationForFuzz; exception bisection discipline (Format/Argument/Overflow swallowed, NRE/IndexOutOfRange/OOM/StackOverflow/AV crash)
- tests/EnvManager.Fuzz/Corpus/: 27 byte-verified seeds (trailing-backslash quote victims, backslash runs, unclosed quotes, embedded flags, control bytes, embedded NUL)
- .github/workflows/fuzz.yml: cron nightly 1800s (red = crash signal), PR short run 300s continue-on-error (non-blocking), workflow_dispatch time override; R2R re-asserted off, pinned driver + SHA256 logging
- env-manager.csproj: InternalsVisibleTo EnvManager.Fuzz
…sue 25)

SHA256 17AF5B3F... recorded by run 33943975560 (PR short run, 301s, 6.5M execs, 0 crashes); download now fails closed on mismatch.
@Xxx91n
Xxx91n force-pushed the arch/25-sharpfuzz-lenientargs branch from 83b0096 to 0107443 Compare September 5, 2026 11:36
@Xxx91n
Xxx91n merged commit 0107443 into main Sep 5, 2026
9 of 10 checks passed
@Xxx91n
Xxx91n deleted the arch/25-sharpfuzz-lenientargs branch September 5, 2026 12:27
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.

1 participant