Skip to content

fix(server): populate indexed_at for evaluation policies - #2429

Merged
tkircsi merged 2 commits into
mainfrom
feat/evaluation-indexed-at
Oct 28, 2026
Merged

tkircsi merged 2 commits into
mainfrom
feat/evaluation-indexed-at

Conversation

@tkircsi

@tkircsi tkircsi commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

indexed_at was declared in the evaluation CEL environment and read by both engines, but nothing ever set RecordState.IndexedAt, so a policy reading it saw absent on every record and failed silently rather than at load.

GetPolicyFacts already fetches the record row, so this carries its created_at through PolicyFacts. It reads the column directly rather than Record.GetCreatedAt, which prefers the record's own OASF created_at: when a record was indexed here is not something its publisher may assert. A record with no row leaves the field unset, because the zero time reads as older than any date a policy compares against.

Also documents what an evaluation policy can read, which was undocumented. meta.signature.source and meta.scan.source are left out until they can report anything but local.

Refs #2128

@tkircsi
tkircsi requested a review from a team as a code owner October 28, 2026 12:29
@tkircsi tkircsi self-assigned this Oct 28, 2026
@github-actions github-actions Bot added the size/S Denotes a PR that changes 50-199 lines label Oct 28, 2026
@tkircsi tkircsi added area/dir/server and removed size/S Denotes a PR that changes 50-199 lines labels Oct 28, 2026
@github-actions github-actions Bot added the size/S Denotes a PR that changes 50-199 lines label Oct 28, 2026
@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tkircsi
tkircsi added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 6ae6ab0 Oct 28, 2026
37 checks passed
@tkircsi
tkircsi deleted the feat/evaluation-indexed-at branch October 28, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dir/server size/S Denotes a PR that changes 50-199 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants