The design argues the conformance suite is the specification and should be built before either implementation, since two hand-written implementations of one language diverge unless something shared pins them. This is that suite: 38 cases in /processing, a language-neutral top-level directory for the same reason /proto is one -- the Rust agent and the Go ingest tier both consume the definition and neither owns it. Nothing executes the cases, because neither implementation exists. A stdlib-only validator checks the corpus stays well-formed and runs in CI: known actions, addressable fields, compilable patterns, names matching filenames, and no case depending on record_id, which is withheld so the question of whether an ingest-side rule can see one stays open. The validator was checked against seven deliberately broken cases before being trusted, since "38/38 valid" means nothing from a validator that cannot fail. Writing the cases first has already paid for itself twice. It forced two determinism decisions the prose had left vague, both of which a conformance suite cannot avoid answering. Sampling is counter-based rather than random: random is statistically nicer and impossible to assert on. Windows are measured on record timestamps rather than wall-clock, which makes replay deterministic and, not incidentally, makes backfill behave correctly where a wall-clock window would not. And it made the missing aggregate_count answer concrete. The design does not say what that action emits, or what a query not expecting a synthetic record sees. Rather than invent one by writing cases, the validator rejects any case using it, so the design question has to be answered before the behaviour can be frozen by accident. The corpus includes the acceptance case from real measured data: the two processes that account for roughly 60% of a real workstation's journal volume, and the one kernel message worth keeping. Signed-off-by: John Coffey <[email protected]>
30 lines
1.1 KiB
YAML
30 lines
1.1 KiB
YAML
name: Processing conformance corpus
|
|
|
|
# /processing/conformance/cases IS the Phase 8 rule language spec: two
|
|
# implementations (Rust in the agent, Go at ingest) will each be held to
|
|
# it, and two hand-written implementations of one language diverge
|
|
# unless something shared pins them.
|
|
#
|
|
# Neither implementation exists yet, so nothing here executes rules.
|
|
# What this checks is that the corpus stays well-formed in the meantime
|
|
# -- known actions, addressable fields, compilable patterns, no case
|
|
# quietly depending on record_id. Cheap insurance against the spec
|
|
# rotting during the gap between writing it and building against it.
|
|
#
|
|
# Its own workflow, following web-routes.yml's reasoning: license-
|
|
# compliance.yml already carries one unrelated check for historical
|
|
# reasons, and that is not worth compounding.
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
conformance-corpus:
|
|
name: processing conformance corpus check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: python3 processing/conformance/validate.py
|