Skip to content

feat(cogs): report backend changes to a change stream - #595

Open
matt-codecov wants to merge 1 commit into
matth/storage-inventory-tracker-2from
matth/storage-inventory-tracker-3
Open

feat(cogs): report backend changes to a change stream#595
matt-codecov wants to merge 1 commit into
matth/storage-inventory-tracker-2from
matth/storage-inventory-tracker-3

Conversation

@matt-codecov

@matt-codecov matt-codecov commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

rig up GCS and Bigtable backends to emit change stream records. nothing is actually plugging in a change stream yet, that'll be future PRs

didn't do other backends yet because i wanted feedback on the stack so far before writing that much more code haha

@matt-codecov
matt-codecov requested a review from a team as a code owner August 7, 2026 01:45
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.55172% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.32%. Comparing base (f819003) to head (959eb00).

Files with missing lines Patch % Lines
objectstore-service/src/backend/change_stream.rs 0.00% 6 Missing ⚠️
objectstore-service/src/backend/bigtable.rs 98.75% 2 Missing ⚠️
objectstore-service/src/backend/gcs.rs 98.19% 2 Missing ⚠️
Additional details and impacted files
@@                          Coverage Diff                          @@
##           matth/storage-inventory-tracker-2     #595      +/-   ##
=====================================================================
+ Coverage                              88.12%   88.32%   +0.19%     
=====================================================================
  Files                                    100      101       +1     
  Lines                                  16448    16875     +427     
=====================================================================
+ Hits                                   14495    14905     +410     
- Misses                                  1953     1970      +17     
Components Coverage Δ
Rust Backend 92.44% <96.55%> (+0.10%) ⬆️
Rust Client 81.97% <ø> (ø)
Python Client 93.31% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matt-codecov
matt-codecov force-pushed the matth/storage-inventory-tracker-3 branch from ab70a01 to 959eb00 Compare August 7, 2026 01:50

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 959eb00. Configure here.

use anyhow::Result;
use objectstore_types::scope::{Scope, Scopes};

use crate::stream::ClientError;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multipart uploads bypass change stream reporting

Medium Severity

GcsBackend reports writes only from put_object, so objects finalized through complete_multipart never reach the ChangeStream. Large uploads — exactly the ones routed to the long-term tier — stay invisible in the inventory, while the matching Bigtable tombstone is reported, and a later delete_object emits a delete for a record that was never written. Storage COGS then undercounts long-term usage.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 959eb00. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant