Skip to content

Vopr loom audit#25

Merged
cuzzo merged 1 commit intomasterfrom
vopr-loom-audit
May 8, 2026
Merged

Vopr loom audit#25
cuzzo merged 1 commit intomasterfrom
vopr-loom-audit

Conversation

@cuzzo
Copy link
Copy Markdown
Owner

@cuzzo cuzzo commented May 8, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🐰 Bencher Report

Branchvopr-loom-audit
Testbedubuntu-latest

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
Benchmarkleak-build-msMeasure (units) x 1e3leak-countMeasure (units)leak-run-msMeasure (units)
benchmarks/concurrent/04_fanout_fanin/bench📈 view plot
⚠️ NO THRESHOLD
5.31 units x 1e3📈 view plot
⚠️ NO THRESHOLD
0.00 units📈 view plot
⚠️ NO THRESHOLD
2,999.17 units
benchmarks/concurrent/09_kvstore/bench📈 view plot
⚠️ NO THRESHOLD
5.63 units x 1e3📈 view plot
⚠️ NO THRESHOLD
0.00 units📈 view plot
⚠️ NO THRESHOLD
60,004.25 units
benchmarks/concurrent/14_nested_lock/bench📈 view plot
⚠️ NO THRESHOLD
5.17 units x 1e3📈 view plot
⚠️ NO THRESHOLD
0.00 units📈 view plot
⚠️ NO THRESHOLD
386.31 units
benchmarks/inter-clear/02_concurrent_fsm_vs_stackful/bench_fsm📈 view plot
⚠️ NO THRESHOLD
5.11 units x 1e3📈 view plot
⚠️ NO THRESHOLD
0.00 units📈 view plot
⚠️ NO THRESHOLD
153.89 units
benchmarks/inter-clear/02_concurrent_fsm_vs_stackful/bench_stackful📈 view plot
⚠️ NO THRESHOLD
5.23 units x 1e3📈 view plot
⚠️ NO THRESHOLD
0.00 units📈 view plot
⚠️ NO THRESHOLD
350.96 units
benchmarks/sequential/11_pipeline_overhead/bench📈 view plot
⚠️ NO THRESHOLD
5.18 units x 1e3📈 view plot
⚠️ NO THRESHOLD
0.00 units📈 view plot
⚠️ NO THRESHOLD
12,289.28 units
🐰 View full continuous benchmarking report in Bencher

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 8, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 25.58528% with 445 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.96%. Comparing base (7ad0669) to head (13df362).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/tools/vopr_coverage.rb 0.00% 243 Missing ⚠️
src/tools/loom_atomic_coverage.rb 0.00% 190 Missing ⚠️
zig/runtime/scheduler.zig 75.51% 12 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
- Coverage   89.81%   88.96%   -0.86%     
==========================================
  Files         183      178       -5     
  Lines       47963    47340     -623     
  Branches    11622    11622              
==========================================
- Hits        43080    42115     -965     
- Misses       4883     5225     +342     
Flag Coverage Δ
ruby 84.74% <0.00%> (-1.27%) ⬇️
zig 95.84% <92.72%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Builds the VOPR coverage tooling system, drives loom coverage on
scheduler.zig from 36% to 77%, and adds VOPR scenarios across the
runtime.

