Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
55fb6b7
bd-resilient-kv: add versioned store
snowp Nov 5, 2025
773c679
add versioned recovery, zlib compression
snowp Nov 5, 2025
bca695f
bd-resilient-kv: add snapshot cleanup utility for archived journals
snowp Nov 5, 2025
1c64982
make async
snowp Nov 5, 2025
edee87c
better compression, allows, +
snowp Nov 5, 2025
5e83fa7
revert
snowp Nov 5, 2025
a2a7dcc
add u64 helper
snowp Nov 5, 2025
a22768f
only read from latest journal
snowp Nov 5, 2025
ebc6c06
docs(bd-resilient-kv): update documentation to reflect async API changes
snowp Nov 5, 2025
96394a2
test(bd-resilient-kv): add test verifying rotation with many unique keys
snowp Nov 5, 2025
6eae295
Revert "test(bd-resilient-kv): add test verifying rotation with many …
snowp Nov 5, 2025
30a18b8
docs(bd-resilient-kv): document rotation buffer overflow impossibility
snowp Nov 5, 2025
f14c523
use timestamp as version
snowp Nov 6, 2025
70a112b
use flate2 to avoid pulling in minz_oxide
snowp Nov 6, 2025
aa19899
update some docs
snowp Nov 6, 2025
f0910bd
some more docs
snowp Nov 6, 2025
bcef819
simplify tests
snowp Nov 6, 2025
fb1b250
use 5
snowp Nov 6, 2025
4fd4947
remove base_timestamp, not needed
snowp Nov 6, 2025
127f8ad
remove cleanup for now
snowp Nov 6, 2025
f00945c
remove rotation callback
snowp Nov 6, 2025
8045327
update docs
snowp Nov 6, 2025
fb10cb8
revert cargo
snowp Nov 6, 2025
163c53c
update docs
snowp Nov 6, 2025
2bbc81e
simplify docs
snowp Nov 6, 2025
790a533
simplify recovery
snowp Nov 6, 2025
cf732ee
only consider snapshots in recovery
snowp Nov 6, 2025
747ea7f
remove tests we don't need
snowp Nov 6, 2025
6d7ae28
docs updates
snowp Nov 7, 2025
109f740
cleanup docs
snowp Nov 7, 2025
f5c826d
better docs
snowp Nov 7, 2025
520a607
use microseconds
snowp Nov 7, 2025
7f16d98
revert readme
snowp Nov 7, 2025
5311501
more cleanup
snowp Nov 7, 2025
421cd8b
remove
snowp Nov 7, 2025
6e58b88
clean up tests
snowp Nov 7, 2025
73ed8c3
remove unused
snowp Nov 7, 2025
6e5eb56
use generation
snowp Nov 7, 2025
27cdc5d
use proto
snowp Nov 7, 2025
04c2d09
Merge branch 'main' of github.com:bitdriftlabs/shared-core into versi…
snowp Nov 7, 2025
16cce68
fix tests
snowp Nov 7, 2025
d29e75f
propagate failures, improve errors
snowp Nov 7, 2025
8470cf5
clippy
snowp Nov 7, 2025
c96c20e
docs fixes, naming
snowp Nov 7, 2025
ac9d000
use protobuf for varint encoding
snowp Nov 7, 2025
fbbd0c8
simplify
snowp Nov 7, 2025
651fe5f
clean up framing
snowp Nov 7, 2025
e413633
renames, move stuff around
snowp Nov 7, 2025
4ee6510
fixes
snowp Nov 7, 2025
af5c3a1
remove
snowp Nov 7, 2025
631ddb7
revert
snowp Nov 7, 2025
45fdec6
revert
snowp Nov 7, 2025
7feb85f
comments
snowp Nov 7, 2025
93e5f46
add more tests
snowp Nov 8, 2025
5498458
use time provider
snowp Nov 8, 2025
35abc73
simplify rotation code, use tokio fs where possible
snowp Nov 10, 2025
1047e02
mode mod
snowp Nov 10, 2025
afb6d3e
clippy
snowp Nov 10, 2025
8b266bf
update api
snowp Nov 14, 2025
89f9a56
use varint for length
snowp Nov 15, 2025
2aca5d0
add license headers
snowp Nov 15, 2025
2be28cd
propagate partial failure case, remove read() in favor of ctor arg
snowp Nov 15, 2025
1d26a05
clippy
snowp Nov 15, 2025
3004014
impprove rotation
snowp Nov 15, 2025
23bd853
clippy
snowp Nov 15, 2025
518fb23
simplify
snowp Nov 15, 2025
6f19078
refactor
snowp Nov 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,32 @@
- Make sure to run `cargo +nightly fmt` after making changes to apply default formatting rules.
- Use pattern matching with if-let and match expressions for error handling

## Documentation Guidelines
- Avoid redundant documentation for the sake of convention. For example
- Don't include an Errors section if the only errors are generic failures.
- Don't include an Arguments section if the arguments are obvious based on the function signature.

## Test File Conventions
1. Test files should be placed adjacent to the implementation file they're testing
2. Test files should be named with a `_test.rs` suffix (e.g., `network_quality_test.rs`)
3. Link test files in the implementation file using:
3. Link test files in the implementation file using the following pattern at the top of the file, right below the license header and optional module-level docs.
```rust
#[cfg(test)]
#[path = "./file_name_test.rs"]
mod tests;
```
4. Tests in the same file as the implementation code should be avoided
5. Test names should *not* start with `test_`, as this is redundant
6. Use module-level clippy allow blocks instead of per-test allows:
```rust
#![allow(clippy::unwrap_used)]
```
This should be placed at the top of the test file, after the license header and before imports.

## Code Quality Checks
- After generating or modifying code, always run clippy to check for static lint violations:
`SKIP_PROTO_GEN=1 cargo clippy --workspace --bins --examples --tests -- --no-deps`
- For automatic fixing of some linting issues, use the `--fix` flag:
`SKIP_PROTO_GEN=1 cargo clippy --workspace --bins --examples --tests --fix -- --no-deps`
- Fix any remaining warnings before committing code
- Running clippy is especially important after code generation or modification to catch any potential issues
- Running clippy is especially important after code generation or modification to catch any potential issues
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ arbitrary = { version = "1.4.2", features = ["derive"] }
arc-swap = "1.7.1"
assert_matches = "1.5.0"
assert_no_alloc = "1.1.2"
async-compression = { version = "0.4.20", features = ["tokio", "zlib"] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make sure this does the right thing with flate2 in terms of using system zlib otherwise maybe better to do it manually.

async-trait = "0.1.89"
axum = { version = "0.8.6", features = ["http2", "macros"] }
axum-server = { version = "0.7.2", features = ["tls-rustls-no-provider"] }
Expand Down
2 changes: 1 addition & 1 deletion api
14 changes: 14 additions & 0 deletions bd-proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@ fn main() {
.out_dir("src/protos/logging/")
.capture_stderr()
.run_from_script();
std::fs::create_dir_all("src/protos/state").unwrap();
protobuf_codegen::Codegen::new()
.protoc()
.customize(
Customize::default()
.gen_mod_rs(false)
.oneofs_non_exhaustive(false)
.file_header(GENERATED_HEADER.to_string()),
)
.includes(["../api/thirdparty", "../api/src"])
.inputs(["../api/src/bitdrift_public/protobuf/state/v1/payload.proto"])
.out_dir("src/protos/state/")
.capture_stderr()
.run_from_script();
std::fs::create_dir_all("src/protos/log_matcher").unwrap();
protobuf_codegen::Codegen::new()
.protoc()
Expand Down
1 change: 1 addition & 0 deletions bd-proto/src/protos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ pub mod logging;
pub mod mme;
pub mod prometheus;
pub mod pulse;
pub mod state;
pub mod workflow;
1 change: 1 addition & 0 deletions bd-proto/src/protos/state/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod payload;
Loading
Loading