Skip to content

Sign Assembly cancellations with the originating client - #86

Open
tim-kos wants to merge 3 commits into
mainfrom
fix/signed-assembly-cancellation
Open

tim-kos wants to merge 3 commits into
mainfrom
fix/signed-assembly-cancellation

Conversation

@tim-kos

@tim-kos tim-kos commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Response::Assembly#cancel! currently sends an unsigned DELETE, so cancellation fails for Workspaces that require correct signatures.

Responses returned by Assembly#create!, get, and replay retain their originating client. Cancellation includes its auth parameters and signs with its secret when configured; each signed cancellation receives a fresh nonce. Authentication survives response replacement and reloads. Directly constructed responses without a client preserve their existing unsigned behavior.

Validation: full Ruby 3.3 suite passes (128 tests, 265 assertions; optional live-upload and signature-parity tests skipped), plus bundle exec standardrb and git diff --check. Tests check the actual outgoing HMAC for created and fetched Assemblies, replayed responses, fresh nonces, and clients without a secret. Existing direct-response cancellation coverage also passes.

Compatibility: constrain JSON to versions below 3 because Ruby 3.1 resolves MultiJson 1.19, whose positional parsing options are incompatible with JSON 3. This dependency constraint is shared across the four independent fixes.

The four fixes also merge together cleanly. Their combined Ruby 3.3 suite passes with Node signature parity enabled: 147 tests, 321 assertions, with only the optional live upload skipped.

Also make the existing rate-limit warning assertion tolerate unrelated dependency deprecation messages. The Ruby 3.4 CI seed that exposed it (30047) passes locally after the assertion change.

@codecov-commenter

codecov-commenter commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.42%. Comparing base (79535b2) to head (5be4bfc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #86      +/-   ##
==========================================
+ Coverage   99.40%   99.42%   +0.01%     
==========================================
  Files           9        9              
  Lines         336      345       +9     
  Branches       38       40       +2     
==========================================
+ Hits          334      343       +9     
  Misses          1        1              
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants