Repository navigation
test(storage_import): give the tinybox fixture the registry's real index shape - #8337
Conversation
…dex shape
The jail registry's index.json keys its records under "records"
(tinybox-jail `Index { records }`), and `tinybox_bus::storage::jail_index::
to_body` converts the seconds fields of exactly those records to the
body's millisecond fields. The fixture used a "jails" key, so to_body had
no records to convert and the stored body kept created_at_unix and
updated_at_unix while the assertion expected created_ms and updated_ms.
The importer is correct; the fixture is not.
Tiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): test(storage_import): give the tinybox fixture the registry's real index shape. This pull request repairs the failing tinybox storage-import test by correcting its fixture rather than the importer: the legacy index fixture and the expected stored body now key records under "records", matching the registry's real index shape, while the document id stays "jails". Note that the code index is behind this pull request (indexed at 7ac71fc), so retrieved context may be stale. Review snapshot
Completeness: Complete What changedThe fixture constant INDEX and the expected document in the round-trip test are edited from the "jails" key to "records", a two-line, two-file-line change with no broader behavior change. The change is confined to a test file; no input path, new calls, or production behavior is altered. Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
Fixes
modules::storage_import_tinybox::tests::the_jail_index_moves_into_one_document_with_the_same_shape, which fails on main. The stored body keepscreated_at_unixandupdated_at_unixwhere the test expectscreated_msandupdated_ms.Cause: the test fixture, not the importer.
index.jsonas{"records": {<id>: JailRecord}}(crates/tinybox-jail/src/registry.rs,struct Index { records }).tinybox_bus::storage::jail_index::to_body, which turns each record's seconds fields into the body's millisecond fields. It does that for the records under"records"(tinybox-busjail_index.rs,records_mut)."jails", soto_bodyfound none to convert.Fix. The fixture's index and the expected body now use the
"records"key. The document id stays"jails", the base directory name.Tests
cargo test -p openhuman --liband product features.Summary by CodeRabbit