Skip to content

boot_trace: report discontinuities in numbered D3D12 calls - #6543

Merged
shayderrr merged 1 commit into
ProjectLeonida:mainfrom
Solthodox:fix/boot-trace-sequence-breaks
Nov 23, 2026
Merged

shayderrr merged 1 commit into
ProjectLeonida:mainfrom
Solthodox:fix/boot-trace-sequence-breaks

Conversation

@Solthodox

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue: first-boot trace discontinuities.

Depends on: #6025 (textual overlap in the report; no code dependency).

What and why

On main, a synthetic log with calls #1 and #3 reports two calls but does not flag the discontinuity. Now the text report also says expected #2, observed #3. JSON exposes the total number of discontinuities and at most --limit expected/observed pairs. The sequence starts at 1, then follows the last number actually seen; a restart or duplicate is one boundary, not evidence that calls were lost. Every parsed event still contributes to the outcome counts. Continuous logs keep the same text output. No change to runtime logging or data-sharing rules.

Tested

AI-assisted: yes.

  • No game data, keys or decryption, including in quoted diagnostics.
  • Translator contract: not applicable.

Keep every observed call in the report and show bounded expected/observed pairs.
A break marks a boundary in the input, not a GPU failure or a count of missing calls.
@kapitche

Copy link
Copy Markdown
Collaborator

Tested dd96132 merged with main 86a7807 on Linux/Python 3.12.16: pass

Merge was clean (tools/boot_trace.py, tests/test_boot_trace.py, docs/boot.md).

  • python -I tests/test_boot_trace.py: Ran 22 tests, OK. python -I tests/test_dev_boot_trace.py (the dev.py entry for the tool): OK.
  • Negative control (tools/boot_trace.py restored from upstream/main, tests from the PR): Ran 22 tests, FAILED (errors=3): test_d3d12_summary and both limits of test_sequence_breaks_count_boundaries_and_limit_examples. PR version restored afterwards.

Diff read: parse_d3d12 expects #1 first and then last observed + 1, counts each mismatch once in sequence_break_count and keeps up to --limit expected/observed pairs; the text report prints the block only when there is a break. This matches the new paragraph in docs/boot.md. The test covers a gap, a restart to #1, a duplicate #1 and a non-trace line in between, with the limit applied to the examples but not the count.

@Racurs156

Copy link
Copy Markdown

AI-assisted Windows verification with CPython 3.12.14 and synthetic traces. At exact head dd96132, python -I -B tests/test_boot_trace.py passed 21/21. The new sequence-break test failed against the parent parser (1cc6e3c) at both tested limits; the parent's own suite passed 20/20.

The full patch also applied cleanly to main dde82f2. There, the boot trace suite passed 22/22 and the scripts/dev.py boot-trace integration suite passed 5/5. No game files or GPU were used.

@shayderrr shayderrr 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.

Summary
tools/boot_trace.py::parse_d3d12 now records sequence breaks in numbered D3D12 calls, treating a restart or duplicate as one boundary; format_text prints expected #2, observed #3 and JSON exposes the count plus up to --limit pairs. docs/boot.md and test_sequence_breaks_count_boundaries_and_limit_examples cover it.

Why merge
Makes missing calls visible in a boot trace instead of only reporting the number parsed, with continuous logs unchanged. Synthetic-input regression with 21 tests passing.

Verdict: Approve

@shayderrr

Copy link
Copy Markdown
Collaborator

Summary
tools/boot_trace.py::parse_d3d12 now records sequence breaks in numbered D3D12 calls, treating a restart or duplicate as one boundary; format_text prints expected #2, observed #3 and JSON exposes the count plus up to --limit pairs. docs/boot.md and test_sequence_breaks_count_boundaries_and_limit_examples cover it.

Why merge
Makes missing calls visible in a boot trace instead of only reporting the number parsed, with continuous logs unchanged. Synthetic-input regression with 21 tests passing.

Verdict: Approve

@shayderrr
shayderrr merged commit 46492b0 into ProjectLeonida:main Nov 23, 2026
0 of 2 checks passed
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.

4 participants