Skip to content

feat(blocks): publish a machine-readable registry manifest with a regenerate-and-diff guard#171

Merged
jscott3201 merged 2 commits into
developmentfrom
claude/blocks-registry-manifest
Jul 21, 2026
Merged

feat(blocks): publish a machine-readable registry manifest with a regenerate-and-diff guard#171
jscott3201 merged 2 commits into
developmentfrom
claude/blocks-registry-manifest

Conversation

@jscott3201

Copy link
Copy Markdown
Owner

Rung 1 of 7 of the interchange-trio ladder (owner-ratified 2026-07-21). Closes #164.

What

A published, machine-readable inventory of the executable block registry, generated FROM the registry so it cannot drift:

  • tools/reference-catalog/oce-blocks.registry-manifest.json — ordered JSON array, one object per RegistryEntry in CATALOG slice order (133 entries): class_path, typed positional ports of the ParamTable::default()-resolved instance (resolved_signature(), not static), a width_driven flag (presence of Structural/StructuralArrayElements rules), and the complete param-rule list with every embedded guard field (e.g. PID k/Ti/Td{"rule":"RealGreaterOrEqual","min":1e-13}).
  • crates/oce-blocks/src/registry/manifest.rs (+ mirrored tests, all #[cfg(test)]) — deterministic generator + hand-written serializer matching ParamRule exhaustively with no wildcard arm: a new variant fails compilation until the published schema is consciously extended. In-crate placement is load-bearing (ParamRule is #[non_exhaustive]; a cross-crate match would need a wildcard, silently defeating the guard).
  • Regenerate-and-diff byte golden as a normal oce-blocks nextest test — executed per-PR cross-arch by the existing determinism-matrix (x86_64 + arm64, debug + release). Zero new CI jobs.

Sync guarantee (#164 acceptance)

Registry change without re-bless → checked_in_manifest_matches_regenerated_bytes fails; new ParamRule variant → compilation fails. Re-bless is UPDATE_EXPECT=1 (existing repo convention).

Variadic subtlety (red-team-derived)

MultiAnd/MultiOr and the three *VectorFilter entries have EMPTY default-resolved inputs (nin defaults 0) — the manifest records that faithfully and marks them width_driven: true; a divergence test pins resolved_signature() widening to 3 Boolean inputs at nin=3 while static signature() stays empty (why the manifest reads resolved). Positive controls: extractor/replicator families (defaults 1).

Tests

8 new property-named tests (workspace 1181 → 1189): byte golden + double-render identity, coverage oracle (sequence equality with live CATALOG + uniqueness + 133 pin), panic-free 133-constructor sweep, empty-at-default width-flag assertions (logical + vector-filter), non-empty positive controls, variadic divergence, float shortest-round-trip pins (0.001, 0.5, 2.0, -1e-37, 1e-15 byte-exact).

Pre-push mutation self-checks (run → caught → reverted): dropped min from the RealGreaterOrEqual arm → byte golden FAIL (line 24); swapped CATALOG slices 0↔1 → byte golden FAIL (line 2).

Gates (implementer + independent lead re-run, both green)

fmt · clippy -D warnings · nextest 1189/1189 · doctests · file-size cap · determinism-matrix mirror 448/448 release.

🤖 Generated with Claude Code

jscott3201 and others added 2 commits July 21, 2026 19:04
…enerate-and-diff guard (#164)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… and document manifest limits (#164)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jscott3201
jscott3201 merged commit 47c1ba8 into development Jul 21, 2026
14 checks passed
@jscott3201
jscott3201 deleted the claude/blocks-registry-manifest branch July 21, 2026 23:22
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.

Publish a machine-readable manifest of implemented CDL elementary blocks (registry manifest)

1 participant