From 9b0a8b7728f5a95900fcb5d983f392d154cfc6df Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 23 Oct 2026 12:14:41 -0400 Subject: [PATCH 1/2] Verify token gate and clarify restart replay boundary --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 8f6a64d..c673db3 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ The gate rereads the keyset file when it changes. Spent tokens are held in memory only, in one set per key, and a key's set is dropped when the key leaves the keyset. Requests are not logged. +**Restart boundary:** a previously spent token can be redeemed again after a +restart while its signing key is still valid. Separate gate processes also +have independent spent sets. This implementation deliberately avoids durable +request state; it does not provide restart-safe or multi-process single use. +Do not use it for that requirement without designing a shared redemption store. + ## Keys python3 keyrotate.py init # create the first key From cd0121fb0325e8689eeebd4f0d9dbd4175b618d0 Mon Sep 17 00:00:00 2001 From: Keptlive <96455941+keptlive@users.noreply.github.com> Date: Fri, 23 Oct 2026 19:46:08 -0400 Subject: [PATCH 2/2] Add prepared verification workflow --- .github/workflows/test.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..615cbcb --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,15 @@ +name: Verify +on: [push, pull_request] +permissions: + contents: read +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - run: python -m pip install cryptography + - run: python -m unittest test_gate -v