Repository navigation
test(perf): count budgets for authenticated cold and warm installs, outdated and update - #5345
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…oken-first) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ed installs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
# Conflicts: # tests/integration/test_perf_count_budgets.py
There was a problem hiding this comment.
🟡 Changes recommended
The performance-budget tests can pass despite failed dependency comparisons or anonymous execution, so they need explicit assertions for the up-to-date result and ten git.ls-remote calls in both authenticated journeys.
2 open issues
What changed in this PR
Extends the count-based performance checks introduced in #5338, advancing #5339 with four additional journeys without changing product code.
Changes:
- Adds authenticated cold/warm installs,
outdated, and no-changeupdatejourneys using the existing offline tree-10 fixture. - Records per-counter budgets with measured baselines, bounded slack, and PR provenance.
- Expands the shared journey registry so existing budget validation covers all seven journeys.
| File | Description |
|---|---|
tests/perf/count_budgets.json |
Adds counter budgets for the four new journeys. |
tests/integration/test_perf_count_budgets.py |
Runs the new commands and authenticated installs with instrumentation. |
tests/fixtures/perf/count_budgets.py |
Registers the four journeys for shared budget validation. |
Review effort: Balanced
…nters Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…_digest are counted Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The new performance-budget tests lack assertions confirming the token-first authentication path and successful remote-ref comparisons, allowing unintended or failed journeys to pass as performance improvements.
2 open issues
Review effort: Balanced
realpath lstat()s every path component, so lstat/realpath counts tracked pytest's basetemp depth, which differs between CI jobs (xdist adds popen-gwN/). The world now lives at /tmp/apm-perf-<random>. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…again after #5330) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ate; add the authenticated-clone fallback cell Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…journeys prove their path Folds Copilot threads on #5345: an inherited APM_GITHUB_AUTH_FIRST=1 no longer moves the anonymous journeys onto the token-first path; outdated must report all dependencies up-to-date; both auth journeys must probe refs with git ls-remote once per package. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The counter-hook test inherits an e2e classification without exercising the installed CLI and should move to a component-classified module while preserving its performance promise marker.
1 open issue
4 resolved since last review
Review effort: Balanced
Integration run 45416492731 observed outdated lstat 125 and realpath 31 against the Full Suite job's 109 and 28; budget the max across jobs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Description
Perf promise engine layer 1, family 2, on top of #5338 and #5340. It adds count budgets for four more journeys, two oracle cells, and depth-independent path counters.
update -yon that project, with nothing newer to take.GITHUB_APM_PATwithAPM_GITHUB_AUTH_FIRST=1, so the token-first git path private hosts take is budgeted as well as the anonymous one. This matches Journey Hunt's benchinstall-*-authjourneys (test(perf): authenticated install journeys and deterministic counters in the bench #5340).Every cell asserts its command's exit code 0 and lockfile, then checks the counters against
tests/perf/count_budgets.json.It also adds three oracle cells:
Hash counters see
hashlib.newandfile_digest. test(perf): authenticated install journeys and deterministic counters in the bench #5340 wrapshashlib.new; this cell checks exact counts: 2 objects and 1003 bytes.The fallback half of perf(install): in-process pinned fetch #5330's engagement oracle. test(perf): authenticated install journeys and deterministic counters in the bench #5340 asserts that an anonymous cold install never spawns
git clone. This cell asserts that an authenticated cold install clones with git (inprocess_fetch._gateadmits only anonymous requests). Measured: 20 clones against 0 anonymous.Each journey took the path it budgets.
outdatedmust report all dependencies up-to-date (a failed comparison exits 0 with anunknownrow), and both auth journeys must show 10git ls-remoteref probes. Anonymous journeys pinAPM_GITHUB_AUTH_FIRST=0, so an inherited setting cannot move them onto the token-first path.Path counters are depth-independent.
realpathlstat()s every path component, and pytest's basetemp is one level deeper under xdist (popen-gwN/). That made lstat and realpath counts drift between CI jobs: Integration sawoutdatedlstat 161 against a budget of 153. The world now lives at a fixed depth,/tmp/apm-perf-<random>.New rows only, with
pr: #5345(budget = measured + max(1, 5%)). The cold, warm and no-op rows stay as #5340 cut them. Their tighten notes (for example install-cold lstat 11024 against budget 81282, after #5325/#5333) wait for the full re-cut once the perf queue lands, per the regent.Measured in CI run 45409372587 (main 784c9da + #5340):
Side finding: since #5330, the token-first path costs 20
git clone, 10git ls-remoteand +30 HTTP requests per cold install, against 0 clones and 20 requests for anonymous.Issue and approved scope
Issue: Refs #5339
Human scope-approval comment: CEO order, standing rule 29, and regent S80 (budgets cover both auth modes), relayed by the QL VP. Test-only.
Does this PR complete the issue, or what remains? Partial. Remaining families: audit + prune + uninstall, and frozen. Then layer 3 catalog rows and layer 2 (nightly CPU, wired by PERF).
Type of change
Testing
Lifecycle scratch runs (Linux):
Changelog
changelog.d/<pr>.<section>.md, holdingone line: user-visible effect first, 25 words or fewer, ending with
(#PR); breaking changes only under upgrade notes; no Highlights; nonew lines under
## [Unreleased]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
N/A: no
req-XXXbehaviour changes.