fix: saveToFile allocator (#405), PPR weighted threshold (#109), runChainStep timeouts, macOS zig-build#410
Open
fix: saveToFile allocator (#405), PPR weighted threshold (#109), runChainStep timeouts, macOS zig-build#410
Conversation
added 2 commits
April 10, 2026 10:12
…hainStep timeouts, macOS zig-build wrapper - storage.zig: saveToFile now accepts a caller-provided allocator instead of using a hardcoded page_allocator. Adds round-trip test for saveToFile/loadFromFile. - ppr.zig: PPR push threshold uses total outgoing edge weight (W_out) instead of raw degree, matching the weighted residual distribution formula. Adds totalOutWeight helper. - tools.zig: fix runChainStep call sites to pass both timeout_ms (u64) and reported_timeout_seconds (u32) — previously only one value was passed. - scripts/zig-build.sh: wrapper for zig build on macOS 26+ where Zig 0.15.x's bundled lld cannot link against the system SDK. Made-with: Cursor
Removes scripts/zig-build.sh which contained macOS-specific linker workarounds (-fno-lld, --sysroot). This should not be part of the PR. Made-with: Cursor
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
saveToFilenow accepts a caller-providedstd.mem.Allocatorinstead of using a hardcodedpage_allocator. Includes a new round-trip test (saveToFile→loadFromFile).pprPushnow usesepsilon * W_out(u)(total outgoing edge weight) instead ofepsilon * deg(u)(raw degree). This is consistent with the weighted residual distributionW(u,v) / W_out(u). AddstotalOutWeighthelper.runChainStepintools.zignow correctly pass bothtimeout_ms: u64andreported_timeout_seconds: u32.scripts/zig-build.shwrapszig buildfor macOS 26+ where Zig 0.15.x's bundled lld cannot link against the system SDK.Test plan
zig test src/graph/storage.zig— 83/83 tests pass (includes newsaveToFile and loadFromFile round-trip (#405)test)zig test src/graph/ppr.zig— 81/81 tests passzig test src/graph/watcher.zig— 16/16 tests passzig test src/graph/ipc.zig— 17/17 tests passzig ast-check src/tools.zig— clean parseCloses #405, Closes #109
Made with Cursor