Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions experiments/collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ Every observed body is compared to its submitted event, and every non-saturation
case must account for all committed event IDs. Saturation requires both positive
commits and independently observed loss relative to local evidence.

The saturation observer additionally requires the first submitted event (the
seed held at the receiver before pressure is applied) in both observed attempts
and backend commits. A different event cannot satisfy that identity check.
Additional pressure-event commits, duplicate attempts and reordered observations
remain allowed as long as the existing bounded-loss condition holds. The focused
observer controls exercise missing, substituted and reordered seed identities;
the historical pipeline runs below predate this strengthened assertion.

The TypeScript experiment emitter now passes the normalized event timestamp to
the OTel SDK as an integer seconds/nanoseconds pair. This is experiment wiring,
not a change to the reference SDK or a claim about all exporters/backends.
Expand Down
5 changes: 5 additions & 0 deletions experiments/collector/fidelity.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ def check_delivery(mode, events, evidence_count, attempts, commits):
if mode == "queue_saturation":
if not 0 < len(set(commits)) < len(events):
raise AssertionError("expected bounded queue loss was not independently observed")
# The runner blocks the first submitted request before applying pressure.
# A different committed event cannot stand in for that seeded request.
seed = ids[0]
if seed not in attempts or seed not in commits:
raise AssertionError("saturation seed was not observed and committed")
elif set(commits) != set(ids):
raise AssertionError("a submitted event did not commit")
if mode == "reorder":
Expand Down
20 changes: 20 additions & 0 deletions experiments/collector/test_fidelity.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,23 @@ def test_saturation_requires_observed_loss_with_positive_commits(self):
for commits in ([], ['one', 'two']):
with self.subTest(commits=commits), self.assertRaises(AssertionError):
check_delivery('queue_saturation', events, 2, commits, commits)

def test_saturation_requires_seed_identity_in_attempts_and_commits(self):
events = [self.event, {**self.event, 'event_id': 'two'},
{**self.event, 'event_id': 'three'}]
for attempts, commits in ((['one'], ['one']),
(['two', 'one', 'one'], ['two', 'one'])):
with self.subTest(attempts=attempts, commits=commits):
check_delivery('queue_saturation', events, 3, attempts, commits)
for attempts, commits in ((['two'], ['two']),
(['one', 'two'], ['two']),
(['two'], ['one'])):
with self.subTest(attempts=attempts, commits=commits):
with self.assertRaisesRegex(AssertionError, 'saturation seed'):
check_delivery('queue_saturation', events, 3, attempts, commits)

def test_saturation_seed_is_first_input_not_a_fixed_identifier(self):
events = [{**self.event, 'event_id': 'two'}, self.event]
check_delivery('queue_saturation', events, 2, ['two'], ['two'])
with self.assertRaisesRegex(AssertionError, 'saturation seed'):
check_delivery('queue_saturation', events, 2, ['one'], ['one'])
Loading