Skip to content

docs(v2_reproducibility_harness): spec memo for #437 - #454

Merged
robotrocketscience merged 1 commit into
mainfrom
docs/issue-437-reproducibility-harness-spec
May 6, 2026
Merged

docs(v2_reproducibility_harness): spec memo for #437#454
robotrocketscience merged 1 commit into
mainfrom
docs/issue-437-reproducibility-harness-spec

Conversation

@yoshi280

@yoshi280 yoshi280 commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Spec memo for #437 (v2.0 reproducibility harness — aelf bench all ship-gate). No code; six decisions teed up for ratification before implementation.

What this memo decides

Six contract calls left open by the issue body:

  1. CLI shapeaelf bench subcommand vs freestanding python -m benchmarks.run. Recommendation: aelf bench subcommand inside cli.py.
  2. What "all" means — sized headline cut per adapter (LoCoMo 10 conversations, StructMemEval small_bench, MAB all four splits, etc.) vs full benchmark on every run.
  3. Canonical-numbers schemaschema_version: 2 for benchmarks/results/v2.0.0.json, with per-metric tolerance_band next to each value.
  4. Tolerance bands — relative (±X%) with 2-percentage-point absolute floor + per-metric overrides.
  5. CI shape — two-tier: nightly canonical (band-checked, can fail loudly) + PR smoke (5-row subsets, ≤2 min, blocks merge).
  6. External-dependency policy — HF datasets cached, /tmp/... dirs skip-with-status, LLM-judge runs offline-only.

What ships if ratified

  • aelf bench CLI in src/aelfrice/cli.py, dispatching to existing adapter main() functions in benchmarks/.
  • benchmarks/run.py thin dispatcher.
  • benchmarks/results/v2.0.0.json canonical artifact (calibration-pass procedure documented).
  • .github/workflows/bench-canonical.yml nightly cron + ~30 LOC PR smoke in ci.yml.
  • tests/fixtures/bench_smoke/ pinned offline fixtures (license attribution committed alongside).
  • README badge ("reproducibility: ✅ as of $DATE"), docs/COMMANDS.md aelf bench entry.

Estimated effort: ~250 LOC dispatcher + ~150 LOC tests + ~80 LOC CI + ~200 LOC docs. Adapter code unchanged.

Out of scope (deferred)

  • Hyperparameter sweeps for the v2.0 numbers themselves (separate research; this issue ships the harness only).
  • StructMemEval big_bench coverage (~10× cost; follow-up).
  • Cross-version regression tracking (v2.0.0 vs v2.1.0).
  • Public dashboard for cron history.

Test plan

  • Doc renders with valid markdown links (link-check workflow runs).
  • Reviewer reads § "Decision asks", confirms each recommendation explicitly or pushes back.
  • On ratification, this memo is moved out of the needs-spec state — implementation issue (or a slice issue) tracks the build.

Summary by Sourcery

Documentation:

  • Document the proposed CLI, benchmark scope, canonical results schema, tolerance bands, CI strategy, and external dependency policy for the v2.0 reproducibility harness in a new spec memo.

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@robotrocketscience has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 10 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e6d1c20d-c384-47f9-8bf8-3f8a62b31da8

📥 Commits

Reviewing files that changed from the base of the PR and between bc581be and 76fe07c.

📒 Files selected for processing (1)
  • docs/v2_reproducibility_harness.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/issue-437-reproducibility-harness-spec

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sourcery-ai

sourcery-ai Bot commented May 5, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a detailed specification memo for the v2.0 reproducibility harness (aelf bench all) as documentation only, defining CLI shape, benchmark scope, canonical results schema, tolerance-band policy, CI layout, and external dependency handling for future implementation.

Sequence diagram for aelf bench all canonical run

sequenceDiagram
  actor User
  participant AelfCLI
  participant BenchSubcommand
  participant BenchDispatcher
  participant MabAdapter
  participant LocomoAdapter
  participant LongMemEvalAdapter
  participant StructMemEvalAdapter
  participant AmaBenchAdapter
  participant CanonicalStore

  User->>AelfCLI: invoke_aelf_bench_all_canonical
  AelfCLI->>BenchSubcommand: route_bench_all
  BenchSubcommand->>BenchDispatcher: run_all_adapters_with_headline_cut

  BenchDispatcher->>MabAdapter: run_mab_headline
  MabAdapter-->>BenchDispatcher: mab_metrics_with_tolerance

  BenchDispatcher->>LocomoAdapter: run_locomo_headline
  LocomoAdapter-->>BenchDispatcher: locomo_metrics_with_tolerance

  BenchDispatcher->>LongMemEvalAdapter: run_longmemeval_headline
  LongMemEvalAdapter-->>BenchDispatcher: longmemeval_metrics_with_tolerance

  BenchDispatcher->>StructMemEvalAdapter: run_structmemeval_small_bench
  StructMemEvalAdapter-->>BenchDispatcher: structmemeval_metrics_with_tolerance

  BenchDispatcher->>AmaBenchAdapter: run_amabench_full
  AmaBenchAdapter-->>BenchDispatcher: amabench_metrics_with_tolerance

  BenchDispatcher->>BenchDispatcher: validate_headline_cut_matches_canonical
  BenchDispatcher->>BenchDispatcher: assemble_schema_version_2_payload
  BenchDispatcher->>CanonicalStore: write_v2_0_0_json
  CanonicalStore-->>BenchDispatcher: write_ok
  BenchDispatcher-->>User: exit_success
Loading

ER diagram for canonical results JSON schema_version_2

