-
Notifications
You must be signed in to change notification settings - Fork 0
development history
This page records material architecture and delivery milestones. It distinguishes work merged to the production branch from isolated implementation branches. A local or feature-branch commit is not evidence that an API, service, or analytics path is live.
The Rust migration direction was made concrete as an incremental analytics program, rather than a browser rewrite or a big-bang backend replacement.
- #139 established the staged Rust cognitive-analytics roadmap.
- #140 defined the versioned event and analytics-job contract required before moving computation.
- The public API, authentication, Brain ID ownership, Socket.io, Prisma data ownership, game-saving transactions, and ordinary CRUD remain Express/TypeScript responsibilities during these initial phases.
- Browser WASM remains performance-gated. Native Rust server-side analysis is the planned first production Rust boundary.
Commit f240ceb on feat/cognitive-event-contract introduced an additive TypeScript foundation:
- versioned, strict
CognitiveInteractionEventvariants:trial_started,trial_answered,checkpoint,session_completed, andsession_abandoned; -
CompletedSessionAnalyticsJobvalidation for session/module/version/category consistency, contiguous sequence numbers, monotonic timing, a 24-hour cap, and a single matching terminal completion; - a privacy boundary that rejects identity, tokens, raw storage, screenshots, and arbitrary sensitive telemetry;
- a coverage registry derived from public cognitive routes;
- a conversion path into the current
AnalyzeSessionInputfor shadow preparation only.
This did not switch production analytics authority or add delivery/persistence.
Commit 2ac4ace on feat/cognitive-event-legacy-bridge added the first compatibility layer for #146:
- pure translation of existing
CELL_CLICKandTRAINING_COMPLETEEventBus payloads into canonical events; - initial support for Schulte, Numerical, and N-back;
- duplicate event-id rejection, monotonic event-time enforcement, terminal-race protection, and sensitive-key rejection;
- no false reaction measurement when legacy engines emit
reactionTimeMs: 0.
The adapter does not subscribe to EventBus itself, mutate engine behavior, send data, persist jobs, or change the existing TypeScript analytics source of truth. Module-by-module wiring remains a later controlled step.
Commit 5ca0e2b on feat/cognitive-session-event-collector started #147:
- a local, transport-free collector with
record,complete, andabandonlifecycle operations; - deterministic event IDs, sequence numbers, and completed-job IDs;
- limits of 10,000 events, 24 hours, and 1 MB serialized event payload;
- fail-closed privacy checks and completed-session validation;
- an adapter output suitable for current
AnalyzeSessionshadow/testing preparation.
Abandoned sessions intentionally do not produce a CompletedSessionAnalyticsJob. Durable delivery is deferred to #141.
All three commits passed Git whitespace validation and were created in isolated worktrees, leaving the active migration/CI remediation write-set untouched. Targeted TypeScript/Vitest execution remains pending because the local copied/linked dependency environment could not resolve the required Vitest packages. No dependency reinstallation was performed as part of these isolated changes.
The next integration gate is a healthy CI environment: run the focused contract tests and typecheck, then wire one supported trainer, beginning with Schulte, without changing the legacy EventBus contract or production authority.
Commit d2ebc95 aligned the Russian and English README with the production domain, current TypeScript ownership, and the incremental Rust analytics roadmap. The repository homepage was updated to kognitika.ru, and the Wiki received the initial Rust roadmap publication in ceec7bd.
During validation, CI exposed an unrelated Prisma migration-chain failure involving the missing GameType type. Migration baseline and CI remediation are handled separately. Documentation and analytics-contract work do not modify Prisma migrations, deployment workflows, or production servers.
canonical cognitive events (#140)
-> legacy compatibility bridge (#146)
-> session collector (#147)
-> durable outbox (#141)
-> internal Axum analyzer (#142)
-> TS shadow and canary (#143)
-> Rust-primary analytics with temporary TS fallback
-> longitudinal skill dynamics (#144)
The transition remains evidence-gated: contract parity, privacy validation, observability, load/canary metrics, and rollback drills must pass before Rust gains production authority for any analytics step.