Skip to content

docs,test(schema): clarify fixed OctadSchema contract and add VCLS/gate tests (#118) - #128

Merged
hyperpolymath merged 1 commit into
mainfrom
arena/ee4cf0cf-vcl-ut
Oct 24, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
arena/ee4cf0cf-vcl-ut

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Follows up on #118 (and upstream hyperpolymath/verisimdb#299) by clarifying directly on OctadSchema, the VCLS v1 wire codec, the vclt-gate contract, and the terminology docs that:

  • the eight-slot OctadSchema and VCLS v1 wire format remain fixed unless their contracts are deliberately changed in a versioned update;
  • modality profile is used only for a generic, implementation-specific selection of modalities and does not imply that existing wire formats or APIs accept arbitrary cardinalities;
  • empty or omitted modality field lists in OctadSchema / vclt-gate JSON do not remove a slot or signal profile membership; and
  • the fixed eight-slot wire and gate behavior is now pinned by executable Rust tests and Idris2 Refl conformance proofs without making any breaking schema change.

Refs #118.

Changes

  • Schema & wire documentation (src/core/Schema.idr, src/interface/WireDecode.idr, src/interface/parse/src/schema.rs, src/interface/parse/src/wire.rs, src/interface/parse/WIRE-FORMAT.adoc): Document that OctadSchema and VCLS v1 carry all eight modality slots in canonical record order with no modality-count prefix, remain fixed unless deliberately changed by a versioned contract update, and reject non-eight-slot streams (Truncated / TrailingBytes).
  • Terminology & contract docs (docs/standards/MODALITY-PROFILES.adoc, docs/decisions/0007-modality-profiles-vs-octad-schema.adoc, docs/vclt-gate-contract.adoc, docs/wikis/GLOSSARY.adoc, README.adoc, CHANGELOG.adoc): Use modality profile strictly for a generic, implementation-specific selection of modalities, clarify that it does not imply arbitrary-cardinality wire support, and cross-reference the new test and proof witnesses.
  • Rust VCLS v1 wire tests (src/interface/parse/tests/wire.rs): Add schema_roundtrip, schema_decoder_total_on_garbage, schema_decoder_total_with_valid_header, and vcls_wire_format_enforces_fixed_eight_slot_octad_schema (verifying that < 8 slots fail with WireError::Truncated, 8 slots round-trip, and > 8 slots fail with WireError::TrailingBytes).
  • Idris2 Refl conformance proofs (src/interface/WireConformance.idr): Add conformS_sixSlotsTruncated (fromWireSchema sixSlotSchemaWire = Left Truncated) and conformS_nineSlotsTrailing (fromWireSchema nineSlotSchemaWire = Left TrailingBytes).
  • Gate tests (src/interface/parse/tests/gate.rs, src/interface/parse/tests/gate_transport.rs): Add empty_modality_slot_still_exists_in_octad_schema and omitted_schema_keys_normalize_to_fixed_eight_slot_octad_schema.

RSR Quality Checklist

Required

  • Tests pass (just test or equivalent)
  • Code is formatted (just fmt or equivalent)
  • Linter is clean (no new warnings or errors)
  • No banned language patterns (no TypeScript, no npm/bun, no Go/Python)
  • No unsafe blocks without // SAFETY: comments
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • REUSE and repository license policy pass (just license-check)
  • No secrets, credentials, or .env files included

As Applicable

  • .machine_readable/STATE.a2ml updated (if project state changed)
  • .machine_readable/ECOSYSTEM.a2ml updated (if integrations changed)
  • .machine_readable/META.a2ml updated (if architectural decisions changed)
  • Documentation updated for user-facing changes
  • TOPOLOGY.md updated (if architecture changed)
  • CHANGELOG or release notes updated
  • New dependencies reviewed for license compatibility (MPL-2.0 code; CC-BY-SA-4.0 documentation)
  • ABI/FFI changes validated (src/interface/abi/ and src/interface/ffi/ consistent)

Testing

  • bash tests/aspect_tests.sh (7/7 passed)
  • sh scripts/honesty-guard.sh (Clean)
  • sh scripts/check-ffi-header.sh (OK)
  • INPUT_PATHS_IGNORE="assail-classifications.a2ml" bash .githooks/validate-a2ml.sh (120/120 valid, 0 errors/warnings)
  • git diff --check (clean)
  • CI gates (parse-gate.yml, proof-corpus.yml, rust-ci.yml, e2e.yml, governance.yml, reuse.yml)

Screenshots

N/A (documentation, tests, and compile-time proof corpus).

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 49d83cf6-ee4a-4391-a40e-021c8e059f7e
Commits

Reviewing files that changed from the base of the PR and between 4ec9d86 and 071ce36.

Files selected for processing: 15
  • CHANGELOG.adoc
  • README.adoc
  • docs/decisions/0007-modality-profiles-vs-octad-schema.adoc
  • docs/standards/MODALITY-PROFILES.adoc
  • docs/vclt-gate-contract.adoc
  • docs/wikis/GLOSSARY.adoc
  • src/core/Schema.idr
  • src/interface/WireConformance.idr
  • src/interface/WireDecode.idr
  • src/interface/parse/WIRE-FORMAT.adoc
  • src/interface/parse/src/schema.rs
  • src/interface/parse/src/wire.rs
  • src/interface/parse/tests/gate.rs
  • src/interface/parse/tests/gate_transport.rs
  • src/interface/parse/tests/wire.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 37
  • GitHub Check: governance / Well-Known (RFC 9116 + RSR)
  • GitHub Check: governance / Workflow security linter
  • GitHub Check: governance / Code quality + docs
  • GitHub Check: governance / Language / package anti-pattern policy
  • GitHub Check: governance / Licence consistency
  • GitHub Check: governance / Guix primary / Nix fallback policy
  • GitHub Check: governance / Check Workflow Staleness
  • GitHub Check: scan / gitleaks
  • GitHub Check: governance / Trusted-base reduction policy
  • GitHub Check: governance / Security policy checks
  • GitHub Check: scan / rust-secrets
  • GitHub Check: rust-ci / Detect Cargo.toml
  • GitHub Check: hypatia / Hypatia Neurosymbolic Analysis
  • GitHub Check: scan / shell-secrets
  • GitHub Check: attest — clippy / tests
  • GitHub Check: Aspect tests
  • GitHub Check: E2E structural validation
  • GitHub Check: recompute-wasm — clippy / tests
  • GitHub Check: idris2 0.8.0 --build vclut-abi
  • GitHub Check: panic-attack assail
  • GitHub Check: Root workspace tests
  • GitHub Check: ffi/zig — fmt / header / zig build test
  • GitHub Check: Dependency audit
  • GitHub Check: Validate K9 contracts
  • GitHub Check: vcltotal-parse — panic-free / clippy / tests
  • GitHub Check: openssf-compliance
  • GitHub Check: analyze (actions, none)
  • GitHub Check: Hypatia neurosymbolic scan
  • GitHub Check: Validate eclexiaiser manifest
  • GitHub Check: Validate DEED manifests
  • GitHub Check: idris2 0.8.0 --build vclut-core
  • GitHub Check: Empty-linter (invisible characters)
  • GitHub Check: license-policy
  • GitHub Check: Groove manifest check
  • GitHub Check: Derive matrix from echidna provers.a2ml
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: license-policy
Additional context used
Code guidelines: 1
.github/copilot-instructions.md — auto-discovered
Path-based instructions: 2
Source excerpt: Rust: no `transmute` unless FFI with `// SAFETY:` comment

CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • src/interface/parse/src/schema.rs
  • src/interface/parse/tests/gate.rs
  • src/interface/parse/src/wire.rs
  • src/interface/parse/tests/wire.rs
Source excerpt: Idris2: no `believe_me`, no `assert_total`

CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • src/core/Schema.idr
  • src/interface/WireConformance.idr
  • src/interface/WireDecode.idr
Additional comments: 7
CHANGELOG.adoc: 1

65-65: LGTM!

Also applies to: 67-73

README.adoc: 1

141-148: LGTM!

docs/decisions/0007-modality-profiles-vs-octad-schema.adoc: 1

30-31: LGTM!

Also applies to: 33-35, 39-41

docs/standards/MODALITY-PROFILES.adoc: 1

11-15: LGTM!

Also applies to: 22-25, 28-32, 46-52, 177-180, 196-203

docs/vclt-gate-contract.adoc: 1

205-208: LGTM!

docs/wikis/GLOSSARY.adoc: 1

115-120: LGTM!

Also applies to: 147-151

src/core/Schema.idr: 1

11-14: LGTM!

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Clarified that Octad schemas and the VCLS v1 wire format always use eight modality slots. Empty slots do not remove a modality or indicate whether a witness is present.
    • Explained that generic modality profiles do not add variable-slot support; changing the fixed cardinality requires a deliberate contract change.
  • Tests
    • Added coverage confirming that schemas with too few or too many slots are rejected, and that omitted schema data behaves consistently with explicitly specified slots.

This PR clarifies that modality profiles are generic, implementation-specific selections and distinguishes them from the fixed eight-slot OctadSchema and VCLS v1 wire contract. It adds Idris conformance proofs and Rust tests for fixed arity, empty slots, and omitted schema data.

Changes: Modality Contract and Validation

Layer / File(s) Summary
Define modality profiles and fixed schema scope
CHANGELOG.adoc, README.adoc, docs/decisions/0007-modality-profiles-vs-octad-schema.adoc, docs/standards/MODALITY-PROFILES.adoc, docs/vclt-gate-contract.adoc, docs/wikis/GLOSSARY.adoc, src/core/Schema.idr, src/interface/parse/src/schema.rs
The documentation and schema comments distinguish generic modality profiles from the fixed eight-slot OctadSchema and VCLS v1 contracts.
Specify and prove wire arity
src/interface/WireDecode.idr, src/interface/parse/WIRE-FORMAT.adoc, src/interface/parse/src/wire.rs, src/interface/WireConformance.idr
Decoder documentation specifies the eight-slot order and errors for shorter or longer streams. Idris conformance proofs cover six- and nine-slot streams.
Test schema and gate handling
src/interface/parse/tests/gate.rs, src/interface/parse/tests/gate_transport.rs, src/interface/parse/tests/wire.rs
Tests cover empty modality slots, omitted schema data, schema round-tripping, decoder totality, canonical encoding, and rejection of streams with other slot counts.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: claude

Merge Risk: Minimal · up to 071ce

The documentation and tests can merge after normal checks. The existing tag-order decoder gap remains separate follow-up work.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 5 files. (10 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description check Passed The description is complete and closely follows the repository template. It explains the purpose, lists the main changes, records testing and quality checks, and updates the applicable documentation a…
Title check Passed The title clearly identifies the fixed OctadSchema contract and the added VCLS and gate tests. It is concise and directly related to the main changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is complete and closely follows the repository template. It explains the purpose, lists the main changes, records testing and quality checks, and updates the applicable documentation and changelog items.

Full details: Docstring Coverage

Explanation

Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 5 files. (10 skipped: 10 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T11:30:41.650644Z 071ce36 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath merged commit a8d31ff into main Oct 24, 2026
188 of 189 checks passed
@hyperpolymath
hyperpolymath deleted the arena/ee4cf0cf-vcl-ut branch October 24, 2026 11:37
hyperpolymath added a commit that referenced this pull request Oct 27, 2026
…ts (#130)

## Summary

CodeRabbit posted two findings on #125 that arrived as it merged. This
PR fixes both.

## Changes

- `docs/vclt-gate-contract.adoc`: the contract said the consumer "passes
the path as `argv[1]`". The actual invocation is `argv[1]` = `--input`
and `argv[2]` = the path, and a bare path is `bad_invocation`. A
consumer written from the old wording would fail on every call.
- `tests/gate_transport.rs`: the parity test compared stdin with
`--input` but never checked the verdict itself, so it would still pass
if both transports were wrong in the same way. Each case now pins its
expected exit code, checked against the built binary: admitted 0,
rejected 1, bad version 2. The bad-version case also asserts
`unsupported_version`.

## RSR Quality Checklist

### Required

- [x] Tests pass: `cargo test --test gate_transport` passes 5/5.
- [x] Code is formatted: my change is fmt-clean. `rustfmt --check` on
`gate_transport.rs` still reports one diff, at line 135 in the schema
test that #128 added. It is on `main` and outside this change.
- [x] Linter is clean: `cargo clippy --all-targets` produced no
warnings.
- [x] No banned language patterns
- [x] No `unsafe` blocks
- [x] No banned functions
- [ ] REUSE / licence check: not run. No new files.
- [x] No secrets

### As Applicable

- [x] Documentation updated

## Testing

`cargo test --test gate_transport` and `cargo clippy --all-targets` in
`src/interface/parse`. `asciidoctor -w` is clean on the contract.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01PpQVLrCbURpoXtrdvy8V3B)_

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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