Catches up the wiki with several pieces of work accumulated during this
session.
INGEST: TRACCAR_MAPS_ARCHITECTURE.md
- raw/TRACCAR_MAPS_ARCHITECTURE.md (source doc, read-only).
- wiki/sources/traccar-maps-architecture.md — TL;DR + key claims +
notable quotes + TRM divergences (PostGIS-native GeoJSON, rAF
coalescer, Zustand, longer trail, racing sprite set).
- wiki/concepts/maps-architecture.md — distilled patterns for the SPA's
map subsystem: singleton MapLibre + side-effect-only Map* components +
two GeoJSON sources + style-swap mapReady gate + sprite preload + WS-
to-map data flow (with rAF coalescer) + geofence editing + camera
control trio.
- wiki/entities/react-spa.md — corrected the "talks exclusively to
Directus" contradiction with [[live-channel-architecture]] (SPA
connects to two endpoints — Directus + Processor); locked stack (raw
MapLibre over react-map-gl, Zustand over Redux); added Auth section.
- wiki/concepts/live-channel-architecture.md — single sentence cross-
referencing [[maps-architecture]] for consumer-side throughput
discipline.
- index.md — Sources + Concepts entries.
SYNTHESIS: processor-ws-contract
- wiki/synthesis/processor-ws-contract.md — wire-level spec for the
live-position WebSocket: endpoint, transport, auth handshake,
subscribe/snapshot/streaming/unsubscribe protocol, reconnect, multi-
instance behaviour, connection limits, versioning, open questions.
Implementation-agnostic; the producer is cookie-name-agnostic so the
spec doesn't pin to a specific Directus auth mode.
- index.md — Synthesis entry.
AUTH-MODE REALIGNMENT (cookie -> session)
- SPA implementation surfaced that Directus SDK 'cookie' mode doesn't
survive a hard reload cleanly. Switched the SPA to 'session' mode
(separate commit in trm/spa). Wiki updates here:
- wiki/entities/react-spa.md §Auth pattern — describes session mode
(single httpOnly session cookie, no separate access token, no
/auth/refresh dance). Added "Mode choice context" note.
- wiki/synthesis/processor-ws-contract.md §Auth handshake — emphasises
the producer is cookie-name-agnostic; reframed "Cookie refresh while
connected" as "Session expiry while connected".
Plus all the chronological log.md entries documenting the above plus
Phase 1.5 planning, SPA Phase 1 planning, and stage verify+seed work
from earlier in the session.
Skipped from this commit: .claude/agent-memory/* (user-local agent
state, not project content); .gitignore (already-modified by user
outside this session's scope).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Substantial design artifact + canonical-source ingest for the TRM
business plane.
Schema draft (synthesis):
- wiki/synthesis/directus-schema-draft.md — working agreement for the
multi-tenant schema. Pseudo multi-tenant under organizations; entries
as the unit of timing; course definition (stages/segments/geofences/
waypoints/SLZs); penalty system "numbers in DB, math in code" with an
evaluator registry and progressive bracket math; per-entry timing
tables; per-stage start-order strategies (manual /
previous_stage_clean_result / inverse_top_n_then_natural /
inverse_of_overall) covering both Tirana 24h and Rally Albania
patterns. Two role surfaces (org role vs racing role) called out
explicitly. Decisions captured; Open questions reduced to one
(geometry retroactivity engine, deferred to Phase 2.5).
Source ingest:
- raw/Regulations_2025.pdf + wiki/sources/rally-albania-regulations-
2025.md — formal ingest of the canonical Rally Albania 2025
rulebook. Section numbers preserved as §X.Y so the schema draft and
future SPA work can cite precisely. Flagged follow-ups: the SLZ
formula lives in the Supplementary Regulations (don't hardcode);
M-7 numbering bug; unmodeled neutralization zones.
Faulty-position flag (cross-plane operator workflow):
- entities/postgres-timescaledb.md, entities/processor.md,
concepts/position-record.md — operator-controlled boolean on the
positions hypertable; processor filters WHERE faulty = false on
every read; flagging triggers windowed recompute via the
recompute:requests stream.
Implementation strategy on entity pages:
- entities/directus.md — Schema management section documenting the
snapshots/ + db-init/ convention, container-startup apply pipeline.
- entities/processor.md — Phase 2 long-lived branch model with
PROCESSOR_PHASE_2_ENABLED flag-gating for incremental main merges;
Phase 2.5 deferral note.
Index and log updated.