Skip to content

Remove RelayClient.delete() and release 1.1.0 - #65

Merged
Atharva0506 merged 9 commits into
AOSSIE-Org:mainfrom
Atharva0506:fix/remove-delete
Oct 26, 2026
Merged

Atharva0506 merged 9 commits into
AOSSIE-Org:mainfrom
Atharva0506:fix/remove-delete

Conversation

@Atharva0506

@Atharva0506 Atharva0506 commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Addressed Issues:

No separate issue. This is the SDK side of AOSSIE-Org/ThruBox-Server#70, which removes DELETE /api/messages/{id} from the server (security review Finding 1: anyone could delete any user's messages).

Depends on #63. Merge #63 first. This branch is based on it, so until #63 is merged the diff here also shows #63's commits. After that, only the last commit remains.

Screenshots/Recordings:

N/A. Covered by tests; see below.

Additional Notes:

What changes:

  • Removed RelayClient.delete(), its README section and its Quick Start line. The README now says messages stay on the relay until they expire.
  • Removed the delete() test. The 404 error-path test now goes through receive(), so that coverage stays.
  • The built type definitions (dist/index.d.ts) no longer include delete.

Who is affected: no known app. Chainvoice has never called delete() (I checked all 94 branches), and no other AOSSIE project uses the SDK yet.

Release 1.1.0 (merging this PR publishes it):

  • VERSION, package.json and package-lock.json are bumped to 1.1.0 here, and only here. Support mailbox cursors and fix the release pipeline #63 leaves them at 1.0.2, so VERSION changes on main once and v1.1.0 is tagged once.
  • On merge, version-release.yml tags v1.1.0, publishes the v1.1.0 draft release (cursor support, plus a "Removed: relay.delete()" section) and publishes @aossie-org/thrubox-client@1.1.0 to npm.
  • Removing delete() is technically a breaking change. It is released as 1.1.0 by maintainer decision, because no known app calls it.

All 30 tests pass, tsc --noEmit is clean, a clean npm ci works and the build succeeds. npm run lint reports only the existing preserve-caught-error error at src/client.ts:60, which is also on main.

AI usage: Claude Code (Claude Opus 5.5) helped with this change. I reviewed the diff and ran the tests locally.

Checklist

  • My PR addresses a single issue
  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.

ThruBox Server now gives every message a seq, its position in the
recipient's mailbox, and lets GET /api/messages/{address} take ?after and
?limit. Expose that in the SDK.

- Message gains an optional seq (undefined against older servers) and
  the id docs no longer promise a UUID.
- receive(address, { after, limit }) passes the cursor and page size.
- poll(..., { after }) opts into cursor tracking: each poll fetches only
  messages newer than the cursor, and the cursor advances only after the
  callback returns or its promise resolves. A throwing or rejecting
  callback gets the same messages again on the next poll, so a failed
  save is retried rather than skipped. Without after, poll behaves as
  before and passes the whole mailbox each time.

poll now awaits the callback before scheduling the next poll, so polls no
longer overlap, and a callback error is reported to onError instead of
silently ending the polling loop.
npm ci has failed on main since two dev dependency bumps landed, which
also breaks the release workflow (it runs npm ci before npm publish):

- @vitest/coverage-v8 5.x requires vitest 5, but vitest was still ^3.2.
- typescript ^7.0.2 is outside typescript-eslint's peer range
  (>=4.8.4 <6.1.0). TypeScript 6.0 is in range, but tsup's declaration
  build sets baseUrl, which TypeScript 6 rejects as deprecated.

Pin typescript to ~5.9.3, the version 1.0.2 was released with, and take
the pending Dependabot bumps together so the tree resolves: vitest and
@vitest/coverage-v8 5.0.5, eslint 10.12.0, typescript-eslint 8.71.2 and
prettier 3.9.10. npm ci, tests, tsc and the tsup build all pass.
Adds mailbox cursor support (receive after/limit, poll({ after }) and
Message.seq). The changes are additive, so this is a minor release.
Release notes are written by hand in a GitHub draft release named
vX.Y.Z. When VERSION changes, version-release.yml now publishes that
draft, keeping its notes and appending GitHub's generated "What's
Changed" list unless the draft already has one. It falls back to any
draft, and with no draft at all it creates the release from the
generated list instead of the old placeholder text.