erDiagram
  CanonicalArtifact {
    int schema_version
    string label
    string captured_at_utc
    string git_commit
    string aelfrice_version
    string harness_version
  }

  HeadlineCut {
    string id
  }

  AdapterHeadlineCut {
    string adapter_name
    string param_key
    string param_value
  }

  AdapterResult {
    string adapter_name
  }

  MetricGroup {
    string group_name
  }

  Metric {
    string metric_name
    float value
  }

  ToleranceBand {
    string band_kind
    float band_pct
    float lower
    float upper
  }

  CanonicalArtifact ||--|| HeadlineCut : has_headline_cut
  CanonicalArtifact ||--o{ AdapterResult : has_results
  HeadlineCut ||--o{ AdapterHeadlineCut : defines_cut_for_adapter
  AdapterResult ||--o{ MetricGroup : groups_metrics
  MetricGroup ||--o{ Metric : contains_metric
  Metric ||--|| ToleranceBand : has_tolerance_band
Loading

File-Level Changes

Change Details Files
Introduce a v2.0 reproducibility harness spec memo that defines how aelf bench all should behave and how canonical benchmark results are stored and validated.
  • Document the decision points for CLI shape, benchmark coverage, canonical-results schema, tolerance bands, CI tiering, and external dependency policy.
  • Propose a thin aelf bench subcommand that dispatches to existing benchmark adapters and defines a sized-headline cut for each adapter.
  • Specify a versioned JSON schema (schema_version: 2) for benchmarks/results/v2.0.0.json, including per-metric tolerance bands and calibration guidance.
  • Describe a two-tier CI approach with a nightly canonical run and a fast PR smoke run, plus handling of HF datasets, temporary data dirs, and LLM-judge-dependent paths.
  • List downstream code, CI, and docs changes that will be required when the spec is implemented and clarify out-of-scope items.
docs/v2_reproducibility_harness.md

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added the docs label May 5, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • Consider tightening the description of the calibration-pass procedure for tolerance bands (e.g., explicit pseudo-steps or an example run sequence) so future maintainers can reproduce how lower/upper were derived without reading surrounding prose.
  • It might be helpful to specify in the canonical JSON schema how skipped adapters (e.g., missing /tmp/... data) are encoded consistently, including expected status values and how they interact with CI pass/fail, to avoid divergent interpretations during implementation.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider tightening the description of the calibration-pass procedure for tolerance bands (e.g., explicit pseudo-steps or an example run sequence) so future maintainers can reproduce how `lower/upper` were derived without reading surrounding prose.
- It might be helpful to specify in the canonical JSON schema how skipped adapters (e.g., missing `/tmp/...` data) are encoded consistently, including expected `status` values and how they interact with CI pass/fail, to avoid divergent interpretations during implementation.

## Individual Comments

### Comment 1
<location path="docs/v2_reproducibility_harness.md" line_range="181" />
<code_context>
+
+- **Hyperparameter sweeps for the v2.0 numbers themselves.** This issue ships the harness, not the calibration. The first canonical run records whatever numbers v2.0 produces; tuning is separate.
+- **Cross-version regression tracking** (`v2.0.0` vs `v2.1.0` deltas). Out of scope until a v2.1 ship-gate exists.
+- **`big_bench` StructMemEval coverage.** ~10× runtime; spec'd as a follow-up issue once the small_bench numbers are stable.
+- **Public dashboard.** A web surface for the cron history is downstream of the harness existing at all.
+- **GPU-required benchmarks.** None of the current adapters need GPU; if a future adapter does, the policy lives in that adapter's add-issue, not this one.
</code_context>
<issue_to_address>
**issue (typo):** Possible typo or inconsistency between `--bench small` and `small_bench`.

Earlier we describe StructMemEval as running with `--bench small`, but here we mention "small_bench". If that’s not a distinct identifier, please align this wording with `--bench small` for consistency.

```suggestion
- **`big_bench` StructMemEval coverage.** ~10× runtime; spec'd as a follow-up issue once the `--bench small` numbers are stable.
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.


- **Hyperparameter sweeps for the v2.0 numbers themselves.** This issue ships the harness, not the calibration. The first canonical run records whatever numbers v2.0 produces; tuning is separate.
- **Cross-version regression tracking** (`v2.0.0` vs `v2.1.0` deltas). Out of scope until a v2.1 ship-gate exists.
- **`big_bench` StructMemEval coverage.** ~10× runtime; spec'd as a follow-up issue once the small_bench numbers are stable.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Possible typo or inconsistency between --bench small and small_bench.

Earlier we describe StructMemEval as running with --bench small, but here we mention "small_bench". If that’s not a distinct identifier, please align this wording with --bench small for consistency.

Suggested change
- **`big_bench` StructMemEval coverage.** ~10× runtime; spec'd as a follow-up issue once the small_bench numbers are stable.
- **`big_bench` StructMemEval coverage.** ~10× runtime; spec'd as a follow-up issue once the `--bench small` numbers are stable.

@github-actions github-actions Bot added the attn:merge-conflict PR branch needs rebase label May 5, 2026
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown

This PR is now behind main. Rebase locally so your commit signatures stay intact:

git fetch origin && git checkout 'docs/issue-437-reproducibility-harness-spec' && git rebase origin/main
# resolve conflicts if any, then
git push --force-with-lease

Auto-rebase was removed because the bot has no signing key; rebasing as the bot strips author signatures and the required_signatures rule on main then blocks the merge. See #341.

@yoshi280

yoshi280 commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

[claim:review:Toug:2026-05-06T20:58:04Z]

Reproducibility harness — `aelf bench all` ship-gate for v2.0.

Six contract calls teed up: CLI shape, "all" definition, canonical
schema, tolerance bands, CI tiering, external-dep policy. Recommendation
includes single-CLI dispatcher over existing adapter mains, sized
headline cut, schema_v2 with per-metric tolerance bands, two-tier CI
(nightly canonical + PR smoke).

Adapters consumed unchanged: mab/locomo/longmemeval/structmemeval/amabench.
Estimated implementation: ~250 LOC dispatcher + ~150 LOC tests + ~80 LOC
CI + ~200 LOC docs.
@robotrocketscience
robotrocketscience force-pushed the docs/issue-437-reproducibility-harness-spec branch from b1a9a36 to 76fe07c Compare May 6, 2026 20:58
@robotrocketscience
robotrocketscience merged commit 76fe07c into main May 6, 2026
15 checks passed
@robotrocketscience
robotrocketscience deleted the docs/issue-437-reproducibility-harness-spec branch May 6, 2026 20:59
@yoshi280

yoshi280 commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

[release:review:Toug:2026-05-06T21:00:02Z]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants