Skip to content

fix(parser): support US 24-hour slash exports - #96

Merged
rodrigogs merged 2 commits into
devfrom
wt/t_5796e0ec
Oct 14, 2026
Merged

rodrigogs merged 2 commits into
devfrom
wt/t_5796e0ec

Conversation

@rodrigogs

@rodrigogs rodrigogs commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Fixes #95.

Summary

  • infer slash-date order from valid unambiguous bare or bracketed 24-hour timestamps per export
  • retain the established day-first default for ambiguous or conflicting evidence and preserve localized AM/PM parsing
  • build v1.31.0 compatibility aliases only while restoring remembered chats, aligned by source-message spans
  • require every current message to originate inside source text authenticated by the released parser, rejecting leading content it discarded
  • require exact released metadata plus complete authentication and mapping of every legacy message ID before migration
  • remap bookmark/transcription references before restore side effects; reject unresolved references and target collisions without importing partial state
  • discard migration aliases before chats enter runtime state or indexing

Integrity model

The v1.31.0 metadata format stores only the first five message IDs plus IDs referenced by bookmarks/transcriptions. A legacy restore is therefore accepted only when (1) every current message starts inside source text consumed by the released parser and (2) those persisted IDs cover every message emitted by the old parser. Longer legacy archives without full ID coverage, or archives with leading content the old parser discarded, fail closed and can be loaded as fresh imports; they are never attached to the saved archive identity on sampled evidence alone.

Verification

  • RED→GREEN: wrong archive with altered content beyond the five-ID sample
  • RED→GREEN: legacy/current bookmark aliases colliding on one current message
  • released-parser snapshots verified against candidate aliases, including leading skipped messages and merged/multiline content
  • parser regression suite: 74/74 passed
  • global-search/unit suite: 249 tests after the final source-span regression
  • Add platform wide Search #67 strict-port collision probe: passed
  • privacy Playwright E2E: passed
  • npm run check: 0 errors, 0 warnings
  • npm run lint: passed
  • npm run build: passed
  • 100,000-line restore benchmark: 42,863 legacy mappings, ~1.8 s fresh parse / ~2.5 s restore parse
  • changed-line secret/network/debug scan: clean
  • git diff --check origin/dev: passed

@rodrigogs
rodrigogs merged commit 7d4ca0b into dev Oct 14, 2026
6 checks passed
@rodrigogs
rodrigogs deleted the wt/t_5796e0ec branch October 14, 2026 05:22
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.

chat with USA date format is displayed messed up.

1 participant