Spec review fixes: retryability, check order, fetch hardening, vector backfill #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "spec-review-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes from a full review of SPEC.md. Spec-first per CLAUDE.md: vectors and prose updated together, Go reference implementation and all three example clients match.
go test ./...,go vet, Python (20/20 vectors), Node (20/20), bash (9 pass / 11 by-design skips) all green.Wire-observable changes
502 actor-doc-unavailablefor "could not obtain a valid actor doc" (network failure, non-200, oversized, unparseable, §5.2.1 rejection). Retryable;bad-signaturenow only means crypto failure or an uncanonicalizablesender. Previously a transient fetch failure was reported asbad-signature, which senders classify as permanent — and the Go actor cache had already diverged from spec by returningunknown-keyhere.409 duplicate-idis delivery confirmation (§7.6/§8). The receiver only dedups against durably persisted messages, so a 409 proves prior acceptance; the common cause is a retry after a lost 2xx. The outbox now marks these rowsdeliveredinstead offailed-permanent. §8 gains a "Sender action" column.Posta-Signaturespecced as400 malformed-envelopeat §7.1 step 3 (what the handler already did; now normative with vectors).inReplyTocapped at 256, over-limit fields aremalformed-envelope, raw non-ASCII/space path bytes aremalformed-path(url-canonical vectors 26–27).WWW-Authenticate: Postaper RFC 9110 §15.5.2.Spec-text fixes
Cache-Control: max-ageat the timestamp window. This was a real contradiction: §9 promised key removal takes effect within the window, but a CDN holding the doc longer would keep serving the removed key. 304 revalidation now explicitly resets the freshness clock.AllowPrivateNetworksoverride), fetch amplification + negative caching (now a spec-level SHOULD in §7.4), duplicate-JSON-key parser divergence, and the transferable-authorship / no-forward-secrecy story summarized from CONTEXT.md.DecodeActorDoc, per the render-only rule). Duplicate keyids in a doc are a MUST-reject. Avatars must behttpsand inherit the §13.3.3 fetch policy.inReplyTocross-sender collision ambiguity; §11 uses KiB consistently; §5.1 specifies 405 for undefined methods.Vectors and tooling
payload-too-large,duplicate-id,unknown-key, actor-doc url mismatch, malformed timestamp.actorDoc(§7.4 key resolution) andalreadyAccepted(§7.6 replay), documented in §15. Go/Python/JS harnesses run the full §7 sequence in spec order.gen-vectorsnow also emits the previously hand-maintained 08/09 (byte-identical), so regeneration produces the complete set.Two judgment calls to review: the outbox now treats 429 as retryable (same bug family as the 409 misclassification, though not strictly in the review findings), and the example-size canary moved from ~150 to ~200 lines since Python landed at 166 implementing genuinely more of §7.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.