Commit Graph

11 Commits

Author SHA1 Message Date
0bb217f6d5 mission_tables: restore write mode before unlink on replace failure and publish mode on Windows (MISSION-TABLES-STAGE-CLEANUP)
agent: yes
AI-assisted: yes
2026-11-24 16:50:09 +03:00
322ce20e89 mission_tables: stage JSON report writes through a sibling temp file 2026-11-23 21:50:06 +02:00
167feec512 mission_tables: refuse a single named file that is not a PSIN container (#6926)
Squash-merged after diff review of PR #6926 - mission_tables: refuse a single named file that is not a PSIN container
2026-11-23 09:42:37 -06:00
b60f67a1b9 mission_tables: merge upstream and retain PSIN scan boundary 2026-11-22 21:41:44 +01:00
134b936f2e mission_tables: step by 4 on rejected records and score multi-slot candidates when slot 0 is skipped 2026-11-22 20:02:07 +01:00
9140f3f731 Merge pull request #2491 from Narek Shaghoyan 2026-11-22 13:15:41 -05:00
bf83975aed mission_tables: advance by 4 bytes after rejecting a lone false-positive record
In tools/mission_tables.py find_chunks(), rejecting a lone 32-byte candidate advanced by RECORD_SIZE (32 bytes) instead of 4, skipping offsets at+4..at+28 and dropping real mission tables starting right after a false-positive prefix. Advance by 4 bytes and add a synthetic regression test.
2026-11-22 17:14:36 +00:00
6ba82c124d Merge upstream main into mission-table slot fix
Preserve candidate scoring across gaps for the newly added block-indexed pool format as well.
2026-11-22 17:40:12 +01:00
78c67ef9cf fix(tools): retain later mission entity slots after a gap
A missing first slot prematurely disqualified an entire candidate pool address. Score all declared slots so valid later transforms still reach the report.
2026-11-22 17:30:51 +01:00
8c0c1b79ec tools: resolve mission-state pools by block index
The 32-byte state record is the container's own map-pair shape: the u64 at +16
is a PSIN pointer whose low 20 bits are a 1-based block number (read as `kind`)
and whose remaining bits are the byte offset, split between `band` and
`poolOffset`. Resolve that block-indexed address as a third candidate, using the
slot stride the chunk's slices prove (a chunk's records tile one array, so
gap / count is the stride). A 112-byte pair slot then steps by 112 instead of
by 64 and all its placements resolve.

Adds three synthetic tests: stride inference, band as the offset's high bits,
and an end-to-end PSIN container with a 112-byte slot array. The 12 existing
tests still pass. On the five COM_KBOS_NEIGHB streams unresolved records fall
from 38 to 31 (03fe4000.bin 28 -> 25, 03fe8000.bin 4 -> 0); the 31 that remain
are pair slots whose value struct is not the 64-byte position/rotation layout.
2026-11-22 15:29:23 +00:00
4e82e8afd7 tools: read mission-state record tables and pool elements
Adds tools/mission_tables.py, a stdlib reader for the 32-byte state records and 64-byte pool elements in inflated PSIN streams, and a synthetic-only unittest suite. The reader reports per file the record count, distinct state keys, distinct archetype and link hashes, and every resolved entity transform. It resolves both the file-absolute offset and the measured linked-pool encoding (offset in 16-byte units from the following element block), validates the duplicated position and rotation component, and reports unresolved records and skipped bytes instead of guessing.
2026-11-22 14:37:48 +00:00