Skip to content

UZ-WH-020 states both causes, and the fix names a real field - #175

Merged
indykish merged 2 commits into
mainfrom
chore/m165-webhook-error-drift
Aug 15, 2026
Merged

UZ-WH-020 states both causes, and the fix names a real field#175
indykish merged 2 commits into
mainfrom
chore/m165-webhook-error-drift

Conversation

@indykish

@indykish indykish commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Found while auditing the agentsfleet architecture docs against this repo (M165). The same error code is documented in three places and had drifted in two of them.

What was wrong

fleets/webhooks.mdx named one cause of two. The row read "The workspace lacks the named secret." The middleware answers UZ-WH-020 for two distinct situations — webhook_sig.zig's own module doc lists them:

  • the trigger's source is not a recognized provider, or
  • the workspace holds no webhook secret for it.

A user whose source is simply unknown to the registry was pointed at creating a secret they may already have.

The fix column named a field that page's reader does not have. It said to create the secret_ref name. secret_ref belongs to the Svix path (serve_webhook_lookup.zig reads signature.secret_ref from Clerk-style config). A manual fleet webhook resolves credential_name, which defaults to the source name — and credential_name is what the page's own TRIGGER.md example already uses.

api-reference/error-codes.mdx carried a remedy in its Description column. Every other row states the fact; this one opened with "Create a random webhook secret of at least 32 bytes…".

What changed

The registry entry in agentsfleet (src/agentsfleetd/errors/error_entries.zig) now states the fact before the fix and names both causes. error-codes.mdx here is regenerated from it with make gen-error-codes — no hand edits, and the generator output is byte-identical to what is committed. fleets/webhooks.mdx's row is rewritten by hand to match, and both pages' verified: stamps move forward.

Pairing

The registry change ships in agentsfleet PR #603. Merge that first, or together — the regenerated page here matches its registry byte for byte, so landing this alone would leave the generator output ahead of the code it generates from.

Verification

  • make lint — passed (22 tests, link check clean)
  • make gen-error-codes output diffed against the committed page — identical

🤖 Generated with Claude Code

Greptile Summary

The PR corrects the documentation for UZ-WH-020 so both unsupported providers and missing secrets are covered.

  • Adds the recognized webhook sources and the appropriate remedy for an unsupported source.
  • Documents credential_name lookup behavior and the required webhook_secret field.
  • Aligns the generated API error-code entry with the webhook configuration guide.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; both previously reported documentation issues are resolved by the current text.

Important Files Changed

Filename Overview
api-reference/error-codes.mdx The updated UZ-WH-020 entry now distinguishes both causes and provides remedies for the unsupported-source and missing-secret paths.
fleets/webhooks.mdx The troubleshooting row now names supported sources, the correct credential lookup field, and the required webhook_secret property.

Reviews (2): Last reviewed commit: "docs: a secret cannot make an unsupporte..." | Re-trigger Greptile

Context used:

The row said the workspace lacks the named secret. That is one of two
causes. The trigger's source can also be unknown to the provider registry,
and the middleware answers UZ-WH-020 for both.

The fix column pointed at secret_ref, a field from the Svix path. A manual
webhook trigger resolves credential_name, which defaults to the source
name. The row now names the field the reader's TRIGGER.md actually has.

error-codes.mdx is regenerated from the registry, whose UZ-WH-020 entry now
states the fact before the fix like every other row. The verified stamp
moves forward with the regeneration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread api-reference/error-codes.mdx Outdated
Comment thread fleets/webhooks.mdx Outdated
Greptile, twice and correctly. UZ-WH-020 has two causes and the remedy
answered only one: creating a secret does nothing when the trigger's
source is not a recognized provider, so the sender resends and gets
UZ-WH-020 again. Both rows now name the recognized sources — github,
slack, linear (webhook_verify.zig) — before the secret step.

The webhooks row also never said where the signing value goes. It is the
secret's webhook_secret field (serve_webhook_lookup.zig reads exactly
that field); storing it under another property leaves the verifier unable
to find it.

error-codes.mdx is regenerated from the corrected registry entry, which
ships in agentsfleet PR #603. The registry string is split into three
sentences so the generated row clears this repository's 25-word DOC-02
check, which caught it at 26.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@indykish
indykish merged commit 4d5d8c9 into main Aug 15, 2026
4 checks passed
@indykish
indykish deleted the chore/m165-webhook-error-drift branch August 15, 2026 11:22
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