Skip to content

UC-03 : allow dirty trees for local-only runs - #83

Merged
ev-br merged 1 commit into
benchx-dev:mainfrom
ev-br:dirty-trees-docs
Oct 29, 2026
Merged

ev-br merged 1 commit into
benchx-dev:mainfrom
ev-br:dirty-trees-docs

Conversation

@ev-br

@ev-br ev-br commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

asv has an unpleasant UI cut of ignoring uncommitted changes. UC-03 has an open question on whether benchx comparisons should allow dirty trees or refuse. For one-off/local-only uses, allowing them feels useful: if I work on a PR and want to check the current variant against the baseline, do I strictly need to commit? The UC-03 workflow sketch is $spin bench --compare main $BENCHMARK

So this PR works towards allowing this: detect a dirty tree, label it as such, mark the comparison as local-only.

This is a design doc only change, plus a plan for implementation. If we agree with the doc edits, I'll remove the plan and submit a follow-up PR with an implementation.

A `revisions` comparison may now have a dirty side. It is labeled
local-only, names the sides that are not clean, and is never promoted
into tracked history, as the `single-run`, `variants` and `environments`
profiles already do.

- UC-03: §10 allows dirty trees and lists what still fails (a side with
  an unknown dirty state, a tree that changes during the run, a
  separately recorded suite that is not one file throughout); §4 and §8
  follow; §12 question 3 is resolved.
- Result schema: §5.5 drops the `clean-tree` invariant from `revisions`,
  adds `one-benchmark-tree`, and defines a benchmark recorded separately
  from the subject; §4.1 says the runner adds the dirty warnings.
- Comparator §3 and system decomposition §3.4 and §6 follow.

This resolves the inconsistency between schema §4.1, which allows
comparing an uncommitted change against HEAD, and §5.5, which did not.
Allowing dirty trees by default is subject to review. The prototype docs
(prototype-scope, prototype-design, prototype/README) still describe the
old refusal and change together with the code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ev-br

ev-br commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

WDYT @MaanasArora ?

@ev-br

ev-br commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

The implementation is in this branch https://github.com/ev-br/benchx/tree/dirty-trees-code. It's stacked on top of gh-81, so will need sorting out the "stack" and then a rebase.

@MaanasArora MaanasArora left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, I read through the design changes and skimmed the plan! I think it makes a lot of sense to allow dirty trees for revisions - I've been bit by the same thing with asv indeed. This PR does minimal plumbing which makes it even more appealing!

I didn't find any issues so far, so no objections to merging and iterating.

@ev-br
ev-br merged commit 2d62919 into benchx-dev:main Oct 29, 2026
2 checks passed
@ev-br

ev-br commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the review @MaanasArora ! I merged the design doc change as approved, and here's a follow-up with an actual implementation: #89

ev-br pushed a commit to ev-br/benchx that referenced this pull request Oct 29, 2026
This is a follow-up PR:
- benchx-dev#83 adds the design docs
- this PR is branched off benchx-dev#81, and
  needs a rebase once that one lands
ev-br pushed a commit to ev-br/benchx that referenced this pull request Nov 1, 2026
This is a follow-up PR:
- benchx-dev#83 adds the design docs
- this PR is branched off benchx-dev#81, and
  needs a rebase once that one lands
ev-br pushed a commit to ev-br/benchx that referenced this pull request Nov 1, 2026
This is a follow-up PR:
- benchx-dev#83 adds the design docs
- this PR is branched off benchx-dev#81, and
  needs a rebase once that one lands
ev-br pushed a commit to ev-br/benchx that referenced this pull request Nov 3, 2026
This is a follow-up PR:
- benchx-dev#83 adds the design docs
- this PR is branched off benchx-dev#81, and
  needs a rebase once that one lands
ev-br pushed a commit to ev-br/benchx that referenced this pull request Nov 5, 2026
This is a follow-up PR:
- benchx-dev#83 adds the design docs
- this PR is branched off benchx-dev#81, and
  needs a rebase once that one lands
ev-br pushed a commit to ev-br/benchx that referenced this pull request Nov 5, 2026
This is a follow-up PR:
- benchx-dev#83 adds the design docs
- this PR is branched off benchx-dev#81, and
  needs a rebase once that one lands
ev-br pushed a commit to ev-br/benchx that referenced this pull request Nov 5, 2026
This is a follow-up PR:
- benchx-dev#83 adds the design docs
- this PR is branched off benchx-dev#81, and
  needs a rebase once that one lands
ev-br pushed a commit to ev-br/benchx that referenced this pull request Nov 5, 2026
This is a follow-up PR:
- benchx-dev#83 adds the design docs
- this PR is branched off benchx-dev#81, and
  needs a rebase once that one lands
ev-br added a commit that referenced this pull request Nov 6, 2026
* ENH: allow dirty trees in local comparisons

This is a follow-up PR:
- #83 adds the design docs
- this PR is branched off #81, and
  needs a rebase once that one lands

* TST: ignore dirty-tree warnings in the setup_scope tests

The two asv tests that came in with setup_scope assert the exact quality
warnings of a result. With dirty trees allowed in local comparisons, a
result also carries the dirty-* warnings the test earns by running in a
tree with uncommitted files, so compare through warnings_of(), as the
collector and pyperf tests do.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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