Skip to content

Claims the Basic HTTP documents in the corpus - #354

Merged
johnnyt merged 2 commits into
mainfrom
st-8kn8-basichttp-corpus
Sep 30, 2026
Merged

johnnyt merged 2 commits into
mainfrom
st-8kn8-basichttp-corpus

Conversation

@johnnyt

@johnnyt johnnyt commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

The corpus half of ADR-0075, on main now that the processor (#353) has merged (decision 7, and row g of decision 8): the W3C documents that need the Basic HTTP Event I/O Processor leave the exclusions and enter the corpus, and eleven of them are claimed.

What changes

  • tools/corpus/scxml_w3/exclusions.exs drops its twelve :needs_basichttp entries and the reason line; mix statifier.corpus re-emits conformance/exclusions.json without them. The five needs_invoke_src entries (test216, test226, test239, test242, test276) are unchanged.
  • conformance/schema/case.json gains host.event_io_processors: a non-empty, unique array whose item set is closed, its one member the Basic HTTP processor URI. The W3C branch's ban on host is lifted for that key only: a w3c case's host must carry event_io_processors and nothing else; scion cases still carry no host (ADR-0075 decision 7).
  • Mix.Statifier.Corpus.Upstream declares the key for a W3C document that names the processor URI as a <send>'s type (HostCase.event_io_processors/1). Exactly the twelve documents do.
  • Mix.Statifier.Corpus.HostCase.with_event_io_processors/2 starts the parent's loopback front (Mix.Statifier.BasicHTTPFront), registers Statifier.Send.BasicHTTP under the URI and basichttp with the front's base URL, and stops the front when the case ends; HostCase.run/2 uses it beside the recording send_types.
  • The W3C generator emits, for such a case, test_scxml/5 inside HostCase.with_event_io_processors/2; every other generated module is byte-identical.
  • conf:basicHTTPAccessURITarget emits targetexpr="_ioprocessors['basichttp']['location']", the IRP's spelling.
  • docs/basichttp.md: what the processor is, registration, the location, the front a host writes around decode/1 and the status rule, the scxml-send-key header and at-least-once delivery (ADR-0075 Amendment of 2026-09-30), the mapping both ways, what is not supported (ADR-0075 decision 9's residue rows), and a req transport recipe as text. In mix.exs's extras and package files; linked from docs/extending.md.
  • changelog.d/st-8kn8.md under Added.

The counts, beside their enumerations

  • Claimed and ratcheted, eleven: test509, test510, test518, test519, test520, test522, test531, test532, test534, test567, test577. test/passing_tests.json grew by exactly these eleven paths (under test/scxml_tests/optional/basic_http_event_processor/), added by mix test.baseline add, which ran each before writing; conformance/registry.json grew by the same eleven case_ids. The w3c-optional claim goes from 2 cases (test193, test278) to 13 (those two plus the eleven).
  • In the corpus and unclaimed, one: test201, out of both the ratchet and the registry. Its reason, from ADR-0075 decision 7, is recorded in conformance/RATCHET.md ("The host object"), docs/basichttp.md and tools/corpus/README.md: it expects an event delivered from outside the session ahead of a send the same step appends to the session's own external queue. Its generated module runs and fails, as test330 and test552 do today.
  • Emitted W3C modules: 156 + 12 = 168 (154 mandatory, 2 + 12 = 14 optional); the README counts test pins the new figures in tools/corpus/README.md.

Provenance

  • Restacked: this branch was first cut from Adds the Basic HTTP Event I/O Processor #353 before it merged. Adds the Basic HTTP Event I/O Processor #353 merged by rebase, so this branch now carries only its own commits, rebased onto main after the processor landed. The rebase was clean.
  • Docs addition after the restack: docs/basichttp.md now covers what Adds the Basic HTTP Event I/O Processor #353 gained after this branch was cut. Every POST carries the send dedup key in an scxml-send-key header, and delivery is at-least-once. A front dedupes on the header value and answers a malformed one 400. The default adapter answers {:error, {:not_loadable, module, reason}} when :ssl or :public_key cannot be loaded. Checked against main at 3ffcf9d; cites ADR-0075 and its Amendment.
  • Decisions: the host declaration in the case schema, ruled by the operator, 2026-09-29; the key's name, the per-key lift and test201 unclaimed are ADR-0075's.
  • Beyond the brief's file map, forced by the change: conformance/RATCHET.md's host section said every W3C case omits host, so it now describes the new key (the contract a sibling port reads); README.md's and docs/testing.md's emitted counts; docs/extending.md now names the {module, opts} registration value and the optional ioprocessors_entry/2 the parent added, beside the link; Mix.Statifier.Corpus.Runner.start_runtime/0 puts :inets, :ssl and :public_key on the code path with Mix.ensure_application!/1, because mix statifier.corpus runs in the dev environment, where Mix pruning leaves :public_key off and a delivery through :httpc cannot be made without it; the generated modules alias HostCase (Credo's alias rule).
  • Stale sentences ADR-0075 lists for this change, updated: the :needs_basichttp reason line in tools/corpus/scxml_w3/exclusions.exs; the "out of scope" comment in conf_predicator.xsl; tools/corpus/README.md's exclusions bullet; docs/testing.md's list of excluded trees.

Checks

  • Full mix quality green on the restacked head, quoted whole in a comment below; mix quality --profile merge green (the ADR judge skipped: no file in the diff is in a judged scope).
  • New tests carry sabotage notes; each mutation was run and turned its test red: HostCase registering nothing, dropping the short form, not stopping the front, the empty clause answering a non-empty map; Upstream not declaring the host; the schema's W3C additionalProperties and item enum removed; and without the ensure_application! call, mix statifier.corpus --check names the eleven ratcheted cases as disagreeing. These checks ran before the restack.
  • CI: ci.yml on this pull request (base main). An earlier workflow_dispatch run on the stacked head is linked in a comment below.

@johnnyt

johnnyt commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

CI (workflow_dispatch on this branch, since the base is not main): run 36723868371 at a9e3d35, conclusion success.
https://github.com/riddler/statifier-ex/actions/runs/36723868371

Base automatically changed from st-gje8-basichttp-processor to main September 30, 2026 15:17
The twelve W3C documents that need the Basic HTTP Event I/O Processor
leave the exclusions. Eleven join the ratchet and the registry; test201
enters the corpus unclaimed, for the reason ADR-0075 decision 7 gives.

- The case schema gains host.event_io_processors, a closed set whose
  one member is the Basic HTTP URI, and the one host key a w3c case
  may carry.
- The emitter declares it for a W3C document naming the processor as
  a send type; the corpus host and the generated modules register the
  processor behind a loopback front (HostCase).
- conf:basicHTTPAccessURITarget emits the IRP's access URI spelling.
- A guide, docs/basichttp.md, with a req transport recipe as text;
  the stale exclusion sentences and the emitted counts are updated.

Refs: st-8kn8
docs/basichttp.md now says what a host needs from ADR-0075's
Amendment: every POST carries the send's dedup key in the
scxml-send-key header, delivery is at-least-once, a front dedupes on
the header's value and answers a malformed one 400, and the default
adapter answers an error when :ssl or :public_key cannot be loaded.

Refs: st-8kn8
@johnnyt
johnnyt force-pushed the st-8kn8-basichttp-corpus branch from a9e3d35 to cf0d389 Compare September 30, 2026 15:21
@johnnyt

johnnyt commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

Full mix quality, quoted whole, run on the tree committed as cf0d389 (this branch rebased onto main at 3ffcf9d, plus the guide addition):

Running quality checks...

✓ Format: No changes needed (381ms)
✓ Compile: dev + test compiled (warnings as errors) (438ms)

Running analysis stages in parallel...

○ Gettext: skipped (:gettext not installed)
○ ADR judge: skipped (disabled in .quality.exs)
✓ Doc links: 38 links checked (89ms)
✓ Dependencies: No unused dependencies (899ms)
✓ Gate guard: No unjustified gate changes (1.1s)
✓ ADR guard: No likely ADR violations (1.4s)
✓ Sobelow: No findings (2.0s)
✓ Doctor: Passed (2.3s)
✓ Docs: No warnings (6.0s)
✓ Conformance corpus: Passed (7.3s)
✓ Credo: No issues (9.3s)
✓ Dialyzer: No warnings (12.3s)
✓ Regression ratchet: Passed (16.2s)
✓ Tests: 3,142 of 3,142 passed, 96.3% coverage (20.7s)

✓ All quality checks passed!

@johnnyt
johnnyt marked this pull request as ready for review September 30, 2026 15:21
@johnnyt
johnnyt merged commit c4bbc96 into main Sep 30, 2026
1 check passed
@johnnyt
johnnyt deleted the st-8kn8-basichttp-corpus branch September 30, 2026 15:23
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