Skip to content

document the v0.1.0 surface with a quickstart and runnable examples#12

Merged
hstern merged 1 commit into
mainfrom
secevent-15-docs
Jun 21, 2026
Merged

document the v0.1.0 surface with a quickstart and runnable examples#12
hstern merged 1 commit into
mainfrom
secevent-15-docs

Conversation

@hstern

@hstern hstern commented Jun 21, 2026

Copy link
Copy Markdown
Owner

What

Documentation polish ahead of the v0.1.0 tag. The library is
feature-complete (typed SET envelope, Parse, Validate, Encode,
the event-type registry); this adds the docs a developer needs to use
it from the public surface alone.

Changes

  • README.md — a three-part quickstart, each a focused flow:
    parse already-verified claims-set bytes and walk events (typed where
    registered, raw where not), build and Encode a SET, and register an
    event type through the registry. Keeps the "what this is / is not"
    framing, the RFC 8417 §4 "a SET is not an access token" caveat (now
    noting a validated SET carries no "good for auth" semantics), and the
    pre-release version-stability statement. sub_id is cross-referenced
    to its dependency by import path.
  • example_test.go — runnable Example functions for the flows
    that lacked one: ExampleParse, Example_encode,
    Example_registerEventType (implement Event → register → Typed),
    a contrasting unregistered-URI-stays-raw example, and a
    Validate-boundary example matching the §2.2 sentinels with
    errors.Is. Existing ExampleSET_Validate / ExampleAudience are
    untouched. The registry example uses a documentation-only event-type
    URI distinct from the CAEP/RISC URIs already registered in the test
    binary (the registry has no unregister).
  • CHANGELOG.md — dated [0.1.0] section summarizing the shipped
    surface plus compare/release links.
  • secevent.go — drop a stale "later building blocks" forward
    reference in the SET doc comment now that Parse/Validate/Encode
    exist.

Verification

  • gofmt -l . clean, go vet ./... clean, go mod tidy -diff clean.
  • go test -race -shuffle=on ./... passes (all Example outputs
    verified).
  • golangci-lint run ./... (v2.12.2): 0 issues.

🤖 Generated with Claude Code

The library is feature-complete: the typed SET envelope, Parse,
Validate, Encode, and the event-type registry all ship. What was
missing was the documentation a developer needs to use it without
reading the source — this fills that gap ahead of the v0.1.0 tag.

README gains a three-part quickstart, each block a focused flow:
parse already-verified claims-set bytes and walk events (decoding the
recognized ones, leaving unknown event types raw), build and Encode a
SET, and register an event type through the registry. The "what this
is / is not" framing, the RFC 8417 §4 "a SET is not an access token"
caveat, and the pre-release version-stability statement are kept; the
§4 caveat now also notes that a validated SET carries no
"good for auth" semantics. The sub_id claim is cross-referenced to its
public dependency by import path.

example_test.go adds runnable Example functions for the flows that
lacked one — ExampleParse, Example_encode, Example_registerEventType
(implement Event, register a decoder, recover the typed value via
Typed), a contrasting unregistered-URI-stays-raw example, and a
Validate-boundary example matching the §2.2 sentinels with errors.Is.
The existing ExampleSET_Validate and ExampleAudience are left alone.
The registry example claims a documentation-only event-type URI
distinct from the CAEP/RISC URIs and other fixtures already registered
in the test binary, since the registry has no unregister.

CHANGELOG gains a dated [0.1.0] section summarizing the shipped
surface and the compare/release links.

The SET type's doc comment dropped a stale "later building blocks"
forward reference to Parse/Validate/Encode, which now exist.

Co-Authored-By: Claude <noreply@anthropic.com>
@hstern hstern enabled auto-merge (squash) June 21, 2026 02:27
@hstern hstern merged commit 394829a into main Jun 21, 2026
4 checks passed
@hstern hstern deleted the secevent-15-docs branch June 21, 2026 02:28
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