Repository navigation
feat(stellar, bot): squad pool verification and /events command (Closes #475) (Closes #476) - #718
Open
CollinsKRO wants to merge 3 commits into
Open
CollinsKRO wants to merge 3 commits into
CollinsKRO wants to merge 3 commits into
Conversation
mimir-stellar#475) (Closes mimir-stellar#476) Add a bounded squad-pool reducer (src/stellar/squad-pools.ts) that reconstructs per-market, per-side pool balances from deposited/withdrawn events and verifies them against the poolA/poolB reported by resolved events, flagging mismatches and marking unobserved markets unverifiable. Add a bounded recent-events ring buffer (src/notifications/recent.ts) fed after successful sends, and an /events command (src/commands/events.ts) rendering the last N notifications as one-line summaries with explorer links, supporting market|squad filtering and chat allowlist, with output split via splitTelegramMessage. Wires /events into the command registry and records delivered events in the poller after successful sends. Includes tests for both features.
|
@CollinsKRO Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Hi @CollinsKRO, thank you for your contribution. This PR is not currently in a mergeable state on GitHub, and its mergeability cannot be confirmed after recent repository updates, so I cannot merge it as-is. Please recreate or rebase your branch from the current main branch and push an updated branch so we can review it again. This is a mergeability/update note, not a malware finding. Once the branch is updated, we will review it again. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements upstream issues #475 and #476.
#475 — feat(stellar): reconstruct squad pools and verify resolved totals
src/stellar/squad-pools.ts: a pure, bounded reducer tracking per-market, per-side pool balances fromdeposited/withdrawnevents.resolved, compares reconstructed pools withpoolA/poolBand emits a mismatch record (market id + expected/observed values) when they differ.tests/squad-pools.test.mjscovers matching, mismatching, partially observed markets, and bounded eviction.#476 — feat(bot): add an /events command listing recent notifications
src/notifications/recent.ts: a bounded ring buffer of delivered events fed by one call after successful sends.src/commands/events.ts:/eventscommand rendering the last N (default 10, max 30) as one-line summaries with explorer links, supporting/events market|squadfiltering and chat allowlist; output split viasplitTelegramMessage./eventsinto the command registry and records delivered events in the poller after successful sends.tests/events-command.test.mjscovers buffer eviction, filtering, and rendering.Verification
tsc --noEmit(typecheck): cleantsc(build): cleanlockfile:check: okscan:secrets: no findings in new files (the single pre-existing finding intests/pre-commit-scan.test.mjspredates this branch)Closes #475
Closes #476