Skip to content

Bench: reject competing jobs during exact-parent evidence #617

Description

@chrisbbreuer

Parents: #461, #492
Related: #614, #615, #616

Problem

tools/exact-parent-regression.ts could collect and write a valid-looking exact-parent artifact while an unrelated Zig build/test or Home test executable overlapped a parent/candidate sample. Process-local instruction counters may remain stable, but wall/cycle/energy attribution and order balance are contaminated.

Two live #615 attempts exposed both races:

  • a Home zig test began during a row and remained alive for the after-snapshot;
  • /private/tmp/home-url-final began and exited entirely inside a row, evading both snapshots while inflating a normally millisecond invocation to roughly ten seconds.

Scope

  • Define the exact evidence competitors explicitly from process-table rows.
  • Reject unrelated zig and maker processes plus known repository test/corpus executables before and after every parent/candidate invocation.
  • Exclude the collector and its own runner ancestry/children without PID guessing.
  • Measure complete-process wall and CPU time; reject CPU occupancy below 60% so a transient competitor cannot hide between snapshots.
  • Persist the full-process wall time, occupancy, and threshold in every raw sample and rendered report.
  • Record no artifact when overlap is detected; partial output paths must not masquerade as complete evidence.
  • Add deterministic fixtures for ancestry exclusion, competitor classification, unrelated process tolerance, before/after failure behavior, occupancy calculation, policy drift, and below-threshold failure.

No-workaround rules

  • No sleeps, retries that hide an overlapped sample, process killing, bare name substring matching, or accepting stable counters as proof of an uncontended host.
  • Do not treat browser/system background activity as a named compiler/test competitor; host-class/RSD/thermal policy continues to govern ordinary noise.
  • Never delete or modify the competing user-owned process.

Acceptance

  • Self-tests prove exact competitor classification and own-runner exclusion.
  • Every measured invocation fails closed on a competitor present before or after it and writes no complete artifact.
  • Complete-process CPU occupancy rejects transient overlap that begins and ends between snapshots.
  • The occupancy observation and minimum threshold are validated and persisted in raw and Markdown artifacts.
  • Existing exact-parent identity, checksum, cleanliness, pairing, and schema gates remain green.
  • Compiler: scan pending TDZ references once #615/Compiler: classify captured loop bindings in one AST pass #616 evidence is collected only after this guard lands and passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmarksBenchmark design, evidence, and regression gatesperformanceMeasured runtime, memory, scaling, or build performancetoolingBuild, test, documentation, and developer tooling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions