Skip to content

test(hono): wait for honeytoken readiness - #104

Merged
cport1 merged 1 commit into
mainfrom
fix/hono-honeytoken-readiness-test
Nov 17, 2026
Merged

cport1 merged 1 commit into
mainfrom
fix/hono-honeytoken-readiness-test

Conversation

@cport1

@cport1 cport1 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the Hono honeytoken tests' fixed 50 ms WebCrypto sleep with a bounded wait for observable injection
  • preserve the cold-start contract: requests may proceed before asynchronous trap derivation finishes
  • make JSON and Content-Length assertions run only after the trap is proven armed
  • verify one mocked detection request per attempted page request

Evidence

The Node 22 release gate for 0.25.1 intermittently returned the undecorated HTML page after the fixed sleep; the identical tree passed on Node 20 and passed when rerun.

Validation

  • @webdecoy/hono test suite passed 10 consecutive times with --runInBand
  • npm run lint -w @webdecoy/hono
  • git diff --check

No production middleware behavior changes.

@cport1
cport1 merged commit 146f94f into main Nov 17, 2026
2 checks passed
@cport1
cport1 deleted the fix/hono-honeytoken-readiness-test branch November 17, 2026 16:37
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