ci: give this repository a CI job, and fix what its first run found #9
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/spec-repo-has-ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 0 of the approved plan, for the repository where the gap was total: this
repo had no CI. The only workflow was
pr-policy-check.yml, which reads thePR description and never looks at the contents.
Its first run found six real defects. All are fixed here.
Scope
Five schemas that were never written.
schemas/index.jsonadvertisedactor_manifest,mode,ritual,rubricandruse.git log --all -- schemas/<name>.jsonreturns zero commits for every one of them. Themachine-readable registry of this contract has always described half a
repository that does not exist. Removed, along with their now-empty category
entries. The matching
examples/*.yamlare left alone — they illustrateconcepts, not schemas.
A version two releases behind.
index.jsonrecordedframe_wireat 1.1while the CHANGELOG had shipped 1.2.0 and then 1.3.0. Commit
3eae10c— the1.3.0 amendment itself — edited
index.jsonand left the version untouched. Aconsumer reading the registry to learn which contract it was getting was told
1.1. Corrected, and now compared against the CHANGELOG so it cannot drift again.
tools/check_schema_registry.pyenforces five properties, every one of whichhas been false on
mainat some point: a registry entry with no file, a filewith no registry entry, a version behind the CHANGELOG, a schema that stops
compiling, and a new file declaring no
$schemawithout being recorded as anentity descriptor.
That last one exists because
schemas/holds two kinds of file.tool_manifest.jsonandwish.jsonare entity descriptors (name,version,canonical,extensions) rather than JSON Schema documents, socompiling them would be a category error. They are listed explicitly rather
than skipped by heuristic, so a real schema that merely forgets
$schemaisstill reported.
Testing
All five properties mutation-tested — broken one at a time, each watched to
fail with its own message, then restored to a clean tree:
$schema, not a descriptorRun in a clean
python:3.12-slimcontainer, as CI will, not just on my machine.Two findings recorded rather than acted on
The Python suites are not run here, and that is a finding. As of today:
dynseal/test_security_scenarios.pyand its byte-identical copy underdocs/collect zero tests — the file is a script whose class is not named
Test*—while their duplicate basename aborts pytest collection for the whole repo.
docs/test_prism.pycollects zero.docs/test_schema_sync.pycannot importschema_validatorfrom the repo root. Onlydocs/test_api.pyholds real tests:32, of which 23 error without a live API. Switching those on today would be red
for reasons unrelated to the contract. Needs its own slice; I could not file the
wish because wish writes currently need
ritual auth login.Both ratified schemas declare a
$schemaURI that does not exist.frame_wire.jsonandforge_block.jsonboth say"https://json-schema.org/draft/2020-12"— missing the trailing/schema, soit resolves to nothing and every validator falls back to its newest supported
draft. That is 2020-12 today, which is why nothing has broken; Python's
jsonschemawarns that it "will raise an error in the future". Rust nevernoticed because
ritual-coreandframe-wire-contractboth pass.with_draft(Draft202012)explicitly and never consult the declared URI.It is reported, not failed, because the same bytes are vendored into
ritual-engine (twice) and rituals-chat (once), each pinned by its own guard —
correcting the source alone would put three repositories in conflict. The fix is
three coordinated PRs. The checker names it in its output and in a note at the
bottom of the file, so it is tracked rather than tolerated, and says to tighten
the check to the exact canonical URI once the re-vendoring lands.
Worth noting what that cost demonstrates: a one-character correction to a
ratified document currently requires three reviewed PRs across three
repositories. That is the argument for depending on a published version rather
than copying a file.
Impact Statement
index.jsonlosesfive entries that pointed at nothing and gains a correct version.
index.jsonnow sees fiveschemas instead of ten — the five that exist. If anything depended on the
fictional entries it was already broken.
index.jsonis reformatted by the fix (2-space JSON).jsonschemaat job time.nothing that worked stops working.
Deliberately not in scope
This does not check the contract's content. That is
crates/frame-wire-contractin ritual-engine — 60 tests driving the normativefold against these exact bytes. A second opinion here about the same thing is
the failure this contract exists to prevent.