fix: keep local crash reports distinct when filenames collide #1416

Open
NitnekLeBorgne wants to merge 2 commits from NitnekLeBorgne/Longshot-contributions:fix/crash-local-report-identities-20261117 into main
Contributor

Type: fix · Risk: low · Tested on: Linux, game-free local CLI fixtures · Needs: none

Why

crash_groups.py --files promises one report per local file, but uses only each basename as its identity. Two independently collected longshot_log.txt files in different folders therefore produce two records but only one report in their shared group, including undercounted vendor/stage totals and frame report lists. The conventional log filename is emitted by the crash-report workflow; no malformed input or game execution is needed.

The returned all-state issue corpus was searched on 2026-11-17 for crash_groups, same basename, same filename, same file name and local files; no matching issue was returned. Current official metadata and complete per-head file inventories for 331 open PRs showed no overlap in these two paths. These are observational, non-atomic reads, not a claim about hidden/deleted issues. No issue closure is claimed.

How to reproduce

Seen on: Linux, actual supported local CLI and producer-shaped public synthetic records.
Settings and switches: --files a/longshot_log.txt b/longshot_log.txt --json; no game settings or GAME_PATHS input.
Steps: Place one valid crash record in each of two different folders using the conventional log filename, then run python -I -B scripts/crash_groups.py --files a/longshot_log.txt b/longshot_log.txt --json. The public test's record() helper supplies these fixtures. The documented existing Tooling dependency was supplied explicitly, without downloading anything or calling the forge.
Expected: Two local report IDs and two records; vendor/stage/frame report counts remain consistent.
Actual: Baseline CLI exits 0 but reports one ID and two records. The same input with two distinct basenames is a passing neighbor with two IDs and two records. The added focused regression fails against baseline production with one report instead of two.

What changed

Count basenames across distinct supplied paths. Only ambiguous local labels use their supplied path; unambiguous basename labels remain unchanged. Repeating the exact same path retains its previous label and per-group deduplication. Several events in one file remain one report. No issue/API ingestion, grouping algorithm, JSON schema or network behavior is changed.

  • Production: scripts/crash_groups.py.
  • Regression coverage: tests/test_crash_groups.py, preserving the existing manual-check script style.

Both files remain Git mode 100644. The real test-then-fix full-tree pair is based directly on current main 544229a260c5f5008f241b9cf48ae6b01c1602b9 (re-read equal before publication): test-only aa986fed2c451ec4ffe61d551c242597fe9449ff, fix head 06c2f50279c25fde1d6b106da6336981d42ed140. The complete source-only tree has real Git HEAD/index; the exact source bytes, modes, patch and tree were independently reviewed.

Measurements

Nothing to measure: correctness of offline report identities, not gameplay or performance.

Flags and settings

None

Testing

Tested: Linux with actual python -I -B entry points and owned synthetic text fixtures. Strict vertical TDD observed a focused RED exit 1 (expected two reports, got one), then GREEN exit 0. The final existing test script passes 46 distinct manual check IDs, 14 newly added; these are assertions in one script, not 46 unittest methods or 14 separate CLI invocations. It covers colliding names, preserved unique names, an exact repeated path, multiple events in one file and report/vendor/stage/frame consistency. The real --files ... --json CLI now returns two records and two distinct reports, exit 0. Parent replay on the complete candidate source tree also passes all 46 checks. Actual public parser/classifier imports were used, not fabricated API responses.

The existing pinned Tooling checkout was supplied via MAGICBEAN_TOOLING, with an empty owned HOME and a whitelisted environment. Audit-wrapped focused runs deny socket events; the normal direct script was also exercised. No universal sandbox or zero-socket claim is made for all runs. An initial partial replay missing an unchanged public header is retained as a packaging error, not a product RED; the corrected complete-tree replay uses the real header without an overlay.

