Skip to content

docs: effective configuration and dry-run validation - #5

Merged
MarksonHon merged 10 commits into
daeuniverse:honkfrom
Zakkaus:config-endpoints
Sep 20, 2026
Merged

MarksonHon merged 10 commits into
daeuniverse:honkfrom
Zakkaus:config-endpoints

Conversation

@Zakkaus

@Zakkaus Zakkaus commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Adds the two endpoints the doona Config and Validate pages need. Stacked on #4 (branch ui-findings); merge that first.

  • GET /api/v1/config: the effective configuration as one snapshot: generation_id, revision, the accepted sources (id, path, kind, content_sha256, bytes, loaded_at, line_count; content only when resources.config.content is true), diagnostics with nullable one-based line/column and end-exclusive spans, secrets_redacted. x-permission: observe.
  • POST /api/v1/config/validate: dry-run of candidate sources in syntax or full mode; returns valid, the same diagnostic shape, the running generation_id and validated_at; no state change, no network. x-permission: control; 413 over max_bytes/max_sources.
  • Capabilities resources.config and resources.config_validate, discovery links, configuration.md, honk mapping rows, eight contract tests.

Writing configuration is deliberately not in this PR.

npm run check:contract: 38 pass, 88 examples validated.

glassyiris and others added 10 commits August 15, 2026 19:34
Coherent connection and flow examples; open base objects so generators
can extend them; sampled_at on traffic; src and connection_id filters;
GroupSummary.config_revision; probe queue-full 503 with Retry-After;
health identity carries measurement; decision-time names in selection
paths; CORS, datapath and cursor rules stated once.
Example timestamps fall after instance start; the preflight rule is
stated in api-config and common; health identity keeps warmth; wording.
chain, rule, ingress and domain source with provenance on Connection
and FlowSummary; GET /runtime/outbounds; bounded GET
/runtime/traffic/history; no-close and out-of-scope statements.
ErrorCode enum on HTTP error bodies (ApiError); errors embedded in
resources keep adapter-defined codes; /events 409 names
event_cursor_expired and carries an example.
GET /api/v1/config returns the accepted sources (content only when
resources.config.content is true), diagnostics and generation;
POST /api/v1/config/validate dry-runs candidate sources in syntax or
full mode. Two capability keys, discovery links, docs and eight tests.
Writing configuration is a later contract change.
GET and PUT /api/v1/config/sources/{source_id}: full-text replacement
of one writable source with If-Match on content_sha256 (428/412), full
validation first (422 with diagnostics, nothing written), atomic write,
then a 202 reload operation. Writability flags on capabilities and
sources; six tests.
@Zakkaus

Zakkaus commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Second commit adds editing: GET/PUT /api/v1/config/sources/{source_id} (full-text replacement, If-Match = content_sha256, full validation before any write with 422 + diagnostics on errors, atomic write, then a 202 reload operation), writable on capabilities and sources. Gate: 44 tests.

@MarksonHon
MarksonHon merged commit f0e475b into daeuniverse:honk Sep 20, 2026
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.

3 participants