Repository navigation
Name captured samples with the registry's safe stem - #76
Merged
Merged
Conversation
requestReceiver.ts only replaced / : \ in the resolved topic, while the registry files every doc sample under safe_stem (runs of characters outside [A-Za-z0-9._-] become one ".", outer dots stripped). A live capture for PubNub, castle, descope, flexport, mailtrap (soft bounce) or document360 (titles with spaces) was therefore written as a second file beside the doc sample. Add safeStem to topic.ts with the registry's rule, use it in the receiver, and test it against existing sample file names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7eqaQdKAUzQXRbGtym1PF
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Every Relay envelope carries webhook_version 2026-08-30, which Relay documents as the fixed payload version, and hookdeck/webhook-registry#121 files the doc samples under that directory (as linq's are). Move the eight files unchanged and point index.json's latest_version and provenance at it, matching the registry's samples-doc copy byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7eqaQdKAUzQXRbGtym1PF
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Gareth · project thread
Before:
requestReceiver.tsnamed a captured file by replacing only/,:and\in the resolved topic. The registry files every doc sample under its safe stem instead, so a live capture of an event that already has a doc sample landed in a second file beside it:soft bounce.jsonnext to mailtrap'ssoft.bounce.json,pubnub.com.schemas.events.channel.created?v=1.0.0.jsonnext to PubNub's...channel.created.v.1.0.0.json, and the same for castle ($list_item.created), descope (Change Password), flexport (/shipment_leg#departed) and document360 (titles with spaces).After: the receiver names files with
safeStem, which applies the registry's rule. A capture now overwrites the doc sample for its event, as it should.How:
safeStemintopic.tsportssafe_stemfrom the registry'sgenerator/harvest_doc_examples.py(re.sub(r"[^A-Za-z0-9._-]+", ".", t).strip(".") or "_unnamed"): each run of unsafe characters becomes one.and outer dots are dropped.requestReceiver.tsuses it in place of the old replace.topic.test.tschecks it against six real topics, asserting that the expected file already exists underproviders/, plus the edge cases (runs collapse,._-kept, outer dots stripped, empty input becomes_unnamed). The README's capture section now describes the rule.yarn compile && yarn testpass (26 tests).Worth a look: most registry harvesters use this rule, but
harvest_azure_event_grid.pyandharvest_vapi.pyreplace each unsafe character with_. Their topics contain no unsafe characters today, so none of their samples is affected.Generated by Claude Code
Update (91e1b49): this PR also moves
providers/relay-messenger/latest/toproviders/relay-messenger/2026-08-30/, to match hookdeck/webhook-registry#121, which files Relay's doc samples under the envelope's fixedwebhook_version. The eight files are unchanged;index.jsonnow pointslatest_versionandprovenanceat2026-08-30. The directory is byte-identical to the registry's samples-doc copy.yarn compile && yarn teststill pass.Generated by Claude Code