fix: resolve issues #705, #706, #707, #708 — a11y tests, proptest netting, SEP-24 timeouts, RUNBOOK circuit breaker#754
Open
Mystery-CLI wants to merge 4 commits into
Open
Conversation
…npause in RUNBOOK.md Adds Section 2 covering the three-phase circuit breaker procedure: trigger emergency pause, coordinate vote-to-unpause quorum, and use emergency_unpause as a last-resort break-glass action. Renumbers subsequent sections accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ckSep24AnchorServer Adds enableTimeoutSimulation()/disableTimeoutSimulation() to MockSep24AnchorServer so individual endpoints can be made to hang indefinitely. Adds a 'Timeout Handling' describe block with four tests verifying deposit, withdrawal, poll, and error-message behaviour when the anchor server does not respond. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…end component tests Adds jest-axe as a dev dependency and configures it in test-setup.ts. Adds axe() a11y assertions in dedicated 'accessibility' describe blocks across all eleven component test files, covering loading, error, connected, and interactive states. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…algorithm invariants Adds three proptest-driven tests verifying: 1. Fee preservation — total fees in net transfers equal total fees in input remittances 2. Net amount correctness — net equals |sum(A->B) - sum(B->A)| for a single pair 3. Order independence — reversing input order produces identical net transfers Uses proptest to generate random amounts/fees; soroban Addresses are created inside each test body since they require an Env instance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@Mystery-CLI is attempting to deploy a commit to the Harold's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Mystery-CLI 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! 🚀 |
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.
Summary
This PR addresses four issues across documentation, backend tests, frontend tests, and smart contract tests.
#708 — RUNBOOK.md: Document circuit breaker multi-admin vote-to-unpause procedure
File:
RUNBOOK.mdThe runbook covered emergency pause and unpause but left operators without guidance on coordinating the multi-admin quorum vote required by the circuit breaker. Added a new Section 2 — Circuit Breaker: Multi-Admin Vote-to-Unpause covering:
emergency_pausecommand)health, coordinate each admin'svote_unpausecall, and track progress during a live incidentemergency_unpauseas a break-glass last resort (bypassing quorum), including the post-incident review obligationSubsequent sections renumbered from 3–8 accordingly.
Closes #708
#707 — SEP-24 service test: timeout simulation in
MockSep24AnchorServerFile:
backend/src/__tests__/sep24-service.test.tsThe mock anchor server only simulated success and failure responses; network timeout paths were untested. Changes:
enableTimeoutSimulation(paths?)anddisableTimeoutSimulation()methods toMockSep24AnchorServer— when enabled, matching endpoints silently hang (never respond), replicating a real network timeoutTimeout Handlingdescribe block with four tests:pollAllTransactionsresolves without throwing when the status endpoint hangs (graceful degradation)Errorinstance with a meaningful timeout-related message (not a raw network object)Closes #707
#705 — Frontend component tests: accessibility (a11y) checks with jest-axe
Files:
frontend/package.json,frontend/src/test-setup.ts,frontend/src/components/__tests__/*.{tsx,jsx}Component tests verified functional behaviour but had no accessibility assertions. Changes:
jest-axe@^9.0.0and@types/jest-axe@^3.5.9todevDependenciesconfigureAxeintest-setup.tswithcolor-contrast,label, andaria-required-attrrulesaxe()assertions inside dedicatedaccessibilitydescribe blocks in all eleven test files:AnchorSelector.test.tsx— loading, error, list, and open-dropdown statesAnchorSelectorKeyboard.test.tsx— trigger and open-listbox statesErrorBoundary.test.jsx— error fallback and normal-children statesProofOfPayout.test.tsx— loading and data-displayed statesSendMoneyFlow.test.tsx— initial render and confirmation stepSendMoneyFlowMemo.test.tsx— memo input stepTransactionHistory.pagination.test.tsx— first and second pageTransactionHistoryMemo.test.tsx— list view and expanded memo rowTransactionStatusTracker.test.tsx— initiated, processing, completed, failed, and with-refresh-button statesVerificationBadge.test.tsx— verified, unverified, loading, and details-modal-open statesWalletConnection.test.tsx— disconnected and connected statesCloses #705
#706 — Netting algorithm: property-based tests with proptest
File:
src/netting.rsThe netting algorithm had deterministic unit tests but no property-based tests covering random inputs. Changes:
use proptest::prelude::*(proptestwas already a dev-dependency inCargo.toml)make_remittancehelper to reduce boilerplate inside proptest bodiesproptest!tests verifying the core mathematical invariants:total_feesacross all net transfers equals the sum offeefields across all pending input remittances, for any random set of A→B and B→A flows (up to 8 each)|sum(A→B amounts) − sum(B→A amounts)|; fully-offsetting inputs produce zero transfersnet_amountandtotal_feesin the outputProptest generates random
(amount, fee)pairs; sorobanAddressobjects are created inside each test body (they require anEnvinstance and cannot be produced by proptest strategies directly).Closes #706
Test plan
cargo test— existing unit tests + new proptest property tests passcd backend && npx vitest run src/__tests__/sep24-service.test.ts— timeout tests passcd frontend && npx vitest run— all component a11y tests passRUNBOOK.mdSection 2 for operator clarity🤖 Generated with Claude Code