Fix guides/security-analyzer: retention silently never runs, and the analyzer is never started - #599
Merged
lukekim merged 1 commit intoAug 21, 2026
Conversation
…check_interval The guide sets retention_check_enabled and retention_period but no retention_check_interval. RetentionBuilder::build() returns None when check_interval is unset, so the retention task never starts — silently, with no warning. With refresh_mode: append nothing else evicts old rows, so the guide's claim that retention_period keeps a month of history does not hold. Add retention_check_interval: 1h, say why both settings are needed, and add the missing step that starts the runtime and runs analyzer.py — the guide defines the script but never tells the reader to run it.
lukekim
approved these changes
Aug 21, 2026
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.
Summary
Two problems, both of which leave a reader following the guide with something that does not work:
1. The retention config is a silent no-op. The guide's spicepod sets
with no
retention_check_interval.RetentionBuilder::build()bails out withlet check_interval = self.check_interval?;— so with the interval unset it returnsNoneand the retention task is never started. No error, no warning. Because the guide also usesrefresh_mode: append, nothing else evicts old rows, so the stated behavior ("keeps a month of history") never happens and the accelerator grows without bound. Every other recipe in the cookbook that configures retention (retention/,distributed/,http/,json_strings/,architectures/microservice,architectures/sidecar) already setsretention_check_interval; this guide is the only one that does not.2. The analyzer is never started. The guide builds
analyzer.py(with auvscript header) and then jumps straight to "Testing the System" — no step ever runs the runtime or the script. Added a short "Running the Analyzer" step using the sameuv runconvention as the other Python recipes.Verified against
spiceai/spiceaiattrunk:crates/runtime-table/src/accelerated/mod.rs:2306-2311—build()returnsNonewhencheck_intervalisNone, before any filter is assembledcrates/runtime-component/src/dataset/mod.rs:591-606—retention_check_interval()isNoneunless configured; there is no defaultcrates/spicepod/src/acceleration/mod.rs:535,670— the field defaults toNonecrates/runtime/src/datafusion/mod.rs:2945-2952— the only construction site for dataset retentionThe other model/dataset settings in the guide check out:
toolsandsystem_promptare valid unprefixed model params (crates/runtime/src/model/params/common.rs:38-40), andtime_format: timestamptzis valid (crates/runtime-component/src/dataset/mod.rs:188).Evidence
Reproduced both states on runtime v2.1.5 with a minimal
appenddataset (time_column: ts,retention_period: 1m,retention_check_enabled: true).Without
retention_check_interval— rows three minutes past a one-minute retention period are still there, and the runtime logged no retention activity at all:With
retention_check_interval: 15sadded — the retention loop starts, and the registration line even advertises it:The guide itself needs Postgres and an OpenAI key, so it was not run end to end; the retention behavior was proven with the isolated repro above.