Main pieces:

  src/tools/loom_atomic_coverage.rb
  src/tools/vopr_coverage.rb
    Categorized coverage scanners (loom + VOPR). VOPR scanner has
    six categories: time, random, net_io, fs_io, ring_io, retry,
    retry_body. Each correlates a source-pattern scan against
    cobertura XML from kcov.

  zig/build.zig
    `coverage-loom -Dcoverage-loom` and `coverage-vopr -Dcoverage-vopr`
    build steps. Six VOPR test executables wired into a `vopr_exes`
    table: scheduler-timeout-vopr, atomic-ptr-vopr, versioned-vopr,
    fsm-lock-vopr, fsm-vopr, vopr-runqueue, data-structures-vopr.
    Built as `b.addExecutable` (NOT `b.addTest`) so `@import("root")`
    in lib/compat.zig + runtime/queues.zig resolves to the entry
    file -- needed for the comptime SimClock / SimRandom / SimAtomic
    seams to activate. Same GAP-B fix parking-lot-loom went through.

  zig/runtime/vopr-clock.zig         SimClock virtual clock
  zig/runtime/vopr-random.zig        SimRandom seeded PRNG
  zig/runtime/vopr-gate.zig          GAP-B regression gate (every
                                      VOPR exe runs it as the first
                                      scenario; fails fast if SimClock
                                      or SimRandom seam falls through)
  zig/runtime/vopr-atomic.zig        Adds inject_cas_fault / rate +
                                      inject_swap_busy_fault / rate +
                                      inject_load_tagged_count_remaining
                                      knobs. Off by default. SimAtomic
                                      methods record the fault counter
                                      and synthesize the configured
                                      failure mode under VOPR scenarios.
                                      disable_fiber_yield_point flag
                                      lets fiber-bearing VOPR scenarios
                                      drive REAL production code without
                                      yielding on every atomic op.

  zig/lib/compat.zig                 Comptime SimClock / SimRandom seams
                                      in milliTimestamp / nanoTimestamp /
                                      randomBytes. Comptime-deadcoded
                                      under non-VOPR builds (zero overhead).

  zig/runtime/scheduler.zig          Helper extracts (`wakeExpiredSleepers`,
                                      `wakeExpiredFsmSleepers`, `idleStealFrom`,
                                      `earliestLockWaiterDeadlineMsUntil`,
                                      `scanLockWaitersPub`) so VOPR / loom
                                      tests can drive run-loop blocks without
                                      entering the full scheduler loop. Same
                                      logic, hoisted into pub fns.

  29 retry markers (`// VOPR-START-RETRY:` ... `// VOPR-END-RETRY` and
  `// VOPR-RETRY` single-line) across versioned.zig, atomic_ptr.zig,
  scheduler.zig, observable.zig, queues.zig, data-structures.zig.

  zig/runtime/parking-lot-loom.zig
    13 new loom scenarios for the scheduler.zig coverage push (S1-S11
    + N1 batch 1-3): cross-scheduler resume flow, FSM resume flow,
    coopYield, sleep wake, pickTwo, registry pin paths, WaitGroup +
    Semaphore primitives, IO submit fns, SchedulerRegistry methods.
    Brought scheduler.zig kcov coverage from 36% (59/163 sites) to
    77% (126/163 + 2 elided).

  Six VOPR fiber-aware scenarios: fiber harness minimal +
  Runtime.sleep end-to-end + scanLockWaiters timeout-fire +
  wakeExpiredSleepers + scanFsmLockWaiters + WaiterList spinlock fault.

  docs/agents/vopr-coverage-audit.md
    Single source of truth for the VOPR system + production-change
    audit + TSan baseline measurement (3/20 master == 3/20 branch on
    TSan 3/5 stream-test SplitStream pubsub hammer).

What's NOT in this commit:

  - Production atomic-alias migrations were tried and reverted.
    Routing widely-used types (WaitGroup/Semaphore counter+lock,
    Arc.Inner counts, Stream/InfStream Inner head/tail/lock,
    observable.SpinLock, profile-lock.SpinLock) through the comptime
    Atomic alias amplified TSan flake rates -- the migration is
    semantically a no-op (alias resolves to std.atomic.Value under
    TSan) but timing-perturbing enough (struct padding / compile-cache
    hash differences) to expose pre-existing races more often.
    VOPR fault-injection scenarios that depended on those migrations
    were dropped along with the migrations.

Branch result: 18 VOPR-test fault-injection / fiber-bearing scenarios
land + 13 new loom scheduler scenarios + the coverage tooling +
audit doc. Production code adds: SimClock/SimRandom comptime seams
(dead-coded in production), scheduler.zig pub-fn extracts of inline
run-loop blocks, retry markers, and dead-code removal in queues.zig.
No production behavior change; TSan flake rate matches master baseline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cuzzo cuzzo force-pushed the vopr-loom-audit branch from 3d1647d to 13df362 Compare May 8, 2026 21:07
@cuzzo cuzzo merged commit db83d3d into master May 8, 2026
33 checks passed
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.

2 participants