Fresh normal Linux qualification used python -I -B tests/run_all.py --jobs 2 --junit ... with the same environment/interpreter policy and real Git context:

  • Main @ 544229a260c5f5008f241b9cf48ae6b01c1602b9: 721 checks, 571 PASS / 42 FAIL / 108 SKIP, native exit 1.
  • This PR @ 06c2f50279c25fde1d6b106da6336981d42ed140: 721 checks, 571 PASS / 42 FAIL / 108 SKIP, native exit 1.
  • All 721 common statuses and complete failure/skip payloads agree under the same narrowly source-proven diagnostic handling already recorded for the current-base comparison: owned roots, temporary file/directory suffixes, unittest elapsed time, one GCC intermediate and one synthetic-fixture backup directory. No new normalizer was added for this patch. Assertion values, failure IDs, symbols, offsets and statuses are not masked. No new normal-runner check identity is claimed.
  • tests/test_crash_groups.py remains a named normal-runner failure in this isolated environment because the default sibling Tooling is absent. The separate 46-check direct replay explicitly supplies the existing pinned dependency and passes. Neither result is substituted for the other.
  • Tracked source bytes/modes were unchanged and the owned process group was absent at completion. The protected repository instruction file is omitted from these exports: source-only qualification is not literal-checkout or hosted-CI equivalence.

The 42 normal failures also observed on current main are named here as the template permits; the normal suite is not green:

  • tests/test_bug_report.py
  • tests/test_bug_report_defaults.py
  • tests/test_cpu_report.py
  • tests/test_crash_groups.py
  • tests/test_crt_options.py
  • tests/test_damage_debug_menu.py
  • tests/test_discover.py
  • tests/test_display_startup_failure.py
  • tests/test_dlss_feature_size.py
  • tests/test_failed_compile_keeps_objects.py
  • tests/test_framegen_preset.py
  • tests/test_guest_imported.py
  • tests/test_hardware_report.py
  • tests/test_hud_layout_row.py
  • tests/test_invalidate_vcore.py
  • tests/test_lift_lookups.py
  • tests/test_link_skip.py
  • tests/test_linux_pressure.py
  • tests/test_linux_update.py
  • tests/test_longshot_saves.py
  • tests/test_mirror_budget.py
  • tests/test_missing_nup.py
  • tests/test_mods_size_table.py
  • tests/test_pending_guest_import.py
  • tests/test_pipeline_play_cache.py
  • tests/test_present_thread.py
  • tests/test_profiling_mode.py
  • tests/test_readback_timeout_source.py
  • tests/test_renderer_new_handler.py
  • tests/test_rumble_menu.py
  • tests/test_run_all_changed.py
  • tests/test_slow_frames.py
  • tests/test_switch_table.py
  • tests/test_target_image_pool.py
  • tests/test_tested_configurations.py
  • tests/test_upscaler_round_trip.py
  • tests/test_upscaler_rows.py
  • tests/test_vcore_escape.py
  • tests/test_vk_occlusion_queries.py
  • tests/test_vk_swapchain_compat.py
  • tests/test_walk.py
  • tests/test_walk_key.py

Not tested: Windows execution, full SDK/release installation, gameplay, GPU/driver behavior or hosted-CI equivalence. This is platform-neutral local report-label logic; no Windows-native result is claimed. Hosted checks are tracked separately; ready is not approval, full CI PASS or merge eligibility.

Must be tested: None additional for this two-file local contributor-tool change. The normal-runner exception is limited to the named and compared current-main failures above, not an unknown comparison or a new failure.

Risks

What could break: Consumers assuming every local report ID is a basename will now see the supplied path when names collide. Unique names keep their old labels; forge issue IDs and their ingestion remain unchanged. Exact supplied-path identity is retained, not a new physical-file/symlink canonicalization policy.
Turning it off: Revert the fix and associated test commit.
Compatibility: No game runtime, saves, options, cache, shader or ABI changes; no GAME_PATHS directory is touched and no game run is claimed.

Checklist

The normal runner is still exit 1, with its named current-main failures using the template's explicit exception. Tracker/ownership checks and original standard-library GPL-3.0-or-later diff provenance are recorded. No third-party, decompiled/generated game content or incompatible dependency is introduced.

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.

No host C/C++, shader, game switch or visible-game change applies.

