feat(schema): code, diff and progress blocks, block semantics, and the lens contract (#15) #17
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/spec-blocks-views-forms"
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?
Scope
The second part of #15: the parts toilville-design#177 and #189 have decided that need no new endpoint.
schemas/forge_block.json1.2 adds three block variants:code(design #186): one or more files.diff(#187): hunks of lines, a status (proposed, applied, rejected, no_change, conflict),base_version, and anapplywith a granularity.progress(#185): a bar, a step list, or both.semanticsobject ({intent, importance, variant}). There is noconfirmvariant: a confirmation is a CEREMONY/critical composition.schemas/lens.json1.0: Personality controls plus per-view block placement, as ville decided in #189.openapi.yaml0.63.0 mirrors these.CHANGELOGcuts 1.4.0.tools/check_schema_registry.pyhas failed onmainsinceframe_wire1.4 merged in #14, because the newest release was still 1.3.0. Cutting the release is what that check asks for, but it is a release decision, so change it if you'd rather number it differently.Differs from #15 as written:
semanticsis a nested object, not flatsemantic_intent/importancefields, because the FlutterForgeBlockSemanticsand the macOSSemanticIntent.swiftalready parse"semantics": {"intent", "importance", "variant"}.Left out:
/views, intent forms, interaction submit and parlay commands:ritual-serverserves none of them, andcore.block_specshas no surface, actor or provenance columns to store a lens.wish/parlayin the blocksentity_typeenum: the live specs arewishes(plural), and none exist for parlays.sealed_confirm: not served yet.Testing
python3 tools/check_schema_registry.py: consistent, 6 files. It fails onmain.python3 -m pytest -q: 18 passed, 1 xfailed.jsonschema(Draft 2020-12):codeblock, a proposed and a no_changediff, aprogresswith steps, a CEREMONY/criticalsection, and an unknown future intentfiles,value1.5, an unknown diff status, importanceurgent, a lowercase intent,type: confirm, and languageRustlens.jsonrejects an accent, a raw token, a non-user provenance, a negative reduction and an unknown densityImpact Statement
forge_block1.1 → 1.2, OpenAPI 0.62.0 → 0.63.0, newlens1.0. A client generated from 1.1 does not recognise the three new block types; both clients already fall back on unknown types.forge_block.json,index.json1.6, and the newlens.json. No database schema change.crates/frame-wire-contractvendors this repository'sschemas/andopenapi.yamlverbatim, so it should be re-vendored once this merges.SemanticIntentmirrors UDG's 11 names, andImportanceLevelmirrorsImportanceLevel.Docs
CHANGELOG.mdrecords the additions, the deliberate differences from #15 and what's left out. The schema descriptions carry the #189 limits: density steps, corner radii, the motion ceiling and atmosphere baselines.forge_block.json 1.2 adds the code, diff and progress variants decided in toilville-design#177, and an optional semantics object {intent, importance, variant} on every block, which is the shape the Flutter and macOS clients already parse. There is no confirm variant: a confirmation is a CEREMONY / critical composition. lens.json 1.0 is new: Personality controls (density, corners, motion and an atmosphere reduction that can only lower the mode's baseline) plus per-view block placement, following ville's ownership model in toilville-design#189. It holds no token values and no accent. openapi.yaml 0.63.0 mirrors the new definitions. CHANGELOG cuts 1.4.0 so the schema registry check, red on main since frame_wire 1.4, passes.Added
GET /api/v1/viewsandGET/PUT/DELETE /api/v1/lens(6db049c), which describe ritual-engine#870. Because this repo only describes served endpoints, merge this after ritual-engine#870 and spel#1041. Checks: openapi-spec-validator passes;tools/check_schema_registry.pypasses; pytest 18 passed, 1 xfailed; exampleResolvedViewandLensinstances validate, and the accent, reduction-3 andprovenance: usercases are refused.