Skip to content

Suggestion warm-up after its code review (spec 028) - #57

Merged
codeministry merged 1 commit into
mainfrom
feature/028-chat-suggestions-review-followups
Nov 9, 2026
Merged

codeministry merged 1 commit into
mainfrom
feature/028-chat-suggestions-review-followups

Conversation

@codeministry

Copy link
Copy Markdown
Owner

Spec 028 takes on the follow-ups deferred from spec 027's code review.

What changes

  • The warm-up costs the chat's day nothing until the chat is used. A data change before the first open since start prepares nothing (ISC-536). After that, a change starts the warm-up only once leadgen.chat.suggestion-quiet-window (default 30 s) has passed without a further change, so triaging applications one by one costs one call per pause (ISC-537).
  • The quiet window no longer waits behind a scheduled ingest pass. It is timed by CompletableFuture.delayedExecutor, not by Boot's taskScheduler, whose single thread a pass holds for as long as it runs.
  • A failed phrasing is retried after leadgen.chat.suggestion-retry-after (default 5 min) instead of waiting for the data to move (ISC-535). At its bound the skip list drops expired entries first, then the oldest, and is never cleared whole.
  • A miss is phrased in its own language with the job its request built (ISC-538).
  • Follow-ups are no longer stored (ISC-539). They are kept in a memory map of their own, so they cannot push the suggestions out of the table or the cache. The follow-up path now logs a named model that cannot be built.
  • event.DataChanged replaces chat.suggest.SuggestionDataChanged. analytics, application and archive import nothing of the chat, and ChatIsolationTest checks imports and every chat_* table (ISC-541).
  • The warm-up runs on Boot's applicationTaskExecutor and drops a trigger after shutdown quietly (ISC-540).

No migration, and no value to set.

Verification

  • ./gradlew build: 1304 backend cases, 96 unit and 22 browser test files, all green; the 13 skipped are the corpus tests without .eml samples.
  • New tests were red before their fix: the busy-scheduler case in SuggestionPrewarmTest, and PhrasingWithoutAContextTest (skip-list bound, follow-up cache, unbuildable-model log).
  • Prewarm burst tests use a 1 s window and skip (assumeThat) when the runner leaves a gap of most of a window between two moves.
  • Code review in three rounds, security review clean. Ten findings are accepted and listed in the master's Remaining Work.

Closes ISC-535…ISC-543: the warm-up waits for the chat to be used and for a
quiet window, retries a failed phrasing after a window, phrases each miss in
its own language, keeps follow-ups out of the table, moves DataChanged out of
the chat and runs on Boot's executor; the quiet window no longer waits behind
a scheduled ingest pass.
@codeministry codeministry self-assigned this Nov 9, 2026
@codeministry
codeministry merged commit 49ac498 into main Nov 9, 2026
6 checks passed
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.

1 participant