**Type:** fix · **Risk:** low · **Tested on:** Linux, game-free local CLI fixtures · **Needs:** none ## Why `crash_groups.py --files` promises one report per local file, but uses only each basename as its identity. Two independently collected `longshot_log.txt` files in different folders therefore produce two records but only one report in their shared group, including undercounted vendor/stage totals and frame report lists. The conventional log filename is emitted by the crash-report workflow; no malformed input or game execution is needed. The returned all-state issue corpus was searched on 2026-11-17 for `crash_groups`, `same basename`, `same filename`, `same file name` and `local files`; no matching issue was returned. Current official metadata and complete per-head file inventories for 331 open PRs showed no overlap in these two paths. These are observational, non-atomic reads, not a claim about hidden/deleted issues. No issue closure is claimed. ## How to reproduce **Seen on:** Linux, actual supported local CLI and producer-shaped public synthetic records. **Settings and switches:** `--files a/longshot_log.txt b/longshot_log.txt --json`; no game settings or GAME_PATHS input. **Steps:** Place one valid crash record in each of two different folders using the conventional log filename, then run `python -I -B scripts/crash_groups.py --files a/longshot_log.txt b/longshot_log.txt --json`. The public test's `record()` helper supplies these fixtures. The documented existing Tooling dependency was supplied explicitly, without downloading anything or calling the forge. **Expected:** Two local report IDs and two records; vendor/stage/frame report counts remain consistent. **Actual:** Baseline CLI exits 0 but reports one ID and two records. The same input with two distinct basenames is a passing neighbor with two IDs and two records. The added focused regression fails against baseline production with one report instead of two. ## What changed Count basenames across distinct supplied paths. Only ambiguous local labels use their supplied path; unambiguous basename labels remain unchanged. Repeating the exact same path retains its previous label and per-group deduplication. Several events in one file remain one report. No issue/API ingestion, grouping algorithm, JSON schema or network behavior is changed. - Production: `scripts/crash_groups.py`. - Regression coverage: `tests/test_crash_groups.py`, preserving the existing manual-check script style. Both files remain Git mode `100644`. The real test-then-fix full-tree pair is based directly on current main `544229a260c5f5008f241b9cf48ae6b01c1602b9` (re-read equal before publication): test-only `aa986fed2c451ec4ffe61d551c242597fe9449ff`, fix head `06c2f50279c25fde1d6b106da6336981d42ed140`. The complete source-only tree has real Git HEAD/index; the exact source bytes, modes, patch and tree were independently reviewed. ## Measurements Nothing to measure: correctness of offline report identities, not gameplay or performance. ### Flags and settings None ## Testing **Tested:** Linux with actual `python -I -B` entry points and owned synthetic text fixtures. Strict vertical TDD observed a focused RED exit 1 (expected two reports, got one), then GREEN exit 0. The final existing test script passes 46 distinct manual check IDs, 14 newly added; these are assertions in one script, not 46 unittest methods or 14 separate CLI invocations. It covers colliding names, preserved unique names, an exact repeated path, multiple events in one file and report/vendor/stage/frame consistency. The real `--files ... --json` CLI now returns two records and two distinct reports, exit 0. Parent replay on the complete candidate source tree also passes all 46 checks. Actual public parser/classifier imports were used, not fabricated API responses. The existing pinned Tooling checkout was supplied via `MAGICBEAN_TOOLING`, with an empty owned HOME and a whitelisted environment. Audit-wrapped focused runs deny socket events; the normal direct script was also exercised. No universal sandbox or zero-socket claim is made for all runs. An initial partial replay missing an unchanged public header is retained as a packaging error, not a product RED; the corrected complete-tree replay uses the real header without an overlay. Fresh normal Linux qualification used `python -I -B tests/run_all.py --jobs 2 --junit ...` with the same environment/interpreter policy and real Git context: - Main @ `544229a260c5f5008f241b9cf48ae6b01c1602b9`: 721 checks, 571 PASS / 42 FAIL / 108 SKIP, native exit 1. - This PR @ `06c2f50279c25fde1d6b106da6336981d42ed140`: 721 checks, 571 PASS / 42 FAIL / 108 SKIP, native exit 1. - All 721 common statuses and complete failure/skip payloads agree under the same narrowly source-proven diagnostic handling already recorded for the current-base comparison: owned roots, temporary file/directory suffixes, unittest elapsed time, one GCC intermediate and one synthetic-fixture backup directory. No new normalizer was added for this patch. Assertion values, failure IDs, symbols, offsets and statuses are not masked. No new normal-runner check identity is claimed. - `tests/test_crash_groups.py` remains a named normal-runner failure in this isolated environment because the default sibling Tooling is absent. The separate 46-check direct replay explicitly supplies the existing pinned dependency and passes. Neither result is substituted for the other. - Tracked source bytes/modes were unchanged and the owned process group was absent at completion. The protected repository instruction file is omitted from these exports: source-only qualification is not literal-checkout or hosted-CI equivalence. The 42 normal failures also observed on current main are named here as the template permits; the normal suite is **not green**: - `tests/test_bug_report.py` - `tests/test_bug_report_defaults.py` - `tests/test_cpu_report.py` - `tests/test_crash_groups.py` - `tests/test_crt_options.py` - `tests/test_damage_debug_menu.py` - `tests/test_discover.py` - `tests/test_display_startup_failure.py` - `tests/test_dlss_feature_size.py` - `tests/test_failed_compile_keeps_objects.py` - `tests/test_framegen_preset.py` - `tests/test_guest_imported.py` - `tests/test_hardware_report.py` - `tests/test_hud_layout_row.py` - `tests/test_invalidate_vcore.py` - `tests/test_lift_lookups.py` - `tests/test_link_skip.py` - `tests/test_linux_pressure.py` - `tests/test_linux_update.py` - `tests/test_longshot_saves.py` - `tests/test_mirror_budget.py` - `tests/test_missing_nup.py` - `tests/test_mods_size_table.py` - `tests/test_pending_guest_import.py` - `tests/test_pipeline_play_cache.py` - `tests/test_present_thread.py` - `tests/test_profiling_mode.py` - `tests/test_readback_timeout_source.py` - `tests/test_renderer_new_handler.py` - `tests/test_rumble_menu.py` - `tests/test_run_all_changed.py` - `tests/test_slow_frames.py` - `tests/test_switch_table.py` - `tests/test_target_image_pool.py` - `tests/test_tested_configurations.py` - `tests/test_upscaler_round_trip.py` - `tests/test_upscaler_rows.py` - `tests/test_vcore_escape.py` - `tests/test_vk_occlusion_queries.py` - `tests/test_vk_swapchain_compat.py` - `tests/test_walk.py` - `tests/test_walk_key.py` **Not tested:** Windows execution, full SDK/release installation, gameplay, GPU/driver behavior or hosted-CI equivalence. This is platform-neutral local report-label logic; no Windows-native result is claimed. Hosted checks are tracked separately; ready is not approval, full CI PASS or merge eligibility. **Must be tested:** None additional for this two-file local contributor-tool change. The normal-runner exception is limited to the named and compared current-main failures above, not an unknown comparison or a new failure. ## Risks **What could break:** Consumers assuming every local report ID is a basename will now see the supplied path when names collide. Unique names keep their old labels; forge issue IDs and their ingestion remain unchanged. Exact supplied-path identity is retained, not a new physical-file/symlink canonicalization policy. **Turning it off:** Revert the fix and associated test commit. **Compatibility:** No game runtime, saves, options, cache, shader or ABI changes; no GAME_PATHS directory is touched and no game run is claimed. ## Checklist The normal runner is still exit 1, with its named current-main failures using the template's explicit exception. Tracker/ownership checks and original standard-library GPL-3.0-or-later diff provenance are recorded. No third-party, decompiled/generated game content or incompatible dependency is introduced. ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. No host C/C++, shader, game switch or visible-game change applies.
Assisted-by: Hermes Agent (OpenAI GPT-6.1-sol)
Co-Authored-By: Claudia (OpenAI GPT-6.1-sol)
fix: retain distinct crash reports with colliding basenames
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
06c2f50279
Assisted-by: Hermes Agent (OpenAI GPT-6.1-sol)
Co-Authored-By: Claudia (OpenAI GPT-6.1-sol)
Collaborator

Possibly related, for context:

  • PR #1288 feat(scripts): crash_groups.py lists the crash reports in named groups, the largest first — Introduced crash_groups.py; this PR fixes its local-file identity behavior.
  • PR #1316 fix(coverage): handle all-zero calls in C-size reports — Open PR also edits offline report tooling, but it changes a separate script and has no clear overlap.
Possibly related, for context: - PR #1288 feat(scripts): crash_groups.py lists the crash reports in named groups, the largest first — Introduced crash_groups.py; this PR fixes its local-file identity behavior. - PR #1316 fix(coverage): handle all-zero calls in C-size reports — Open PR also edits offline report tooling, but it changes a separate script and has no clear overlap.
NitnekLeBorgne changed title from WIP: fix: keep local crash reports distinct when filenames collide to fix: keep local crash reports distinct when filenames collide 2026-11-17 13:43:00 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/crash-local-report-identities-20261117:NitnekLeBorgne-fix/crash-local-report-identities-20261117'
git switch 'NitnekLeBorgne-fix/crash-local-report-identities-20261117'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1416
No description provided.