Add validity to the document - #34
Merged
Merged
Conversation
|
The author of this PR, shruti0025, is not an activated member of this organization on Codecov. |
shruti0025
force-pushed
the
feature/111-add-validity-to-document
branch
from
September 23, 2026 03:52
3645a8c to
394a92f
Compare
| * reviewer is confirming or moving a real period, not inventing one. Mirrors | ||
| * pipeline/document_validity.py - the server revalidates whatever is sent. | ||
| */ | ||
| function plusOneYearISODate(stamp) { |
Collaborator
There was a problem hiding this comment.
Remove this before merging
hariharanweb
approved these changes
Sep 25, 2026
The catalog announced to the Discovery Service carried no lifetime, so an announcement stood indefinitely under updateMode: MERGE. The prod approver now names the window at the approve-prod gate, where they already decide a document is fit for PROD. Validated and stored before anything is promoted, so a rejected window is a 400 that leaves the document parked at the gate.
A chunk, once ingested, answered searches forever — a rabi sowing advisory is wrong advice in June. Every chunk now carries start_date/end_date in its Qdrant payload, defaulted on upload to the upload day plus one year and editable by the reviewer beside the document type. Search returns only chunks whose period covers today. Chunks ingested before validity existed carry neither date and stay searchable, so adding this does not empty the live index. The clock is injected, so an operator can ask what search would return on another day.
The announcement lifetime is no longer required. Document validity, added
separately, is the only validity the pipeline now tracks.
BREAKING CHANGE: POST /documents/{id}/approve-prod no longer accepts a body,
and network_valid_from/network_valid_to are gone from the document API.
Consumers reading those fields must drop them. The documents columns are
left in place, unread, rather than dropped from live databases.
db.upsert_document computed the default period itself, putting domain knowledge in a layer that is meant to hold none. The upload endpoints now compute it and pass it down; db.py stores the dates verbatim. Also parses created_at with the date library instead of slicing its first ten characters, so a timestamp in an unexpected shape reports "unreadable" rather than whatever those characters happen to spell.
shruti0025
force-pushed
the
feature/111-add-validity-to-document
branch
from
September 25, 2026 12:25
43b3b35 to
d49db83
Compare
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.
Add validity to the document