demo: add at-least-once DS simulation with HLC/VC stats#38
demo: add at-least-once DS simulation with HLC/VC stats#38dexcompiler merged 14 commits intomainfrom
Conversation
|
@cursoragent review this pr |
High-level takeThis PR is a strong demo addition: it clearly exercises at-least-once delivery (dup/drop/reorder/delay), showcases deterministic simulation via What looks solid
Things I’d double-check / potential footguns
Suggested polish (nice-to-have)
Bottom lineI’m in favor of merging: the demo is cohesive, showcases the right primitives, and the stats/output design makes the causality story easy to see. The main thing I’d want addressed (or explicitly documented) is dedupe memory bounds + timeout cancellation correctness under retries/acks. |
|
@copilot review this pr |
|
@dexcompiler I've opened a new pull request, #39, to work on those changes. Once the pull request is ready, I'll request review from you. |
…y, correlation ID preservation Co-authored-by: dexcompiler <115876036+dexcompiler@users.noreply.github.com>
Fix critical bugs: overflow, thread safety, and correlation tracking
|
@cursoragent copilot fixed some issues listed here: #39 and I've merged in the changes |
|
Nice — thanks for following up and merging the fixes from PR #39. A couple quick things I’d sanity-check now that those changes are in:
If those are covered in the merged fixes, I’m happy with this PR as-is. |
Co-authored-by: Rusty <rusty@rustynode.dev>
|
@copilot cursor agent worked on some other issues and pushed commits to this branch: https://github.com/dexcompiler/Clockworks/tree/demo/ds-atleastonce-idempotency-fixes Can you review the fixes and open a PR to merge them into the original feature branch: |
|
@dexcompiler I've opened a new pull request, #40, to work on those changes. Once the pull request is ready, I'll request review from you. |
Clarify PR creation limitations in response to cross-branch merge request
Add cleanup of _templates dictionary in HandleAck to match cleanup of other dictionaries and prevent unbounded growth in long simulations. Co-authored-by: dexcompiler <115876036+dexcompiler@users.noreply.github.com>
Extract "payments" and "inventory" strings to constants for better maintainability and consistency across template operations. Co-authored-by: dexcompiler <115876036+dexcompiler@users.noreply.github.com>
fix: prevent template dictionary memory leak in ds-atleastonce demo
…gain Revert "Clarify PR creation limitations in response to cross-branch merge request"
…cy-fixes demo: bound ds-atleastonce inbox and stabilize MessageId


Summary
Adds a new distributed-systems console demo that simulates at-least-once message delivery with realistic network faults while showcasing Clockworks’ time and causality features.
What’s included:
New demo command:
ds-atleastonceSingle-process, deterministic simulation driven by
SimulatedTimeProviderFault injection: drop / duplicate / reorder / delay
Idempotent consumer behavior via an inbox-style dedupe (
MessageId)Retry behavior via
Timeouts.CreateTimeoutHandle(...)+TimeoutStatisticsMessages carry both:
HlcCoordinator+HlcStatistics)VectorClockCoordinator+VectorClockStatistics)IsConcurrentWith(VectorClock)) with rolling-window sampling printed in snapshotsInstrumentation / Output
Periodic snapshots print:
SimulatedTimeProviderStatistics(timer/scheduler pressure)HlcStatistics,VectorClockStatistics, andTimeoutStatisticsUsage:
Optional knobs:
--orders=,--maxSteps=,--tickMs=,--printEvery=,--seed=,--drop=,--dup=,--reorder=,--maxDelayMs=