17 Commits
Author SHA1 Message Date
Muse 934c336667 sgeo --trip: draw the journey as an ordered polyline with time labels
Reads a stag CSV, orders the geotagged rows by their parsed
timestamp (ISO and EXIF-colon forms sort together), and draws the
trip on an OSM map: blue line with white halo, direction arrowhead
per leg, red marker per stop, MM-DD HH:MM label per timestamped
stop. Rows without a timestamp go last in CSV order; rows without
coordinates are skipped. Reuses sgeo tile/zoom/marker code via
shared fetch_tiles/draw_attribution helpers. Tests: 11/11 in
tests/run_tests.sh (3 new trip cases + tests/check_trip.py).
Docs: docs/trip-path.md.
2026-12-02 09:36:30 +00:00
cnmcdee a2106045a6 json: --json output and libsfile linkable library
- sfile --json: one JSON object per file (JSON Lines) carrying format,
  offsets, decoded fields and geotags when present; default CLI
  output byte-identical (verified against the pre-refactor binary).
- libsfile: src/sfile.h + src/sfile_lib.c expose the decoder
  (sfile_decode_file/mem, sfile_result_to_json, format table
  introspection); make lib builds libsfile.a and libsfile.so.1.1.0,
  make install installs them plus the header.
- tests/test_json.py: JSON parses and matches the text table on the
  same files (make test-json); tests/test_library.c + test_lib.sh:
  static and shared link test (make test-lib).
2026-12-02 09:28:39 +00:00
Muse b3689981bc Geotagging decoders: GPS from EXIF/XMP/QuickTime/GeoTIFF/EXR/PSD/CR3 (26 fixtures, 26 PASS)
Dedicated pass in src/geotag.c (dispatched by task number) reporting
latitude/longitude/altitude/datum/datetime for JPEG/TIFF/RAW (EXIF GPS
IFD 0x8825), PNG (eXIf + XMP), WebP (EXIF + XMP, new task 861),
HEIC/HEIF/AVIF (Exif + mime XMP items), MP4/MOV (prefixed (c)xyz,
udta/meta ISO6709 keys, XMP_ and uuid XMP), 3GP loci, CR3 CMT4 + CTBO
XMP, GeoTIFF tiepoint/transformation, EXR float attrs, JP2 uuid XMP,
PSD resources 1058/1060, MKV/AVI XMP only (no native GPS field).
Fixtures in tests/geotag/ cross-checked against exiftool 13.50 and
real files written by exiftool/ffmpeg. Full suite unchanged:
650 PASS / 97 PARTIAL / 2 FAIL / 105 NO SAMPLE.
2026-12-02 09:20:41 +00:00
Muse 720523151a contract: datetime is ISO YYYY-MM-DD, not EXIF YYYY:MM:DD
Real-file test against the /opt/sfile decoders showed the decoder
normalises EXIF GPSDateStamp to dashes (geotag.c: EXIF stores the
date as YYYY:MM:DD; normalised to ISO YYYY-MM-DD so the field is
machine-parseable). The contract example/table said YYYY:MM:DD.
Fixed the doc, and the fake sfile + expected CSV to match the real
decoder output (the nyc fallback case still exercises the colon
form via GPSDateStamp).
2026-12-02 09:15:06 +00:00
Muse 8f81caa14b tests + contract: fake-sfile harness, tile server, map checks
tests/run_tests.sh: fake sfile on PATH (tests/bin/sfile, canned GPS
values in section + EXIF tag-name forms), a local tile server
(tests/tile_server.py, $SGEO_TILE_BASE) so sgeo tests run offline,
and tests/check_map.py (stdlib PNG decode: marker-cluster count +
attribution plaque). Cases: multi-file CSV byte-for-byte, multi +
single-point maps, no-geotag dir, empty dir, default outfiles.
8 checks, all passing.

docs/geotag-contract.md: the field-name contract between the
decoder (what sfile prints in its Geotagging: section) and the
client parser (section + EXIF tag-name / uniform-table fallback
forms it accepts), incl. first-source-wins, defaults, and ranges.

Note: tests/bin/sfile is force-added -- .gitignore has a bare
sfile rule for the built binary.
2026-12-02 09:15:06 +00:00
cnmcdee eac6be4802 scar: file carver built on sfiles format table
Scan a raw disk image for sfiles known magics (831 formats) and carve
out the files: PNG chunk walk, JPEG marker walk, GIF block walk, ZIP
local-header walk + EOCD, PDF %%EOF scan, gzip inflate sizing; next-
header/EOF fallback with a size cap for the rest. Report lists offset,
format, size, confidence and how the end was found.

- src/scar.c, src/footers.h: carver + footer/trailer table
- Makefile: scar target (links -lz), test-scar target, install both
- tests/test_scar.py: synthetic image, 7 files recovered byte-identical
- docs/scar.md: usage, real example output, decisions, limits
2026-12-02 09:12:01 +00:00
Muse 3319ba3ee4 PARTIAL round: 650 PASS / 97 PARTIAL / 2 FAIL / 104 NO SAMPLE
Triaged all 136 PARTIALs in 5 batches; 39 had a real fixed layout and
were converted to PASS via hand overrides (351 total): LNK, NDS (CRC-16
verified), MXF header partition packs, ADX, ASF, BLEND, CDF, CPIO (old
binary), registry-hive DAT, FAT12 boot sectors, J2K SOC+SIZ, JP2 prefix,
PAR2, DEGAS PI2, MS-PST, RBXL, MPQ, SDS, VMDK, VPK, WMF, WMV, WUHB,
and 16 more. The other 97 are inherently partial (text 46, variable-
length 15, streaming 9, no-spec 9, chunk-scanning 8, no-header 7,
EBML 3) and are documented by category in the README; verdicts in
tools/triage_partial_B*.json. Regression fix: 814 .WMA got the ASF GUID
magic so the shared GUID disambiguates to .WMA by extension (it had
been stolen to .ASF when 39/817 gained the magic).
2026-11-25 06:49:15 +00:00
Muse 196165c6fd DDG+Wayback research round: 611 PASS / 136 PARTIAL / 2 FAIL / 104 NO SAMPLE
Genuine samples found (3 of the 107 NO SAMPLE):
- 005 (.3gx) via DuckDuckGo: real 3GPP2 file (ftyp brand 3g2a), +magic fix to ftyp3g2
- 373 (.m4v) via DuckDuckGo: complete 1.85 MB .m4v (ftyp brand M4V ), NOT truncated
- 544 (.php4) via Wayback (archived task page -> live file): genuine PHP source; derivation set to text
200 (.EXS) partial -> pass: real EXS24 decode from spec (big-endian SOBT header, 6 fields)

False positives caught and removed by strict validation:
- 51 .axf (Markdown spec), 52 .b (CSS), 130 .dba (SQL .bak), 168 .ecc (404 text),
  190 .esd (31-byte text fragment), 545 .phr (SVG image), 719 .taz (Intel HEX),
  774 .vdi (QEMU image), 24 .amf (explanatory text, again), 701 .svc (Wayback
  capture truncated: 5 MB of 138 MB original), 789 .vrb (HTML page with BOM)
Validation hardened: truncation-at-cap check, no \d{4,} exception in
looks_like_document, UTF-8 BOM stripping, existing files re-validated.
Task 55 (.BAK) deliberately not sampled (generic ext, layout mismatch).

Still no genuine sample: 024 .amf (binary AMF3, no public sample), 701 .svc,
789 .vrb, and ~100 other obscure/proprietary formats.
2026-11-25 06:36:26 +00:00
Muse 44ac52040a NO SAMPLE + doubtful samples: PASS 607, PARTIAL 137, FAIL 2, NO SAMPLE 107
Re-tried page links (bulk_fetch): 21 genuine new samples (14 PASS, 7 PARTIAL).
Web search: 3 more (293 .hta, 634 .sass, 720 .tb2). Dropped 10 bogus
bulk_fetch samples (page links pointed at PDFs/unrelated ZIPs/gzip/7z/404)
and recorded the bad URLs in tools/bad_page_urls.json so they are not
re-fetched. Doubtful samples: 550/554 kept, 005 (3GPP not 3GPP2) /
024 (explanatory text) / 373 (truncated at 50 MiB cap) dropped, 166
magic fixed Pin -> [IBIS Ver]. 298 renamed .ics->.ical, 733 bogus PDF
dropped. Only FAILs left are the duplicates 312/520.
2026-11-25 04:25:32 +00:00
Muse fac51e3bbd Fix 34 of 38 FAILs: PASS 596, PARTIAL 130, FAIL 2, NO SAMPLE 125
Batch overrides for the mis-identified samples: ZIP/PK, RIFF, XML,
ELF, OLE, Ogg, MZ, bzip2, xz, TAR, J2C, MDMP, FCS, ftyp, EMF magics;
CDR 81/82 magic swap; DNG to big-endian TIFF; CUBE/EMAKER text;
FREQ ext .frq; SF ext .sf2; VSQ ext .VSQ + MIDI layout.
298 sample renamed .ics->.ical (task is .ICAL); 733 bogus PDF
sample dropped (tmp has no defined format).
Remaining FAILs are the two known unresolvable duplicates 312/520.
200 (.exs) is PARTIAL: reference block is a placeholder, no layout.
2026-11-25 04:17:28 +00:00
Muse 4718c41129 Fix list-manifest crash; corrected final run: PASS 561, PARTIAL 130, FAIL 38, NO SAMPLE 124
Rounds 13-14 of the autonomous driver crashed in load_manifests
('list' object has no attribute 'items') on the 1-215 collector's
list-shaped manifest shard, so the driver re-reported the round-12
counts (537/109/31/172) and stopped on the apparent plateau. The
harness now normalizes list shards (entries carry a 'task' key).
Clean full re-run with all four collectors finished: 750 sample
files on disk, 561 PASS / 130 PARTIAL / 38 FAIL / 124 NO SAMPLE
of 853 counted (849 formats + 4 no-page task numbers).
2026-11-25 04:02:03 +00:00
Muse fbbd67dd0a Autonomous loop round 12: PASS 537, PARTIAL 109, FAIL 31, NO SAMPLE 172 2026-11-25 03:32:53 +00:00
Muse c3a75d8438 Autonomous loop round 11: PASS 534, PARTIAL 105, FAIL 29, NO SAMPLE 181 2026-11-25 03:32:31 +00:00
Muse 133ee833dc Test loop round 10: 482 PASS, 69 PARTIAL, 2 FAIL (duplicates), 296 NO SAMPLE
- 647 SD7 is a renamed 7z (Spring RTS); .SC7 was a bad extraction
- Fixed batch-8 clobber of 106's text marking; harness counts a 1-field
  header table as decoded (DWF)
