Skip to content

fix(tools): qualify title comparisons with recorded run context - #776

Draft
Thimo188 wants to merge 35 commits into
mainfrom
upstream-pr/22263
Draft

Thimo188 wants to merge 35 commits into
mainfrom
upstream-pr/22263

Conversation

@Thimo188

@Thimo188 Thimo188 commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Imported from boykopovar/AnyPS5#22263, originally opened by IvanFogel.

Source commit: 5003dc56fa860e165ae99afa62a90f4994796bb8. The import branch preserves this fetched upstream PR snapshot. The description and validation below are copied from upstream; no new code changes or test runs were made for this import. Original reviews, discussions, and attachments remain at the linked upstream PR.


What

On November 29, this branch incorporated boykopovar#22260 at 200ee3f56ed1 and main d77ab2d7a25b. It carries the current native provenance rules from boykopovar#22260. An ordinary JSON message next to valid timing records now leaves their build identity intact, so a matching sample remains eligible for performance bisection. An array explicitly tagged as a native timing record still makes the sample ineligible. Prerequisite fix

Qualify title-run comparisons using the context actually recorded: content version, OS/CPU/GPU/driver, effective per-title requested duration, complete cold/warm sequence, driver-cache class and missing-content set. Show differing or missing fields and suppress directional outcome claims when that context differs or is unknown. Retain last-run numeric pairs and worst observed outcomes for inspection. Native runtime provenance stays a separate dimension.

This is a two-file follow-up on boykopovar#22260, with its complete prerequisite history and Draft integration gates. Matching recorded fields does not establish scene, environment, resolution or native binary equivalence.

Tested

At 5003dc56fa86 on native Linux, all 865 registered Python tooling CTests passed. Running the title-run and performance-bisect test files directly produced 418 passes and 8 Windows-only skips. I also ran the same two public CLI fixtures against the old branch merged with current main and against this head. The old branch incorrectly rejected the matching 60 fps sample after ordinary JSON log output. This head accepted it and continued to reject a protocol-tagged malformed record. The full source tree matches an independent composition of main, the existing branch, and its current prerequisites.

