Repository navigation
release: F1 recall-latency FTS fix + ENG-8 dream-cycle fix (ENG-65) - #334
Merged
Merged
Conversation
…eport build SHA ENG-8 (dream cycle): - DreamCycleRunTrackerService.failStaleReports(): RUNNING reports older than 6 h are marked FAILED before each scheduled cycle. - /v1/health dreamCycle.lastRun is now the newest COMPLETED run's completedAt (was: completedAt of the newest report of any status, so null whenever the newest report was RUNNING). Adds dreamCycle.runningSince and dreamCycle.stale. - Identity stage: DREAM_IDENTITY_MAX_TOKENS (default 4000, was 1500), output caps in the prompt, tolerant JSON extraction, shape normalisation. An unparseable or all-empty response no longer overwrites the last good snapshot; the warning logs completionTokens/maxTokens/likelyTruncated. ENG-16 item 3 (deployed-version visibility): - /v1/health gains top-level version, gitSha, builtAt. gitSha comes from ENGRAM_GIT_SHA / RAILWAY_GIT_COMMIT_SHA / SOURCE_COMMIT, else dist/build-info.json; only 7-40 hex chars are accepted. - `build` runs scripts/write-build-info.mjs (never fails the build); .dockerignore re-includes it (checked: docker build context contains it). Verified: tsc --noEmit exit 0; jest src/consolidation src/health 27 suites / 358 tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit fc0a43e)
…health live recall latency (ENG-27)
The BM25/FTS keyword-rescue pass used an inline to_tsvector('english', raw),
which cannot use idx_memories_search_vector and re-parses every row of the
user on each recall. search_vector is GENERATED ALWAYS AS
to_tsvector('english', coalesce(raw,'')) STORED (20260310_hybrid_search), so
the matched set is identical.
Reliability repro on a June prod dump (58,720 rows for one user):
FTS 777-809 ms -> 0.1-0.3 ms, identical matches on 5/5 queries.
S4 on this change: 84/84, cov@5 0.9912, MRR 0.8436, top-20 identical to
ENG-13 arm A on 81/81 queries.
ops-health.sh gains a passive live-recall latency section read from the S6
hook JSONL (alerts when hook p95 > 1500 ms) plus prod db/embed latency.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 5b7c1f1)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
✅ Recall Benchmark ResultsFull outputCommit: c730e91 |
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.
Beaux-approved production release (ENG-65): ships F1 (recall-latency FTS fix, ENG-27) and the ENG-8 dream-cycle fix, cherry-picked onto
production(000b512). Staging-only changes (#322, #323, #328) are intentionally not included.Commits
d7485aa, cherry-picked fromfc0a43e: dream-cycle reaps orphaned RUNNING reports older than 6 h,dreamCycle.lastRunreads the newest COMPLETED run, and the identity-stage parse is hardened./v1/healthnow reportsversion/gitSha/builtAt.fb0f136, cherry-picked from5b7c1f1: FTS rescue matches and ranks on the stored, GIN-indexedsearch_vectorinstead of inlineto_tsvector('english', raw). The column isGENERATED ALWAYS AS to_tsvector('english', coalesce(raw,'')) STORED, so the matched set is identical. Resolving the conflict kept production's SQL and only swapped the tsvector expression. The non-runtimeops-health.shhunk was dropped.Migrations
None.
prisma/migrationsis identical toproduction. The entrypoint runsprisma migrate deployonly.Evidence
tsc -p tsconfig.build.jsonexit 0.pnpm run buildexit 0.src/consolidation src/health src/memory/memory-query: 31/31 suites, 459/459 tests.pg_dumptaken before merge: 2,101,196,163 bytes, sha2560473d1df…5e56dc. A fullpg_restoreinto a throwaway PG18 exited 0 with 119,908 memories and 89 migrations, matching live prod.🤖 Generated with Claude Code