parity: choose harnesses faster (shared parse cache, early stop, time budget)
- The reach parse cache lives in the shared parity folder, keyed by content, so a new worktree starts warm (written atomically, other worktrees' entries kept within bounds). - A harness's reach search stops as soon as it reaches a changed file that differs in more than its `mod` declarations; partial searches are not memoized. Declaration diffs are memoized (one git show per file). - A harness whose changed dependency is outside crates/ is picked without a search (narrowing always keeps those). - After PARITY_REACH_BUDGET seconds (default 180) the remaining harnesses count every source their probes link. - crate_of is cached; no pathlib in the hot paths. Same 79 harnesses on the 19-file diff from contrib-gate-16; CPU 19.9 s cold / 16.6 s warm before, 13.1 s cold / 9.9 s warm after (Mac mini under load). parity.yml: skip the prepare_output check for heads made before #1947 (no OUTPUT_VERSION, no tool): the job runs main's workflow on the head's files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,14 @@ jobs:
|
||||
- name: The prepared output is the one the preparer's OUTPUT_VERSION says
|
||||
env:
|
||||
BASE_SHA: ${{ inputs.base }}
|
||||
run: python3 tools/prepare_output.py check --cache --base "$BASE_SHA"
|
||||
run: |
|
||||
# The job runs main's workflow on the head's files: a head made before OUTPUT_VERSION (#1947) has neither
|
||||
# the tool nor the number, so there is nothing to check.
|
||||
if [ ! -f tools/prepare_output.py ] || ! grep -q OUTPUT_VERSION crates/horizon-prepare/src/lib.rs; then
|
||||
echo "This head's preparer has no OUTPUT_VERSION: nothing to check"
|
||||
exit 0
|
||||
fi
|
||||
python3 tools/prepare_output.py check --cache --base "$BASE_SHA"
|
||||
- name: The version constants are the pinned jar's
|
||||
run: python3 tools/gen_version_consts.py --check
|
||||
- name: The harnesses this change can affect
|
||||
|
||||
Reference in New Issue
Block a user