Repository navigation
docs: define modality-profile terminology and cardinality semantics (#299) - #313
Conversation
…299) Terminology-only change for issue #299. No wire format, schema or API change: OctadInput, octad-input.json, the VCL grammar and every client type are untouched. - docs/modality-profile.adoc (new, canonical for the vocabulary): defines consonance subject / modality set / modality profile / Octad, and their cardinality; states required-vs-optional against the current source (the seven payload modalities are optional, temporal is store-written and always present, metadata is not a modality); documents that the profile is fixed at eight slots and is not selectable per request; records that HEXAD is a legacy VCL source keyword and not a six-modality profile; gives examples for the supported cases and an explicit "not supported" list. - scripts/check-modality-contract.py + tests/modality-contract-gate.sh: bind the doc's slot/payload annotations to modality.json, octad-input.json and the ModalityStatus/OctadInput structs, with a positive control that plants four drift directions. Wired into the Documentation Gates workflow; stdlib only, no new action, actions.lock unchanged. - Terminology aligned in README, EXPLAINME, ARCHITECTURE, FAQ and docs/INDEX. - CHANGELOG records five contract divergences found while verifying, all referred for an owner ruling rather than fixed: OpenAPI body vs the server's flattened OctadRequest, the promised automatic provenance event, hand-written client OctadInput types, the Rust client posting a body the server ignores, and the unversioned JSON-Schema $id's. Refs #299. Does not close it: acceptance criteria are partly owner decisions. Co-authored-by: arena-agent <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Define and publish modality profile semantics docs/modality-profile.adoc, ARCHITECTURE.adoc, EXPLAINME.adoc, FAQ.adoc, README.adoc, docs/INDEX.adoc |
The canonical reference documents the eight fixed Octad slots, modality membership, input and update behaviour, examples, unsupported cases, and known contract divergences. Related documentation links to the reference and distinguishes the Octad profile from a subject’s modality set. |
Compare documentation with schema and Rust contracts scripts/check-modality-contract.py |
The checker compares documented slot and payload declarations with JSON schema and Rust fields. It checks that the input schema is closed and that temporal is the only slot without a payload field. |
Test and run the contract gate tests/modality-contract-gate.sh, .github/workflows/doc-consonance.yml, CHANGELOG.adoc |
The shell gate checks the repository and fixture mutations. The workflow runs the gate. The changelog records the documentation, unresolved divergences, and verification results. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Other
Merge Risk: 
Minimal · up to 9e8e4
-
No actionable merge-blocking issue is established; the documentation and contract gate are mergeable after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. (8 skipped: 8 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
🛠️ Fix failing CI checks
-
- 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.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e8e40e368
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| * *Update merges.* A supplied modality is replaced; an omitted modality is left | ||
| untouched, and its presence flag carries over from the pre-update status |
There was a problem hiding this comment.
Distinguish replacement from append-only modality updates
For updates supplying graph or provenance data, the blanket statement that a supplied modality is replaced contradicts the implementation. In rust-core/verisim-octad/src/store.rs, update() calls process_graph(), which inserts the supplied edges without removing existing relationships, and process_provenance(), which appends an event to the existing chain. A consumer following this canonical description could submit a replacement relationship list and incorrectly assume old relationships were removed. Document these modality-specific update semantics while retaining the separate guarantee that omitted modalities preserve their presence flags.
Useful? React with 👍 / 👎.
| |`vector` |yes, `Option` |yes |`embedding` length must match the store's | ||
| configured `vector_dimension`. | ||
| |`tensor` |yes, `Option` |yes |`shape` product must equal `data` length. | ||
| |`semantic` |yes, `Option` |yes |No required sub-fields. |
There was a problem hiding this comment.
Qualify the semantic payload's required sub-fields
When deserializing a core OctadInput, an empty semantic payload is not valid: OctadSemanticInput in rust-core/verisim-octad/src/lib.rs declares non-optional types: Vec<String> and properties: HashMap<String, String> without any #[serde(default)] attributes, so both fields must be present. Only octad-input.json permits their omission. Since this table explicitly describes the source-verified OctadInput contract, saying there are no required sub-fields conceals another schema/core divergence and directs consumers toward payloads that fail deserialization. State the core requirements or explicitly distinguish them from the schema's optional fields.
Useful? React with 👍 / 👎.
|
Add Carrot credits or activate Agent usage billing to use Autofix |
|
The task could not be completed. Open the task for details or retry. |
|
✅ CI fix PR created: Follow
18 PR-caused check(s)
⏭️ Checks skipped: 7 · already failing on `main` (not caused by this PR)
14 file(s) modified
View agent analysis
|
<!-- coderabbit-ai-generated:v1 --> CI failure fixes was requested by @hyperpolymath. * #313 (comment) The following files were modified: * `Cargo.lock` * `rust-core/verisim-api/src/proto/verisim.rs` * `rust-core/verisim-document/src/lib.rs` * `rust-core/verisim-graph/src/lib.rs` * `rust-core/verisim-normalizer/src/lib.rs` * `rust-core/verisim-normalizer/src/regeneration.rs` * `rust-core/verisim-octad/src/lib.rs` * `rust-core/verisim-provenance/src/lib.rs` * `rust-core/verisim-semantic/src/lib.rs` * `rust-core/verisim-spatial/src/lib.rs` * `rust-core/verisim-storage/src/backend.rs` * `rust-core/verisim-temporal/src/lib.rs` * `rust-core/verisim-tensor/src/lib.rs` * `rust-core/verisim-vector/src/lib.rs` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Follow-up to #313 (merged `cb6c538`), which delivered the terminology half of #299. This lands the **handover** so the session survives as a document instead of a conversation. ## What this adds - **`docs/HANDOVER-2026-10-24.adoc`** (new) — 14 sections: - current state, and the four gates that guard it - what #299 asked for, criterion by criterion, with an honest verdict - the vocabulary as adopted (modality profile / modality set / Octad), including the rules that follow for downstream projects - cardinality and required/optional, **each row with its source evidence** (`OctadInput::default()` is a valid create; `temporal` is store-written on every create *and* update; `require_complete` is declared but read by no code; `additionalProperties: false` versus the Rust types' missing `deny_unknown_fields`) - `HEXAD` settled against grammar v3.0 - the six contract divergences, with a table of which consumers speak which shape - the DEED / kyq / kyX standards findings - eight options for the request-shape ruling (O0–O6) and a recommended sequence - the three decisions still owed by the owner - ranked remaining work, a reproduce block, traps, and a thread map - **`docs/INDEX.adoc`** — new *Handovers* section. - **`CHANGELOG.adoc`** — `[Unreleased]` entry. ## Contract impact **None.** Documentation only; no schema, OpenAPI, grammar, Rust or client file is touched. Item 1 is analysed, costed and *not* implemented — deliberately, because it needs an owner ruling. ## Tests run | Gate | Result | |---|---| | `tests/doc-consonance-gate.sh` | PASS | | `scripts/check-doc-links.sh` | PASS — 389 links / 103 documents, 0 exempt | | `scripts/check-modality-contract.py` | PASS — 8 slots / 8 payload fields | | `tests/modality-contract-gate.sh` | PASS — 4 planted drift directions rejected | | `tests/assail-classifications-gate.sh` | PASS incl. positive control | **Not run:** no `cargo`/`rustc`/`mix`/`bun` here and crates.io is blocked, so no Rust, Elixir or Coq build ran. Nothing in this PR is code, so nothing new is untested. ## Issue status **#299 is deliberately left open.** The terminology half is delivered; the implicit "the contract is verified and versioned" half cannot be met by a documentation change — the JSON-Schema `$id`s are unversioned and the OpenAPI request body disagrees with the running server. The handover says so explicitly in §2, so nobody closes the issue on the strength of improved wording. Decision requests are consolidated in §9: (1) which request shape is canonical, (2) whether `deny_unknown_fields` may ship as a `400` now, (3) whether the promised automatic `created` provenance event should be implemented or the sentence deleted. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Added a handover document covering modality-profile terminology and the fixed eight-slot cardinality. * Documented differences between the schema, API, clients and grammar, along with standards research and verification findings. * Added links to the handover in the documentation index, including a summary of open decisions and follow-up work. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jonathan D.A. Jewell <[email protected]> Co-authored-by: Arena Agent <[email protected]> Co-authored-by: arena-agent <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Terminology-only change for issue #299 (no wire format, schema, grammar or client type is touched). Refs #299; does not close it — part of its acceptance criteria are owner rulings, see "What this does not do" below.
What changed
docs/modality-profile.adoc(new; canonical for the vocabulary)OctadInput::default()is a valid create);temporalis not settable via the server-sideOctadInputand is written by the store on every create/update;metadatais not a modality; update merges and does not shrink the set;is_complete()is an observation (OctadConfig::require_completeis declared but read by no code — stated as a real gap).profile_version, nocardinalityfield, no negotiation — and nothing invented. Existing version markers are listed.HEXADdocumented as a legacy VCL source keyword (hexad_source = 'HEXAD', uuid, grammar v3.0), explicitly not a six-modality profile and not evidence of a six-slot wire shape.scripts/check-modality-contract.py+tests/modality-contract-gate.sh— the doc's// modality-contract:annotations are bound tomodality.json,octad-input.jsonand theModalityStatus/OctadInputstructs, so the prose cannot silently describe an implementation that no longer exists. Stdlib Python only; no new action (actions.lockunchanged). Positive control plants four drift directions (ninth enum value, renamedModalityStatusfield, opened schema, extra slot in the doc) and asserts each is rejected for the right reason. Wired into the Documentation Gates workflow.README.adoc,EXPLAINME.adoc,ARCHITECTURE.adoc,FAQ.adoc,docs/INDEX.adoc;CHANGELOG.adocentry added.Tests run
tests/doc-consonance-gate.shscripts/check-doc-links.shtests/assail-classifications-gate.shtests/modality-contract-gate.sh(new)Not run: no
cargo/rustcand crates.io is network-blocked here, so no Rust test/clippyran. No Rust source changed; the doc's behavioural claims are read from source and the doc says where that matters.What this does not do (needs an owner ruling)
Five real contract divergences were found while verifying. None is fixed here — each moves a wire contract or a client API, which #299 explicitly keeps out of a terminology change. All are written up in
docs/modality-profile.adoc§9–§10 and in the CHANGELOG:verisim-api-v1.yamlbindsPOST/PUT /api/v1/octadsto the nestedoctad-input.json, while the handler deserialises the flattenedOctadRequest. Reconciling is breaking in one direction.createdprovenance event is automatic on create; nothing adds one, soprovenance_chain_lengthcan be0.temporal/name/description(Rust, Elixir) or amodalitieslist (Zig, Julia); the core type and schema declare neither.OctadInputto/api/v1/octads, whose keys are unknown toOctadRequestand ignored — by static reading a create would succeed near-empty rather than fail. Flagged as not verified end-to-end.$ids are unversioned, so "the versioned contract" cannot be cited by URL alone.Suggested follow-up: one issue per item above, with the canonical shape decided once.