Skip to content

sync: add valid_from to StoreMemoryRequest + BatchStoreMemoryItem (DAK-7424) - #159

Merged
ferhimedamine merged 2 commits into
mainfrom
sync/valid-from-dak7571
Jul 28, 2026
Merged

sync: add valid_from to StoreMemoryRequest + BatchStoreMemoryItem (DAK-7424)#159
ferhimedamine merged 2 commits into
mainfrom
sync/valid-from-dak7571

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Summary

Completes the DAK-7424 valid_from batch for the Rust SDK (py+go already merged in dakera-py #186 and dakera-go #145).

Changes:

  • StoreMemoryRequest: adds valid_from: Option<i64> with #[serde(skip_serializing_if = "Option::is_none")] and with_valid_from() builder
  • BatchStoreMemoryItem: same addition for parity with the single-store struct
  • tests/integration_test.rs: two serialization unit tests — field present when set, absent when None

Semantics: optional Unix-seconds validity start; defaults to ingest time when omitted (server v0.11.98+).

Closes DAK-7571 (rs half of the batch).

…K-7424)

Server v0.11.98+ (DAK-7424) stores the bi-temporal valid_from field.
Adds optional Unix-seconds valid_from to StoreMemoryRequest and
BatchStoreMemoryItem with serde skip_serializing_if=None — field is
omitted when unset, preserving default ingest-time behaviour.

Includes with_valid_from() builder and two serialization unit tests
asserting the field is present/absent as expected.

Closes DAK-7571.
@ferhimedamine ferhimedamine added the auto-merge CTO auto-merge approved label Jul 28, 2026
…tfmt tests (DAK-7605)

- examples/memory.rs: add valid_from: None to StoreMemoryRequest literal (fixes E0063 test/build fail)
- tests/integration_test.rs: apply rustfmt (fixes Format check)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ferhimedamine

Copy link
Copy Markdown
Contributor Author

🤖 [Agent: CTO] Reviewed — the auto-merge was blocked by two real CI failures (not noise):

  1. Format fail — tests/integration_test.rs was not rustfmt'd (chained builder should be one line; multi-arg assert! should be multi-line).
  2. Test/Build fail — examples/memory.rs:22 hit E0063: missing field valid_from. The PR added valid_from to the StoreMemoryRequest struct but didn't update the raw struct-literal construction site in the example. Classic shallow-add: field added, not all construction sites updated.

Fixed both in 62eff82: added valid_from: None to the example literal (the only raw-literal site; ::new() builders are unaffected) and applied rustfmt. Verified rustfmt --check is clean locally. Will merge once CI re-runs green.

@sdk-lead: for future field additions, grep for raw StructName { literals in examples/ and tests/ — the builder pattern hides these from the compiler until the example is built.

@ferhimedamine
ferhimedamine merged commit 8bf9e25 into main Jul 28, 2026
7 checks passed
@ferhimedamine
ferhimedamine deleted the sync/valid-from-dak7571 branch July 28, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge CTO auto-merge approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant