Skip to content

Add local author checks and reproducible paired benchmark tooling - #387

Draft
Vedaant-J wants to merge 3 commits into
mainfrom
codex/author-benchmarks
Draft

Vedaant-J wants to merge 3 commits into
mainfrom
codex/author-benchmarks

Conversation

@Vedaant-J

@Vedaant-J Vedaant-J commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #384

Maintained change map

Existing public tests and scale harnesses are spread across component guides, and baseline/candidate comparisons need manual bookkeeping. Add optional author/agent commands that reuse those harnesses and retain reviewable evidence.

  • python scripts/author_checks.py list|show|doctor|run: discover seven local/public profiles, inspect effects and limits, check prerequisites, dry-run or execute a selected command with logs and a JSON receipt.
  • python scripts/benchmark_pair.py PLAN.json --output NEW_DIR: run author-supplied correctness preflight checks, then fresh-process alternating AB/BA trials; retain exact commands, declared workload/context, hashes, Git/interpreter state, raw samples, JSON and Markdown reports.
  • Stop and report failed/incomplete attempts; preserve virtual-environment identity, refuse stale/inside-worktree reports, and clean up process groups on timeouts/cancellation. Do not confuse normal multiprocessing shutdown with a leaked worker.
  • Give the exact S3 locations for the generated eight-task CI archive and seven scale graphs (100M–50B), with download-once, checksum/validation and cache-reuse commands. Start with those existing inputs; generation is an optional fallback. Provide a runnable runner control, concrete public commerce smoke/scale commands, a design record and lightweight CI tests. No machine provisioning, cloud dispatch or destructive ingest profile is added.

See usage and limits and design.

Validation

  • Real catalog readiness command: 105 passed, including 42 new orchestration cases (venv identity, paired ordering, checker failures/types, output paths, changed inputs, descendant cleanup and SIGTERM cancellation).
  • Real public commerce generation + SHA-256/schema/row-count verification: 78,160 rows, 7 Parquet files.
  • Runnable paired self-comparison control passes; this establishes runner behavior, not an Engine speedup.
  • Documentation checker: 324 Markdown files and agent interface pass. Existing pinned isort/yapf, flake8 and diff whitespace checks pass.

Limits

Draft: full CI is pending. No large-scale, native A/B, GPU performance or learning-quality result is claimed. Generic timing covers complete commands; specialized harnesses own operation/GPU/memory metrics and output checks during timing. Author-supplied preflight checkers are not proof of each timed iteration. Only listed files are hashed; full dependency/native provenance needs retained build artifacts/receipts. The exact eight-task GPU CI uses the already-generated S3 archive documented in the guide; downloading requires authorized AWS access, after which the inputs are reusable locally. The larger generated scale datasets are documented separately. The new S3 examples were checked against the CI manifest and existing dataset inventory; no large S3 dataset was downloaded in this change.

Contribution guidelines, PR templates and merge requirements are unchanged; these tools are optional. This PR uses current main's paths and is independent of the directory-layout proposal; update paths on rebase if that proposal lands first.

@copy-pr-bot

copy-pr-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@Vedaant-J
Vedaant-J temporarily deployed to gha-kumo-workflow-tests November 17, 2026 23:47 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

Failed Failed checks: 1 error · 1 warning

