Skip to content

test: fix integration flaky - #60

Merged
Brooooooklyn merged 1 commit into
mainfrom
04-01-test_fix_integration_flaky
Apr 1, 2026
Merged

Brooooooklyn merged 1 commit into
mainfrom
04-01-test_fix_integration_flaky

Conversation

@Brooooooklyn

@Brooooooklyn Brooooooklyn commented Apr 1, 2026 •

Copy link
Copy Markdown
Member

Note

Medium Risk
Changes the asset hash algorithm and which files are uploaded, which can affect deploy caching/invalidations and missing asset issues if ignore patterns are wrong; test changes are low risk but hashing/packaging changes are behaviorally significant.

Overview
Updates asset packaging to match Wrangler behavior: computeAssetHash now uses BLAKE3 over base64(content)+extension, and asset collection/packaging now skips ._assetsignore, _headers, _redirects, plus patterns from .assetsignore.

Stabilizes the kitchen-sink integration test by changing waitForServer to optionally wait for an expected response body (instead of fixed sleeps) and adjusting timeouts; adds unit coverage for the new hashing and ignore semantics. Adds new deps blake3-jit and ignore (lockfile updated).

Written by Cursor Bugbot for commit 080f81e. This will update automatically on new commits. Configure here.

Brooooooklyn commented Apr 1, 2026 •

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Base automatically changed from 04-01-fix_cli_use_jsonc-parser_to_parse_wrangler.jsonc to main April 1, 2026 08:09
@Brooooooklyn
Brooooooklyn force-pushed the 04-01-test_fix_integration_flaky branch from c4101c5 to 080f81e Compare April 1, 2026 08:10
@Brooooooklyn
Brooooooklyn merged commit 66b2a94 into main Apr 1, 2026
8 checks passed
@Brooooooklyn
Brooooooklyn deleted the 04-01-test_fix_integration_flaky branch April 1, 2026 08:19
cpojer pushed a commit that referenced this pull request Sep 11, 2026
Admin and user JWTs were structurally identical (same claims, same
signing key), allowing an admin_token cookie to be used as an API
Bearer token or vice versa. Add an aud claim: "api" for user session
tokens, "admin" for admin tokens. Each middleware now validates the
expected audience, rejecting tokens issued for a different context.

Existing sessions will require re-authentication after deploy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches core JWT issuance/validation paths for both API and admin sessions; a mistake would cause widespread auth failures and forces all existing sessions to re-authenticate after deploy.
> 
> **Overview**
> **Adds JWT audience separation to prevent token confusion between admin and API contexts.** API login now signs tokens with `aud:"api"`, admin login signs `aud:"admin"`, and shared `verifyJwt` can enforce an `expectedAud`.
> 
> All auth entry points (`authMiddleware`, `adminAuthMiddleware`, `authenticateDashboardToken`, and the proxy worker’s JWT verifier) now reject tokens with the wrong audience, and tests/helpers were updated to mint and use the correct token type (including a new `adminJwt` in `createTestUser`).
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 377cd9daede5a9e426a7f412bf999a32ff8452d7. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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.

1 participant