Repository navigation
A source's decay is set, kept or cleared by updating the source - #19
Merged
Merged
Conversation
Signed-off-by: Bogdan Szabo <[email protected]>
This was referenced Oct 22, 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.
Slice 2 of 5 of RC-003 (a source may decay), on top of #18. A source can now be told to decay over the API; nothing reads the setting yet, so no behaviour changes.
What is in it.
PATCH /api/v1/kbs/{kb_id}/sources/{source_id}takesdecay: an object turns it on (a missing field takes Lore's value, so{}is Lore's behaviour),nullturns it off, leaving the field out changes nothing. The stored object always has all four fields, so a later change of the defaults does not move a source that was set.DecaySettings::validate:max_itemsandstale_after_daysat least 1,half_life_days1 to 365. A refused value changes nothing.SourceandSourceViewcarrydecay; the audit row saysdecay_changed.docs/design/sources.mddescribes the option.Tests. A store test pins keep, set, clear, refuse and the list; a unit test pins that an update body tells a missing
decayfrom a null one; one for the range check.Not here. The web form: until it exists the option is set over the API. Create does not take
decayeither; set it after creating.Checked locally on the rebased branch:
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace(1682 passed, 0 failed).🤖 Generated with Claude Code