Check name Status Explanation Resolution
Public Resource Access Error The PR adds external resource references that anonymous users cannot access. Scope: I compared origin/main with the PR head 4bbccef. The PR adds these external references: - `docs/development/author-… 1. In docs/development/author-validation.md (line 55), replace the s3://kumo-unit-test/...pr172-inputs-v1.tar.gz source with a publicly readable URL, or add a checksum-verified public mirror. Keep the SHA-256 check in the download snipp…
Change Map Design Review Warning ## Summary I reviewed the Change map in the PR conversation comment that starts with <!-- kumo-pr-change-map -->. That comment is issuecomment-6964427328, posted by the PR author Vedaant-J. The othe… 1. Record every started child, including interrupted ones. In scripts/author_tools.py run_process (or in scripts/benchmark_pair.py execute() and scripts/author_checks.py run), catch KeyboardInterrupt. Append or write a run row…
Passed Passed checks: 1 passed

Check name Status Explanation
Pr Size Passed The PR size check fails only when the changed-file count exceeds 40. This PR changes 12 files. Method: I resolved the PR head (pr387, commit 4bbccef), which matches the checked-out HEAD. I took the…
Full details: Pr Size

Explanation

The PR size check fails only when the changed-file count exceeds 40. This PR changes 12 files. Method: I resolved the PR head (pr387, commit 4bbccef), which matches the checked-out HEAD. I took the merge-base with origin/main (9637e9c) as the base and ran git diff against it. The count is 12 with rename detection on and 12 with it off. The changed files are: - Modified (M): .github/workflows/oss-readiness.yml, docs/development/testing.md - Added (A): benchmark/author-example/plan.json, benchmark/author-example/workload.py, docs/designs/author-benchmark-tooling.md, docs/development/author-validation.md, scripts/author-checks.json, scripts/author_checks.py, scripts/author_tools.py, scripts/benchmark_pair.py, test/scripts/test_author_checks.py, test/scripts/test_benchmark_pair.py Line counts were ignored, as the check requires. No failure message or split recommendation applies.

Full details: Public Resource Access

Explanation

The PR adds external resource references that anonymous users cannot access. Scope: I compared origin/main with the PR head 4bbccef. The PR adds these external references: - docs/development/author-validation.md:55: s3://kumo-unit-test/diskgraph-profiles/engine-pr/pr172-fixtures/v1/.../pr172-inputs-v1.tar.gz. The doc says the eight-task GPU CI reuses this archive. The archive is required to run that CI. - docs/development/author-validation.md:129-131: s3://kumo-test-dataplane-bucket/scale-bench/datasets/commerce/{100M,1B,50B}/. The doc names these as the existing scale inputs to start with. - docs/development/author-validation.md:143: aws s3 sync of .../commerce/100M/. - docs/development/author-validation.md:177: _ground_truth/.../labels/ evaluation inputs. - docs/development/author-validation.md:113-116: the &lt;graph&gt;/&lt;rung&gt; template. This is illustrative and excluded. Access test: I sent anonymous HTTP HEAD requests to the public S3 virtual-host URLs. - https://kumo-test-dataplane-bucket.s3.amazonaws.com/scale-bench/datasets/commerce/100M/ returned HTTP 403. - https://kumo-unit-test.s3.amazonaws.com/.../pr172-inputs-v1.tar.gz returned HTTP 403. The PR text also states that downloading the CI archive "requires authorized AWS access". So anonymous users cannot read the required inputs. A 403 can hide a missing object, but either way an anonymous user cannot get the object. The public GitHub issue link (https://github.com/NVIDIA/kumo-engine/issues/384) returned HTTP 200. The in-repo relative links are not in question. Causality: the lines are added by this PR (+ lines in git diff origin/main...4bbcceff), and the docs require them to use the eight-task CI and the scale datasets. Result: an added reference that is required to test and use the changed code is confirmed inaccessible to an anonymous public user. The check fails.

Resolution

  1. In docs/development/author-validation.md (line 55), replace the s3://kumo-unit-test/...pr172-inputs-v1.tar.gz source with a publicly readable URL, or add a checksum-verified public mirror. Keep the SHA-256 check in the download snippet. Alternatively, state the public source of the same bytes. 2. In the same file (lines 129-131, 143, 177), replace the s3://kumo-test-dataplane-bucket/scale-bench/datasets/commerce/{100M,1B,50B}/ locations with anonymously readable public URLs. Alternatively, publish the manifests and per-file SHA-256 values in this repository so users can verify a public mirror. Do the same for the _ground_truth labels path. 3. Re-run an anonymous request (for example curl -I) against each replacement URL. Record the HTTP 200 result in the PR. 4. If the data cannot be public, include the required generation recipe, manifest, and hashes in this repository. Then state clearly that the existing measured inputs need authorized access.
Full details: Change Map Design Review

Explanation

Summary I reviewed the Change map in the PR conversation comment that starts with &lt;!-- kumo-pr-change-map --&gt;. That comment is issuecomment-6964427328, posted by the PR author Vedaant-J. The other marker comment (6964424753) is a CodeRabbit skip notice. It is not the change map. The map is sound in its core design. It has a clear necessity (issue #384 asks for discoverability and reproducible paired evidence). It reuses existing harnesses. It names focused verification and a stopping condition. The code confirms most of its claims: - scripts/author_tools.py 125–161: child processes start in new sessions. Process groups are stopped on timeout and failure. - scripts/benchmark_pair.py 282–287: measured pairs alternate AB/BA order. - scripts/benchmark_pair.py 250–268: an interpreter probe runs first. The checker receipt must exactly match correctness_expect, and the checker runs before timing. - scripts/benchmark_pair.py 117–126 and 199–204: interpreter paths are not resolved away. Reports refuse paths inside the measured worktrees. - scripts/author-checks.json: the seven profiles contain no destructive or cloud-provisioning entry points. The map still fails this review. It claims that receipts retain provenance and that the runner handles cancellation. The code shows that these claims do not hold for interrupted attempts, and the map omits the timing and shutdown limits. ## Finding 1 (proven gap): interrupted commands are not recorded - In benchmark_pair.py execute() (lines 226–239), the run row is appended to report['runs'] only after run_process returns (line 234). - run_process in author_tools.py (lines 133–136) catches only OSError. A KeyboardInterrupt from SIGTERM therefore skips the append. - The outer handler (lines 325–327) sets only status: failed and error: Interrupted. The interrupted command's argv, exit state, and log name are absent from results.json. - In author_checks.py run (lines 222–230), an interrupt sets status: interrupted. No run key is written, so the command record is missing. - The cancellation test (test/scripts/test_benchmark_pair.py 262–285) checks only the failed status, the exit code, and that the process group stopped. It does not check that the interrupted command was recorded. This conflicts with the map's "Record provenance and stop process groups on failure/cancellation" and with the PR's "retain exact commands, raw logs" claims. Cleanup works. Evidence retention for the cancelled attempt does not. Suggested correction: Record a row for every started child, including interrupted ones. For example, catch KeyboardInterrupt in run_process or execute, append a row with status: interrupted, the argv, the cwd, and the log name, then re-raise. Add a test that asserts the interrupted row in runs or the run key. ## Finding 2 (design question, partly undisclosed): timing boundary and drain window - wall_seconds is set when the direct child exits (author_tools.py 127–132). - After that, a fixed 1-second drain runs (lines 138–145). It is outside the timed interval. - If a group still runs after the drain, a run that exited with status ok becomes failed with "Command left background processes running" (lines 146–149). The map says the design allows "normal worker shutdown." The rendered summary says the timing "includes process startup and shutdown." Neither states the 1-second window. Neither states that worker shutdown after the leader exits is untimed. Whether normal shutdown of the real harnesses takes longer than 1 second is unknown. Such a run would fail as a leak. This is an uncertain design question, not a proven defect. Suggested correction: Document the timing boundary as "direct child exit plus a 1-second drain." Make the drain window explicit and configurable. Or time until the process group is empty, and state the chosen rule in the map and the report. ## Finding 3 (minor, undisclosed… [truncated to fit comment limits]

Resolution

  1. Record every started child, including interrupted ones. In scripts/author_tools.py run_process (or in scripts/benchmark_pair.py execute() and scripts/author_checks.py run), catch KeyboardInterrupt. Append or write a run row with status interrupted, the argv, the cwd, the log name, and the timeout. Then re-raise. Add a SIGTERM test that asserts this row in results.json. 2. Update the Change map and the rendered summary. State that the timed interval ends at direct child exit. State that the post-exit drain is 1 second and untimed. State the failure rule for lingering groups. Either make the drain window configurable, or time until the process group is empty. Confirm the chosen rule with a real harness that spawns workers. 3. Either alternate the warmup order (for example, SIDES if index % 2 == 0 else SIDES[::-1]), or state in the Change map that warmups always run baseline first.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Vedaant-J

Vedaant-J commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Change map

The requested behavior is easier local testing and reproducible author-owned benchmark evidence without contribution-policy changes. Existing component harnesses already do the domain work, so the design wraps selected commands and retains their artifacts rather than introducing another test framework. Verification covers process supervision, receipts and a real public data smoke. The stopping condition is usable optional tooling with honest measurement/provenance limits; cloud/GPU/full-scale reproduction is outside this change.

File Function / scope What changed Why
scripts/author_checks.py Catalog loading, parameters, doctor and CLI dispatch Inspect/preflight/dry-run/run selected local commands with explicit outputs and outcomes Make existing checks discoverable and preserve author evidence without provisioning
scripts/author-checks.json Seven profile definitions Declare commands, prerequisites, effects, bounds and owning guides Keep command discovery inspectable and exclude destructive/private-only entry points
scripts/author_tools.py Git/machine receipts, output creation and child process supervision Record provenance and stop process groups on failure/cancellation while allowing normal worker shutdown Avoid overwritten reports, wrong success states and leftover benchmark workers
scripts/benchmark_pair.py Plan validation, preflight checks, paired trials and report generation Compare explicit variants with AB/BA order, file hashes, raw logs/samples and scoped summaries Make complete-command comparisons reproducible without claiming operation/GPU timing or correctness the tool cannot establish
benchmark/author-example/plan.json, benchmark/author-example/workload.py Runnable self-comparison control Exercise an independent integer answer check and retained reports Let authors verify orchestration without runtime/GPU/cloud dependencies or a speedup claim
test/scripts/test_author_checks.py, test/scripts/test_benchmark_pair.py Operational regression coverage Cover selection, preflight, failure, stale outputs, venv identity, ordering, changed inputs and process cleanup Catch false success, incorrect environment selection and cancellation leaks
.github/workflows/oss-readiness.yml Existing isolated readiness selection Run the two lightweight tool test files Keep orchestration regressions checked without model training or cloud access
docs/development/author-validation.md Author workflow and measurement limits List exact S3 locations for the generated CI archive and seven scale graphs; provide manifest-driven download, checksum/validation and reuse commands, with optional generation Make the tools usable on author machines while disclosing CI/data/native limitations
docs/designs/author-benchmark-tooling.md System proposal and boundaries Explain reuse of existing S3 datasets/harnesses, optional generation, outcome semantics, provenance and verification Make implementation choices and the scope of performance claims reviewable
docs/development/testing.md Testing navigation Link the optional author tools Expose them through existing human/agent guidance without changing policy

@Vedaant-J
Vedaant-J temporarily deployed to gha-kumo-workflow-tests November 18, 2026 19:16 — with GitHub Actions Inactive
@Vedaant-J
Vedaant-J temporarily deployed to gha-kumo-workflow-tests November 18, 2026 19:22 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
gha-kumo-workflow-tests — 4bbcceff Deployed Nov 18, 2026 by Vedaant-J via import #2600
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.

Make existing author checks discoverable and paired benchmarks reproducible

1 participant