Repository navigation
Conversation
0pendev
reviewed
Nov 16, 2026
| if (opts.seed) |seed_path| try seed.writeSeed(io, seed_path, needed_bytes); | ||
| } | ||
|
|
||
| fn readAll(gpa: std.mem.Allocator, io: std.Io, arena: std.mem.Allocator, path: []const u8) ![]const u8 { |
Collaborator
There was a problem hiding this comment.
What is this helper? We have nothing in the stdlib for that?
|
|
||
| ### Zero lists and domain overrides | ||
|
|
||
| Most projects only need a few tweaks on top of the discovered model. Instead |
Collaborator
There was a problem hiding this comment.
Let's discuss this.
I do agree but the interest of forcing the first generation is that you have an absolute expression of all invariants 🤔
This branch has not been deployed
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 plan
This PR is 2 of 8. Together they let Ledger fuzz its device apps on an Absolution state model, with libFuzzer and with KLEE, through one harness.
--no-post-check, harness-only sources--symbolic klee: a KLEE driver on the fuzzer's input layout, so a KLEE test replays on the fuzzerA1 to A3 are stacked and released together as v1.2.0. The SDK and app PRs are in internal Ledger repositories.
This PR is the second step, stacked on A1 (#27): its base is the A1 branch, so the diff shows only this step. The SDK harness (step 4) passes these options for every app.
What
Tune the discovered model in the same run, without exporting, editing and re-importing a
.zon:-Z, --zero-symbolsZERO_SYMBOLS--lenient-zero-symbolsLENIENT_ZERO_SYMBOLS-O, --domain-overridesDOMAIN_OVERRIDES<global>.<field> = values ...,toporenum T; unmatched lines are fatal--no-post-checkNO_POST_CHECKcheck_invariant()assertion after the harnessEXTRA_SOURCESA selector is a global name, or
name@pathto pick one by source path. The order is--invariant, then zero lists, then overrides. Editing any of these files regenerates the driver.Why
The Ledger SDK harness keeps most app state at zero (every input starts from boot) and narrows a few enums and flags. With only
.zonimport/export, each app had to commit a machine-local model and re-export it after every source change.Changes
src/Tuning.zig(new): parsing and applying both file kinds, with tests.src/main.zig,src/root.zig,src/Parser.zig(C enum collection),src/cgen/emit.zig(--no-post-check).cmake/AbsolutionFuzzer.cmake,cmake/RunAbsolution.cmake: the new arguments.USAGE.md: "Zero lists and domain overrides".Tests
zig build test,zig build -Doptimize=ReleaseFastandzig run scripts/integration.zigpass.