fix: keep local crash reports distinct when filenames collide #1416
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1416
Loading…
Reference in a new issue
No description provided.
Delete branch "NitnekLeBorgne/Longshot-contributions:fix/crash-local-report-identities-20261117"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: fix · Risk: low · Tested on: Linux, game-free local CLI fixtures · Needs: none
Why
crash_groups.py --filespromises one report per local file, but uses only each basename as its identity. Two independently collectedlongshot_log.txtfiles 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 nameandlocal 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'srecord()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.
scripts/crash_groups.py.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 main544229a260c5f5008f241b9cf48ae6b01c1602b9(re-read equal before publication): test-onlyaa986fed2c451ec4ffe61d551c242597fe9449ff, fix head06c2f50279c25fde1d6b106da6336981d42ed140. 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 -Bentry 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 ... --jsonCLI 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:544229a260c5f5008f241b9cf48ae6b01c1602b9: 721 checks, 571 PASS / 42 FAIL / 108 SKIP, native exit 1.06c2f50279c25fde1d6b106da6336981d42ed140: 721 checks, 571 PASS / 42 FAIL / 108 SKIP, native exit 1.tests/test_crash_groups.pyremains 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.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.pytests/test_bug_report_defaults.pytests/test_cpu_report.pytests/test_crash_groups.pytests/test_crt_options.pytests/test_damage_debug_menu.pytests/test_discover.pytests/test_display_startup_failure.pytests/test_dlss_feature_size.pytests/test_failed_compile_keeps_objects.pytests/test_framegen_preset.pytests/test_guest_imported.pytests/test_hardware_report.pytests/test_hud_layout_row.pytests/test_invalidate_vcore.pytests/test_lift_lookups.pytests/test_link_skip.pytests/test_linux_pressure.pytests/test_linux_update.pytests/test_longshot_saves.pytests/test_mirror_budget.pytests/test_missing_nup.pytests/test_mods_size_table.pytests/test_pending_guest_import.pytests/test_pipeline_play_cache.pytests/test_present_thread.pytests/test_profiling_mode.pytests/test_readback_timeout_source.pytests/test_renderer_new_handler.pytests/test_rumble_menu.pytests/test_run_all_changed.pytests/test_slow_frames.pytests/test_switch_table.pytests/test_target_image_pool.pytests/test_tested_configurations.pytests/test_upscaler_round_trip.pytests/test_upscaler_rows.pytests/test_vcore_escape.pytests/test_vk_occlusion_queries.pytests/test_vk_swapchain_compat.pytests/test_walk.pytests/test_walk_key.pyNot 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
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.No host C/C++, shader, game switch or visible-game change applies.
Possibly related, for context:
WIP: fix: keep local crash reports distinct when filenames collideto fix: keep local crash reports distinct when filenames collideView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.