Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs: CHANGELOG entry for POST /ingest write loss and webhook HMAC timing

garrytan2bc52d24c3be
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5bcabc795..5b3875e1a0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,16 @@ credits are retained; no result has been reassigned to another provider. Origina
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
+## [Unreleased]
+
+**`POST /ingest` no longer answers 202 for a capture it drops, and an unsigned GitHub webhook can no longer tell from response time which repositories a brain syncs.** The same body sent to two slugs now queues two captures, where the second caller used to get the first job back and nothing written to its slug. A capture over the 50-capture waiting cap now gets 429 `ingest_backlog_full` with `Retry-After: 30` and nothing queued, where it used to get another capture's job id. A slug over 1024 bytes gets 400 `invalid_slug` before anything is queued, because no page can be stored under it. Every webhook request now computes the HMAC over its body, whether the repository is unknown, has no secret or is covered by a source, so a 401 takes the same work either way.
+
+### Itemized changes
+
+- `src/commands/serve-http-webhooks.ts` (`POST /ingest`): the queue idempotency key carries the normalized target slug as its sha256 (empty when the job picks the slug), so retries to the same slug in any letter case still collapse onto one job. When the waiting cap hands back another job, the route answers 429 instead of 202. An `X-Gbrain-Slug` over 1024 UTF-8 bytes is refused with 400 `invalid_slug`.
+- `src/commands/serve-http-webhooks.ts` (`POST /webhooks/github`): push and item events compute the HMAC with a throwaway key when there is no source or no secret. For item events, every github-kind source with a secret is checked, and legacy `github_repo` sources share exactly one check, given to the lowest-id one with a secret, so the work does not depend on how many sources name the repository. A second legacy source on the same repository with a different secret is not tried.
+- Tests: `test/serve-http-ingest-write-loss.test.ts` (slug-keyed dedup, the 429 at the cap, the 1024-byte slug limit at both edges), and HMAC-count checks in `test/serve-http-github-webhook.test.ts` and `test/serve-http-github-push-webhook.test.ts`.
+
## [0.60.608.0] - 2026-11-07
**With the refresh write barrier on, a write that waited behind a refresh or an import can no longer land on top of a later write to the same page, and most of the barrier's remaining review follow-ups (GST-1623) are closed.** The barrier is still off by default (`persistence.refresh_barrier`); with it off, only the receipt health, the recovery-time replay order, the refresh merge check, the drain sleep and the new index change. A consumer from an older release that claims a later write first now makes the waiting write end `revision_conflict` instead of overwriting it. A write held again and again behind imports now expires at a ceiling counted from its admission. Waiting writes count toward their source's fair share of the local CLI cap. A refresh whose record recovery moved before the merge merges nothing. With the barrier on or off, a plain-git commit that lands on the upstream commit right after a refresh's merge no longer leaves the checkout `recovery_required` with writes refused until someone runs `--resume`: the refresh records the merge and syncs the new HEAD. One that lands on the start commit right before the merge no longer does either. Git refuses the fast-forward, and the refresh ends `refresh_source_changed` with the fence lifted, nothing merged and the commit kept, so the next refresh can run.