Files
plugins/packages/inkstone/lib
Binyu Wang e7af7856e5 inkstone 0.1.4: strict fake /keys, refused-key cleanup test, injectable probe backoff (#841)
The fake GET /api/tokenplan/v1/keys in keys.test.mjs's serveKeys() now
behaves like the live platform: no `uaa-token` cookie gives -10002, and
any query parameter gives -15100. A new test covers the third listKeys
call site, the 401 cleanup in ensureKey: the probe refuses the new key,
and the test checks that the refused key is deleted by name (#839).

probeWithRetry takes its delays as an optional third argument, and
ensureKey passes `probeDelays` through to the probe of a key it just
created. The default delays are unchanged, so nothing outside tests
behaves differently. The new test passes [0] and doesn't wait through
the ~15s backoff. Because lib/ changed, inkstone goes to 0.1.4.

Run at the reviewed head c4ab4717, merged onto main 7e01fa81, on mote
(Bun 1.4.2) with a temp HOME:
- packages/inkstone `bun test`: 102 pass / 0 fail
- `bun scripts/check.mjs inkstone`: ok
- repo-root `bun test` and the full `bun scripts/check.mjs`: CI run
  42476974057 at this head, green. The mote run waited 23 minutes
  behind 10 queued suites on the machine's suite lock and was dequeued
  without running.
Broken by hand, each red:
- query back at keyCount's listKeys: 3 fail (blank-prompt create,
  ten-key limit, the new cleanup test)
- query back at pruneKeys' listKeys: 2 fail (both pruning tests)
- query back at the 401 cleanup listKeys: 1 fail (the new test;
  main's tests stayed green there)
- listKeys on the bearer instead of the cookie: 7 fail
- probeDelays not passed through: 1 fail (the new test runs past
  bun's 5s limit at 15.0s)

#847 (also inkstone 0.1.4) merges cleanly on top, but it has to move to
0.1.5.
2026-11-08 20:16:18 +08:00
..