Repository navigation
test: make the metadata parser linearity check deterministic - #4726
Merged
Daniel Meppiel (danielmeppiel) merged 2 commits intoNov 23, 2026
Merged
Conversation
The 2000-line baseline ran in about 20 ms, mostly process start-up, so host noise moved the tenfold ratio past its limit (18x in run 45002906915). Both sizes now run well above start-up cost (10k and 40k lines), their samples interleave so load hits both alike, each keeps its fastest sample, and a fourfold input must cost under 8x: linear parses measure 2-3x, while a parser made quadratic locally measured 8.3x and failed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 22, 2026 09:28
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the test-only metadata parser benchmark changes.
No open issues 🎉
What changed in this PR
This test-only PR reduces timing noise in the metadata parser scaling benchmark that flaked during #4712’s integration run. Production code is unchanged.
Changes:
- Increases input sizes to 10,000 and 40,000 lines to reduce process-startup effects.
- Interleaves five samples per size and compares the fastest timings against an 8x limit.
- Raises the subprocess timeout to 30 seconds while preserving output correctness checks.
| File | Description |
|---|---|
| tests/integration/test_public_release_metadata.py | Revises benchmark inputs, sampling, timeout, and scaling threshold; removes the unused statistics import. |
Review effort: Balanced
5 of 14 tasks
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-flake-metadata-linear
branch
November 23, 2026 09:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
tests/integration/test_public_release_metadata.py::test_metadata_parser_scales_linearlyflaked on #4712's Integration run 45002906915. It measured a ratio of 18x against a limit of 15, with a 2000-line baseline of 21 ms against 0.38 s. At 21 ms the baseline is mostly process start-up, so millisecond noise decided the ratio.The test now measures this way, with no change to production code:
install.shawk gainsfor (i = 0; i < NR / 4; i++) q++; not committed)Issue and approved scope
Issue: N/A. This is a CI flake fix that changes only the test (bug class, assigned by the P3 lead for #4712's Integration run).
Human scope-approval comment: test-only flake fix, routed by the P3 lead; no product change.
Type of change
Testing
I ran
pytest tests/integration/test_public_release_metadata.py::test_metadata_parser_scales_linearly -m benchmarkthree times through the host guard; it passed each time. With the parser made quadratic it failed once, as expected. ruff check and format pass.Changelog
## [Unreleased]inCHANGELOG.md:user-visible effect first, 25 words or fewer, ending with
(#PR);breaking changes only under upgrade notes; no Highlights; see
.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.