November 23 maintenance: exact head 1aaacce retains submitted 9c22395, fresh main 3492c18, and complete refreshed prerequisite histories (boykopovar#22260 at 8058308). All 815 registered source-tools Python CTests pass on Linux in 150.27s at two workers, with zero CTest-level failures/skips; maximum 25.574s. This is the actual source-tools inventory selected by exact source Python-script paths. Python-driven relinker/core wrappers requiring compiled artifacts are outside this selection. Existing individual platform-specific Python skips remain. Current-main conventions, the complete PR body and the committed diff pass their checks.

The semantic merge retains main's BOM handling, duplicate/nonfinite JSON rejection, catalog/comparison validation, bounded metric types and finite arithmetic, string-only reported hardware fields, and stricter bisect identity text, including CPU. Native commit/dirty evidence is captured before rejecting malformed metrics: a filtered interval cannot erase a conflicting runtime identity. Nonobjects and recognizably malformed native rows retain the existing qualification/bisect rejection. Prefix decoding keeps the indexed cursor and handles recursive-decoder rejection without recovering an identity from broken JSON.

Three owned real-CLI integration controls run in a separate registered CTest (30-second timeout), reusing the existing real-process fixture without changing their assertion/control ASTs. They pass: a rejected-metric row still contributes conflicting native evidence while valid FPS stays readable; a duplicate native commit field makes qualification unknown and bisect reject; and a deeply malformed native row keeps valid metrics readable while remaining unqualified. The duplicate-only regression reproduced matched instead of unknown on the old submitted parent, then passed with main's strict loader integrated. These fixture processes exercise public orchestration and protocol handling; they do not establish real native/GPU/title execution.

All new reviews were compared with the exact November 22 evening final snapshot. They report no verified blocker; approvals and source-only reviews belong to the previously submitted heads and are not fresh approvals of this new revision. Draft, parent dependencies and inherited external order/review gates remain. No author agreement or all-peer clearance is invented. Native Windows/macOS, actual GPU/title runs and performance measurements were not rerun here. Earlier results below remain pinned to their original revisions.

On Linux at 9c223954fb66 against main 8c254da48beb, all 807 registered CTests that run Python scripts under tools/ passed. The suite includes the title-run and performance-bisect tests. Some individual cases require another operating system.

I reproduced both provenance errors through the title-run command and the performance bisect. A damaged summary record could let an invalid run qualify, while an unrelated truncated JSON log could reject a valid run. The new tests cover both outcomes, including bracketed log prefixes and older summaries without a format field. The parser uses the available top-level fields to recognize a damaged record. Fragments that contain no identifiable protocol fields cannot establish its origin. Review on #22263 · Review on #22267

On November 22, I integrated main 70cca973b49f into 94c82b0170fa. All 143 selected Linux CTests passed, including every changed Python test module. The summary reader now retains main’s LF-only JSONL record boundaries and this branch’s native identity and error reporting. A combined fixture preserved a GPU name containing U+0085, U+2028 and U+2029 and counted both an invalid JSON row and a non-object row. The old submitted head split the GPU name.

On November 21, all 142 selected Linux CTests passed on ce85a047131c with main 6f18d49a833e. The selection includes the registered title-run tests and each test module changed by this PR. Some individual Python cases require another platform. Conventions and the committed diff checks passed. The test run includes the shared bisect fixture merged in boykopovar#22175.

On November 20 I integrated main 3a1b27b9d2, boykopovar#22175 at 506613cc9c, boykopovar#22260 at cc28a49e01 and this submitted head at dcd0b21b55 in a local checkout (fd07f8005b). Git combined the branches without manual resolutions. All 142 selected Linux CTests passed on the composition, covering title comparison context, native provenance, both bisect test suites and the peer's trace, sample and reporting tools. All 12 test methods added or updated by this PR have identical ASTs in the combined suite. boykopovar#22260 and the proposed landing order remain open. The submitted head also passed the hosted Windows relinker and macOS relinker jobs. The local composition was exercised on CachyOS Linux.

Refresh at dcd0b21b55 against main 87ee89b036. The new end-to-end bisect fixture now emits the clean native commit required by the provenance checks. The duplicate recipe-field tests from main are retained. On Linux, 332 of 339 tests passed across 5 relevant Python modules, with 7 platform skips and zero failures. Conventions and whitespace passed. The hosted Windows and macOS results are linked above.

Current tool-branch refresh, 2026-11-17: exact head bf93dd3dbb25c1c060d6e26a39064b648068607b, integrating tested main cb28e72762dad4d5b5448f30c5a7ebad3d0af56c and the complete refreshed prerequisite history. Merged boykopovar#22245 runtime staging and boykopovar#22241 generic bisect tests are preserved. The bisect EOF union retains every previous and upstream assertion with one final unittest.main; short-observation also retains both the auxiliary-runtime import and all unranked incomplete handling.

The merged staging preflight requires allocator sidecars in controlled fake builds. The fixture now supplies nonempty Linux/macOS payload names so the original CLI scenarios execute; those bytes are not loaded native shared libraries. Native provenance, malformed-record handling, context/machine qualification, short-observation classification and bisect admission gates are unchanged. Independent AST/object proof and maintenance review verified those boundaries and all old assertions; nine bounded integration/regression checks passed independently.

All 697/697 registered Python-tools CTests pass, with zero CTest-level failures/skips and maximum 25.6113s per selected test. Existing embedded unittest platform skips remain explicit in the qualification reports. Current conventions and whitespace pass. Pinned four-candidate qualification results. No native Windows/macOS, real title, GPU or native-library load is established by these Linux fixtures. Later main has separate clean merge-tree/source-scope evidence, not a relabeled full-suite run.

Canonical overlap still exits2 with exact shared-file/manual dispositions retained; no all-peer clearance or outside-author agreement is claimed. That earlier run left the external fixture, platform and landing-order questions open. The November 20 results above cover the composition on Linux and hosted checks on the submitted head. boykopovar#22241 and boykopovar#22245 are now merged rather than pending prerequisites.

Earlier pinned validation and review dispositions

Linux/CachyOS at exact head af1ed2474407ae13ed425692e0f19b6af21dd02e, direct parent 9d3a0f50156c8e4445d2d19f6ac278ff18b0bde3 from boykopovar#22260.

  • Before implementation, new public comparison controls produced18 expected assertion failures. Separate real CLI/subprocess evidence reproduced an unqualified changed-content comparison while both native identities matched their source.
  • A real CLI fixture now retains the synthetic10-to-60FPS pair, identifies contentVersion as differing, keeps native provenance matched, and emits no Improvements claim. These are fixture metrics, not a title/GPU speed result.
  • Direct title-run discovery:210 cases,204 passed and six platform skips. Adjacent performance suites:153 cases,151 passed and two skips. Release packaging:117 cases,109 passed and eight skips. All696 registered Python-tools CTests pass, with zero CTest-level failures/skips (107.63s total; maximum25.011s).
  • Controls vary each recorded field independently; cover unknown legacy/empty values, absent versus known-empty content sets, set normalization, effective per-title budget, complete cache sequence, same-context directions and metric-only legacy records. Independent review found no Critical/Important/actionable Minor issue and independently passed24 focused tests, including the real CLI fixture. Conventions and whitespace pass.

Canonical exact-head overlap examined1,666 open heads and16 shared scopes against main 9eae4b460d90a45aa7806d6730354f385eebbdbe; it exits2. No new comparison-context source/test collision was reported. Inherited bisect EOF entrypoint collisions remain with boykopovar#22175/boykopovar#22241; boykopovar#20315 has separately scoped trace documentation. Current boykopovar#19124 is mechanically comparable after its main merge, but its synthetic bisect fixture still needs the native identity composition documented in boykopovar#22260. No external author agreement or complete composed bisect-loop pass is claimed.

The candidate merges mechanically with that later main. Relevant comparison inputs/rules remain unchanged; later main separately increases the existing paths-test timeout, and those newer timeout changes were not part of this exact candidate's test run. Native Windows/macOS, commercial titles, GPU runs, scene/configuration equivalence and a causal performance claim remain unmeasured. Prospective short-observation outcomes are a separate follow-up.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: fix(tools): qualify title runs with native build provenance boykopovar/AnyPS5#22260
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Codex added 30 commits November 17, 2026 10:02
@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 774 tools/tests/test_title_run_summary_provenance.py
tools/title_run_provenance.py
PR 777 tools/tests/test_title_run_summary_provenance.py
tools/title_run_provenance.py
PR 781 tools/tests/test_title_run_summary_provenance.py
tools/title_run_provenance.py
PR 787 tools/tests/test_title_run_summary_provenance.py
tools/title_run_provenance.py
PR 1014 tools/title_run_provenance.py

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.

1 participant