Skip to content

feat(buffers): SUT-side antithesis underflow assertions#25526

Draft
blt wants to merge 1 commit into
blt/antithesis-bug-demonstration-testsfrom
blt/antithesis-sut-assertions
Draft

feat(buffers): SUT-side antithesis underflow assertions#25526
blt wants to merge 1 commit into
blt/antithesis-bug-demonstration-testsfrom
blt/antithesis-sut-assertions

Conversation

@blt
Copy link
Copy Markdown
Contributor

@blt blt commented May 29, 2026

Summary

Adds the antithesis_sdk + antithesis-instrumentation dependencies to
vector-buffers and three #[inline] assert_always! guards at the unchecked-
arithmetic sites that drive the #21683 accounting-underflow cluster:
Ledger::decrement_total_buffer_size, Ledger::get_total_records, and the
reader.rs:524 data-file size-delta. The assertions are no-ops outside the
Antithesis environment
and #[inline] so they fold away in production builds.

Stack (Antithesis-driven disk buffer v2 data-loss investigation):

How did you test this PR?

cargo build -p vector-buffers / cargo nextest run -p vector-buffers. Under
Antithesis, the decrement_total_buffer_size guard already fired organically
(reproducing #21683). make build-licenses regenerated the 3rd-party license
inventory for the new deps.

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Copy link
Copy Markdown
Contributor Author

blt commented May 29, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@blt blt added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label May 29, 2026
@blt blt force-pushed the blt/antithesis-sut-assertions branch from 0ca18b0 to 694f3cf Compare May 29, 2026 17:44
@blt blt force-pushed the blt/antithesis-bug-demonstration-tests branch from 579bdea to 3bb6d14 Compare May 29, 2026 17:44
@blt blt changed the title feat(vector-buffers): SUT-side antithesis underflow assertions feat(buffers): SUT-side antithesis underflow assertions May 29, 2026
@datadog-vectordotdev
Copy link
Copy Markdown

datadog-vectordotdev Bot commented May 29, 2026

Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 7 Tests failed

buffer_usage_data::tests::drop_newest_drops_should_increment_component_discarded_metric_issue_24606 from vector-buffers   View in Datadog   (Fix with Cursor)
Test has failed
variants::disk_v2::tests::acknowledgements::rejected_delivery_should_not_advance_acks_finalizer_status_discard from vector-buffers   View in Datadog   (Fix with Cursor)
Test has failed
variants::disk_v2::tests::invariants::delete_completed_data_file_size_delta_should_saturate_reader_524 from vector-buffers   View in Datadog   (Fix with Cursor)
Test has failed
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 86613d2 | Docs | Give us feedback!

@blt blt force-pushed the blt/antithesis-bug-demonstration-tests branch from 3bb6d14 to 7ce6082 Compare May 29, 2026 18:29
@blt blt force-pushed the blt/antithesis-sut-assertions branch 2 times, most recently from 02c0a7b to 9cc1ecd Compare May 29, 2026 18:39
@blt blt force-pushed the blt/antithesis-bug-demonstration-tests branch from 7ce6082 to 84f01cb Compare May 29, 2026 18:39
Adds antithesis_sdk + antithesis-instrumentation deps and three #[inline]
assert_always! guards that fold away in production builds (no-ops outside
Antithesis) at the unchecked-arithmetic sites: ledger.rs decrement_total_buffer_size
and get_total_records (#21683 / 0-1 underflow), and reader.rs:524 data-file
size-delta. These guide Antithesis to the accounting-underflow cluster (organically
reproduced #21683 in run D0).
@blt blt force-pushed the blt/antithesis-sut-assertions branch from 9cc1ecd to 86613d2 Compare May 29, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant