Repository navigation
fix: clean paired-tab pending requests, add reaper gap tests, buffer … - #715
Open
ajulaybeeb wants to merge 2 commits into
Open
ajulaybeeb wants to merge 2 commits into
ajulaybeeb wants to merge 2 commits into
Conversation
…parity, and same-ledger attestation tests (Vellar-Wallet#585, Vellar-Wallet#694, Vellar-Wallet#700, Vellar-Wallet#701) - apps/extension: add PairedTabManager to clean pending requests and cancel popup prompt on tab close, handle post-approval tab closing cleanly (Vellar-Wallet#585) - apps/extension: enumerate Buffer operations and add strict parity unit tests with Node Buffer (Vellar-Wallet#700) - services/worker-service: document age-based timestamp semantics and add tests for stranded building row reaper encountering artificially refreshed vs genuinely fresh rows (Vellar-Wallet#694) - contracts/attestation-registry: document deterministic same-ledger conflicting writes resolution and add Soroban unit tests confirming last-write-wins (LWW) (Vellar-Wallet#701)
|
@ajulaybeeb 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! 🚀 |
|
@AbuJulaybeeb is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Oct 24, 2026
This branch has not been deployed
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 resolves 4 related issues across the extension, worker service, and Soroban attestation registry:
Bufferoperations used inapps/extensionand added comprehensive unit tests validating strict parity between the"buffer"polyfill and Node's nativeBuffer.contracts/attestation-registryfor conflicting attestation writes for the same contract ID arriving within the same ledger sequence across attestor key rotation, verifying deterministic last-write-wins (LWW) behavior.Why
connect,pair,sign_transaction) and the user closes the tab before responding in the approval popup, the pending request state leaked indefinitely in memory. Furthermore, closing the tab while signing is actively in-flight risked leaving dangling promises or uncaught errors.reapStranded) to reclaim orphanedbuildingjobs based onupdated_at/startedBuildingAtMs. If an operator or script touchedupdated_aton a stuck job, staleness was deferred. The repository needed explicit test coverage and documentation establishing this as an accepted tradeoff against distributed heartbeating.buffer-polyfill.tsfor@stellar/stellar-sdkand internal signing logic. A formal enumeration and unit test suite were needed to verify that all operations used by the extension behave identically to native NodeBuffer.Implementation
1.
apps/extension(Issue #585)PairedTabManager:tabId).browser.tabs.onRemoved: rejects pending requests from the closed tab withrejected: "The initiating tab was closed"and deletes them from the queue.approvalWindowId).background.ts.paired-tab-manager.test.ts.2.
services/worker-service(Issue #694)cleanup.ts.memory-job-store.test.ts:cleanup.test.tsconfirming non-terminal building rows are never touched by ETL cleanup regardless of timestamp.3.
apps/extension(Issue #700)buffer-polyfill.tsall Buffer operations utilized acrossapps/extension(Buffer.fromstring/Uint8Array/ArrayBuffer/hex/base64/utf8,toString("hex"),toString("utf8"),toString("base64"),slice/subarray,byteLength,concat,alloc, empty inputs, and large 128KB payloads).buffer-polyfill.test.tsasserting byte-level parity betweenBufferfrom"buffer"and Node'snode:buffer.4.
contracts/attestation-registry(Issue #701)lib.rs: Soroban sequential execution guarantees Last-Write-Wins (LWW) for authorized attestor writes, while de-authorized attestor writes fail with auth errors.test.rs:same_ledger_conflicting_writes_resolve_last_write_wins: Attestor A writes, rotates to Attestor B in the same ledger, Attestor B writes a conflicting WASM hash; confirms the final state reflects Attestor B's hash and expiry, and subsequent writes by Attestor A fail with auth errors.same_ledger_conflicting_attributed_writes_resolve_last_write_wins: Same-ledger conflict resolution with publisher attribution.Testing
Commands executed:
corepack pnpm --filter @vellar/extension test: 12 test files passed, 115 tests passed (includingpaired-tab-manager.test.tsandbuffer-polyfill.test.ts).corepack pnpm --filter @vellar/extension typecheck: Clean (tsc --noEmitexited 0).corepack pnpm prettier --check: Clean (All matched files use Prettier code style).corepack pnpm --filter @vellar/worker-service test src/cleanup.test.ts src/memory-job-store.test.ts: 2 test files passed, 15 tests passed.cargo testincontracts/attestation-registry: 19 tests passed, 0 failed (including both same-ledger conflicting write tests).Note: Full worker-service suite has 3 pre-existing failures in
src/attestor.test.tspresent on upstreamdevbranch due to a duplicated call todeps.submitter.upsert; our changes did not touchattestor.ts.Scope / Risk
Issue
Closes #585
Closes #694
Closes #700
Closes #701