Repository navigation
Align documentation with current implementation - #16
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation-only truth pass. No application, test, config, CI or deployment files are touched —
the commit contains exactly
README.mdanddocs/KNOWN_LIMITATIONS.md.Both documents had been frozen while the reliability work landed underneath them, so they described
the original prototype.
KNOWN_LIMITATIONS.mdwas the sharper problem: it opened with threesections that contradicted its own later sections. "Synchronous Document Indexing" and "Lack of
Background Task Runners" are both false today, while sections further down describe
INDEX_MATERIAL/SYNC_ATTEMPTas tracked background jobs — a reader hitting line 14 and line 59got opposite answers. That framing is rewritten so limitations read as deferred work rather than as
failures of the shipped system.
Corrections
Retrieval is described accurately. The shipped retriever is
local-hash-v1: tokenise, drop stopwords, FNV-1a hash each token into one of 384 dimensions with a sign bit, L2-normalise, compare by
cosine, blend with lexical keyword overlap at
0.78 · vector + 0.22 · lexical. Every component islexical — no learned embedding model, no vector store. Both documents now say so plainly. Worth
noting: a full BM25 implementation exists in
bm25Retriever.js, but it is imported only by its owntests, so a reader would reasonably assume it was active. It is not.
Semantic retrieval remains deferred, and is listed as such rather than as current capability —
adopted on evidence that the lexical baseline has plateaued, not on the assumption that embeddings
generalise better. Deferred terms appear 3 times under "Deferred" and 0 times under "Shipped".
Synchronous versus BullMQ work is distinguished. Quiz generation is a synchronous request that
calls the provider inline; mistake analysis is also inline (
quizController.js:316). Only two jobsare enqueued by the API today —
INDEX_MATERIALandSYNC_ATTEMPT.REBUILD_REVIEW_QUEUEishandled by the worker but has no route trigger. The previous "everything from PDF parsing to mistake
analysis in the background" was false on both counts.
A tension worth recording rather than hiding:
AI_COMPLETION_TIMEOUT_MSis 30s, yet measuredgeneration takes 117–244s. Not a contradiction —
aiQuizService.js:295-297issues up to threesequential provider calls. The timeout is per call; the wall-clock is their sum.
Tutor history is an interaction/audit log, not conversational memory.
GET /api/v1/tutor/historyreconstructs from
LearningEventrecords witheventType: "ai_tutoring_interaction", returningtopic, question, result and timestamp.
tutorService.jsholds no message history at all, so follow-upquestions do not inherit earlier turns. Documented explicitly so the endpoint is not read as a
transcript.
Current
GROQ_MODELconfiguration is documented:process.env.GROQ_MODEL || "openai/gpt-oss-120b".The previously hard-coded default was retired by Groq and returned 404
model_not_foundon every AIfeature; it is named only in the source comment recording that incident, and appears nowhere in these
documents.
Production topology is documented accurately. Render free tiers only: static frontend, one free
web service running
start:combined→node main.js(which starts the HTTP server and theBullMQ consumer in a single process), free Key Value Redis, and Atlas M0 — the previous "M10+
with replica set" was wrong on both count and tier.
autoDeployTrigger: offis stated, because amerge does not deploy. The environment table also now records that
ALLOWED_ORIGINSis required inproduction and that an empty value permits no browser origin.
Test counts were re-measured, not carried over. The README claimed "118 tests across 6 suites"
for backend unit; the actual figure is 942.
typecheck·lint·buildRe-run after editing to confirm the documented figures had not drifted.
Two limitations reworded rather than copied
Topic snooze. The previous "read-before-write race" was stale:
snoozeReviewQueueItemis asingle atomic
findOneAndUpdate. The real behaviour is asymmetric durability — afailed_questionitem's
dueAtis protected during a rebuild by$max/$min, while a topic item'sdueAtisrecomputed from progress and deliberately overwritten, so a topic snooze does not survive a rebuild.
Flashcard identity.
itemTypeflips betweendue_flashcardandoverdue_reviewat the one-dayboundary, and it participates in both the upsert filter and the unique index. The service contains no
delete or cleanup of superseded rows, so a card crossing the boundary can appear twice. Affects the
queue only; the card's own SM-2 schedule is untouched.
Theme caveat recorded accurately
The persisted theme preference is applied at boot on every route. The remaining gap is only that the
landing page and auth screen expose no toggle — switching stays in the authenticated shell.
Documented explicitly as not an initialisation defect, since that was fixed in #15.
Verification
npm test·npm run typecheck·npm run lint·npm run build·npm run test:e2eall pass.git diff --checkclean. No files outside the two allowed were modified.