feat(cogs): report backend changes to a change stream - #595
Conversation
Codecov Report❌ Patch coverage is 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
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ab70a01 to
959eb00
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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; |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 959eb00. Configure here.


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