- Freed /tmp (deleted stale lzply-clone2/demo8) after a build failed with
  'No space left on device' — the running sample collectors stage large
  downloads in /tmp
2026-11-25 03:05:15 +00:00
Muse aba2c8bea0 Test loop rounds 8-9: 483 PASS, 70 PARTIAL, 2 FAIL (duplicates), 294 NO SAMPLE
- Batch 8: hand layouts for 20 prominent formats (ar/DEB, DICOM, EPS,
  EXR, HDF5 v0, ELF64, TGA, S3M, IT, 3DS, FBX, MOBI, NetCDF, AU, DPX,
  CHM, RealMedia, DWF, torrent-as-text) + MZ/DOS container layout
- Batch 9: .A is ar too, GeoTIFF gets the TIFF-BE magic (3DS 'MM' stole
  it), .NCD is NetCDF, .WL is a DICOM worklist, .FFAPX is a ZIP
- Fixed: batch 8 clobbered 106's text marking (override replace); the
  container pass now never overrides a text derivation
- Harness: a 1-field header table counts as decoded (DWF's version)
- 3 more wrong samples deleted (69 gzip, 163 S3 error page, 213 PDF)
2026-11-25 03:04:31 +00:00
Muse 4d357b8a49 Test loop rounds 1-7: 440 PASS, 82 PARTIAL, 2 FAIL (duplicates), 325 NO SAMPLE
- 7 override batches (247 overrides): bogus magics removed (##, xmlns:,
  504b0506, fishead, ENDFREQUENCIES), wrong exts fixed (.JVX->.JXL,
  .files->.MKA/.ICE, .LGA->.LHA, .OTS->.OTT, .OSB->.OSC), ~130 formats
  verified as text from samples+pages
- Container layouts added: PDF, TIFF LE/BE, OLE/CFB (ZIP/RIFF/ftyp/Ogg/
  gzip/RAR/IFF already there)
- Engine: JSON '[' guard (INI [PHP] no longer misread as JSON); SH 2-byte
  #! magic removed (stole .run samples)
- Generator: override may set its own derivation; nocode-task overrides
  get complete default entries (fixed KeyError crash)
- Harness: skips backup-suffixed samples, junk-sample detection,
  task-key normalisation, iterates all 849 tasks
- Sample surgery: real files extracted from distribution ZIPs/gz/tar/LHA;
  11+ provably wrong samples deleted
- 2 remaining FAILs are unresolvable duplicates: 312 INI (=311), 520 PBO
  (=519) — same format, same extension, indistinguishable by content
2026-11-25 02:58:27 +00:00
Muse 7db001b480 sfile v1: table-driven header decoder for 831 formats
- Engine (src/sfile.c): generic, magic+extension identification,
  uniform header table output, text/XML fallback decoder
- Generator (tools/gen_formats.py): parses the collected C/C++ reference
  code (read sequences, structs, explicit data[N] offsets) into a format
  table; curated magic table; container-layout inheritance (ZIP/RIFF/
  ftyp/Ogg); hand overrides for well-known formats (PNG, ZIP, WAV, ...)
- Test loop (tests/run_tests.py) + README
- 347 formats with field layouts, 197 with magic; verified on real
  sample files (see tests/)
2026-11-25 02:13:20 +00:00