Repository navigation
feat(sqlite): clock-injectable blob expiry and sweep - #41
Conversation
SqliteBlobs read SystemTime directly, so blob expiry tests had to sleep. It now takes the storage's Clock (the one documents already use), set via SqliteStorage::with_clock. The file driver already routes blob expiry through its injected clock. Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). SqliteBlobs now reads every expiry decision through the storage's injected Clock instead of SystemTime::now(), so SqliteStorage::with_clock drives blob lifetimes exactly as it already drives documents. The delta since the last review is test-only. The code index is behind this pull request (indexed at 23bad66), so retrieved context may be out of date. State: Incomplete Review snapshot
Completeness: Incomplete What changedSqliteBlobs gained a clock field populated by SqliteStorage when constructing scope blob stores, and all internal expiry decisions now read the injected clock rather than the wall clock. Tests updated to drive time through a manual clock instead of sleeping. FeaturesNone identified with supported citations. Tests
FindingsNo active actionable findings. Could not review: tinysweeper/tests Before merge
How this fits togetherflowchart LR
n0["..._deletes_only_lapsed_objects_of_its_scope<br/>changed"]:::changed
n1["SqliteStorage<br/>changed"]:::changed
n2["...end_sweep_hook_reclaims_only_lapsed_blobs<br/>changed"]:::changed
n3["handle"]:::impacted
n4["Result"]:::impacted
n5["StorageBackend"]:::impacted
n6["get"]:::impacted
n7["now_ms"]:::impacted
n8["head"]:::impacted
n0 -->|calls| n3
n0 -->|tests| n3
n1 -->|implements| n5
n2 -->|uses| n5
n6 -->|uses| n4
n6 -->|calls| n7
n8 -->|uses| n4
n8 -->|calls| n6
n8 -->|calls| n7
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0040 · 423,041 in / 47,889 out · 22,656 cached (5%) · ladder/vectors-oai3, deepseek-v4.1-flash · 282 embedded
critique: $0.0016 · 170,747 in / 18,530 out · 10,624 cached (6%) · deepseek-v4.1-flash
security: $0.0008 · 151,296 in / 6,237 out · 8,960 cached (6%) · deepseek-v4.1-flash
tests: $0.0009 · 62,950 in / 11,589 out · 1,024 cached (2%) · deepseek-v4.1-flash
description: $0.0006 · 33,413 in / 8,819 out · 2,048 cached (6%) · deepseek-v4.1-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0042 · 272,387 in / 35,868 out · 47,104 cached (17%) · ladder/vectors-oai3, deepseek-v4.1-flash · 319 embedded
critique: $0.0015 · 106,194 in / 13,442 out · 24,064 cached (23%) · deepseek-v4.1-flash
security: $0.0013 · 69,345 in / 6,089 out · 19,328 cached (28%) · deepseek-v4.1-flash
tests: $0.0004 · 59,143 in / 3,351 out · 1,920 cached (3%) · deepseek-v4.1-flash
description: $0.0009 · 32,683 in / 12,114 out · 1,792 cached (5%) · deepseek-v4.1-flash
The Release v0.10.0 commit on main left this lockfile at 0.9.0, so the --locked proof build fails on main too. Co-authored-by: Medulla <medulla@tinyhumans.ai>
tinysweeper could not review the latest push, so its earlier approval no longer speaks for this pull request.
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: tinysweeper/tests.
$0.0009 · 412,210 in / 11,359 out · 65,408 cached (16%) · ladder/vectors-oai3, deepseek-v4.1-flash · 319 embedded
critique: $0.0002 · 192,343 in / 2,584 out · 24,704 cached (13%) · deepseek-v4.1-flash
security: $0.0002 · 145,242 in / 2,397 out · 15,872 cached (11%) · deepseek-v4.1-flash
tests: $0.0003 · 34,717 in / 4,869 out · 14,336 cached (41%) · deepseek-v4.1-flash
description: $0.0000 · 29,367 in / 638 out · 6,272 cached (21%) · deepseek-v4.1-flash
Part of tinyhumansai/openhuman#7781, tinyhumansai/openhuman#7522
SQLite blob expiry (
get,get_range,head,delete,list,put_expiringandsweep_expired) readSystemTime::now()directly.SqliteBlobsnow takes the storage's existingClock(the one documents and fencing already use), soSqliteStorage::with_clockdrives blob expiry too.Db::now), so no change was needed there.tests/blob_sweep.rsno longer sleeps; it advances a manual clock. New test pins the exact expiry boundary (live at ttl-1ms, gone at ttl) for get/head/list.-D warningsandcargo test -p tinystoragedrivers-sqlite(incl. conformance) pass.Deferred: the other items in openhuman#7781 (tinybus move, tinyagents pin, module re-pins, profile-scope blob sweep) live in other repos.
Summary by CodeRabbit