Release Drafter rewrote the draft on every push to main, which would
overwrite hand-written notes, possibly in the same push that publishes
them. It is kept but now runs only when started from the Actions tab.

The v1.1.0 notes are in the existing draft release, renamed from the
Release Drafter's v1.0.3 draft.
- poll(): an onError handler that throws no longer ends the polling
  loop; the exception is logged instead.
- poll(): work out the next cursor before calling the callback, so a
  callback that modifies the array it is given cannot stall the cursor.
- Tests for both, plus one checking that polling waits for a pending
  async callback and then continues from the advanced cursor.
- version-release.yml: always append a freshly generated "What's
  Changed" list; a section already in the draft may be stale, so it is
  replaced rather than trusted.
- release-drafter.yml: serialize manual runs with a concurrency group.
- README: seq, cursors and duplicate-safe sends need ThruBox Server 1.0
  or later; older servers ignore after/limit.
ThruBox Server is removing DELETE /api/messages/{id}: it did not check
who was asking, and reading a mailbox returns every message ID, so
anyone could delete any user's messages. Messages now leave the relay
only by expiring. No known app calls delete(); Chainvoice never has.

Removes delete(), its README section and Quick Start line, and its
test. The 404 error test now goes through receive() instead.

This removes a public method, so it is a breaking change for anyone
still calling delete().
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 42f80cf and 1f29d4b.

Files ignored due to path filters: 1
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 9
  • .github/workflows/release-drafter.yml
  • .github/workflows/version-release.yml
  • README.md
  • VERSION
  • package.json
  • src/client.ts
  • src/index.ts
  • src/types.ts
  • tests/client.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added ci-cd CI/CD pipeline changes configuration Configuration file changes dependencies Dependency file changes documentation Changes to documentation files github-actions GitHub Actions workflow changes javascript JavaScript/TypeScript code changes tests Test file changes size/XL Extra large PR (>500 lines changed) repeat-contributor PR from an external contributor who already had PRs merged needs-review labels Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
Messages
📖

⚠️ PR Template Check

These are non-blocking, but please fix:

  • No issue linked. Consider adding Fixes #<number> (e.g. Fixes #42) under the Addressed Issues section.

Generated by 🚫 dangerJS against 1f29d4b

@socket-security

socket-security Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedtypescript-eslint@​8.71.0 ⏵ 8.71.21001007498100
Updated@​vitest/​coverage-v8@​5.0.0 ⏵ 5.0.599 +110079 +199 +1100
Updatedvitest@​3.2.7 ⏵ 5.0.598 +1100 +279 +199100
Updatedtypescript@​7.0.2 ⏵ 5.9.3100 +110090 +210090 -9
Updatedeslint@​10.11.0 ⏵ 10.12.097 +110010095 -1100
Updatedprettier@​3.9.9 ⏵ 3.9.10981009797100

View full report

Reverts the VERSION, package.json and package-lock.json bump to 1.1.0
from this branch. The release is cut from AOSSIE-Org#65,
so cursor support and the removal of delete() ship together as 1.1.0
and VERSION changes on main only once.
Adds mailbox cursor support (receive after/limit, poll({ after }) and
Message.seq) and removes delete(), which ThruBox Server 1.0 no longer
supports. Merging this pull request publishes 1.1.0.
@Atharva0506 Atharva0506 changed the title Remove RelayClient.delete() Remove RelayClient.delete() and release 1.1.0 Oct 26, 2026
@Atharva0506
Atharva0506 marked this pull request as ready for review October 26, 2026 07:21
@Atharva0506
Atharva0506 merged commit a7c3eb4 into AOSSIE-Org:main Oct 26, 2026
11 checks passed
@Atharva0506
Atharva0506 deleted the fix/remove-delete branch October 26, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI/CD pipeline changes configuration Configuration file changes dependencies Dependency file changes documentation Changes to documentation files github-actions GitHub Actions workflow changes javascript JavaScript/TypeScript code changes needs-review repeat-contributor PR from an external contributor who already had PRs merged size/XL Extra large PR (>500 lines changed) tests Test file changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant