Skip to content

dismech: mint the search band (0xA3..0xA9) and the residue it leaves - #279

Merged
AdaWorldAPI merged 7 commits into
mainfrom
claude/lance-graph-java-panama-valhalla-sus9w8
Aug 21, 2026
Merged

AdaWorldAPI merged 7 commits into
mainfrom
claude/lance-graph-java-panama-valhalla-sus9w8

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

ogar-dismech was already an ogar-loco vocabulary — 19 causal predicates minted contiguously from DOMAIN_FLOOR. This adds the second band: the seven constraint-propagation verbs that make resolution a search, plus the residue that search leaves behind.

Two bands, not one widened palette

The 19 are a closed measured set mirroring upstream's graph builder; folding operations into them would dissolve exactly the property their own test pins. So 0xA3..=0xA9 is a separate band with its own const, and it carries LOCAL: CURIEs — the ogar-ro precedent this crate already cites. A dismech: prefix would assert a provenance upstream never gave.

slot verb arity bodies
0xA3 candidates 0 0
0xA4 fold_xref 1 0
0xA5 naked_single 1 0
0xA6 hidden_single 2 0
0xA7 eliminate 2 0
0xA8 fork 1 2
0xA9 residue_band 1 0

Sudoku is meant mechanically

Resolution is elimination, not similarity.

  • naked_single — one candidate remains, the cell is forced.
  • hidden_single — the referent can sit in only one cell of its unit, so that cell is forced while still holding other candidates. This is the case where free text does not know what it names: the uniqueness is a property of the unit, never of the cell read alone.
  • eliminate — makes cardinality a moving state rather than a static count. A term with two candidates today has one after a neighbour resolves.
  • fork — keeps both arms. Deliberately not IF_ELSE: a conditional discards the untaken arm, and that retention is what makes the result a counterfactual instead of a choice.

fold_xref is ordered before any counting. Two addresses of one referent are not two referents; counting first reports a bookkeeping artifact as a fork.

The residue is an overlay — and that is a cost argument

residue_band maps candidate cardinality to the consumer's 3-bit reasoning band. Samples are collected at the graph's own addresses, in separate tables, never merged down.

The shape is eye tracking: you record where the eye looked, not what it saw. So "1:1" is the addressing; the occupancy is sparse. Writing the trace into each subject instead gives every subject a partial copy of the ontology's structure, which does not stay affordable — and it is why three bits suffice.

One-way, structurally. No search op declares DISMECH_TARGET_CODEBOOK: their operands are candidate sets and computed bands, never basin-scoped ids, so a residue value has no path to be read as a graph address.

Pothole → rung degradation → revision

Two of the four outcomes are potholes, and the mapping is the degradation:

candidates ordinal reading
0 0 Surface nothing addressable — the gap names its own cell (the reach-out hook)
1 2 Relation resolved
2..floor 4 Counterfactual bounded arms, each interventionable
>= floor 1 Association does not discriminate — hub-shaped

The diffuse case is hub-shaped in the exact sense Throttle::hub_indegree already means: a term with too many attachments is barred rather than guessed at. diffuse_floor is therefore the same kind of quantity — a required parameter with no shipped default. No measured value exists, and a constant would launder a guess into an apparent finding. Revision is downstream and elsewhere.

It is not evidence

Propagation forces a cell given the constraints; it does not prove it. Wrong constraints force wrong cells with full confidence. The value is not epistemic but search-economic — against tens of thousands of edges the question is rarely "is this true" and almost always "which is worth opening". Confirmation needs a channel the trace did not travel.

No bits move, and nothing derives the band where it is stored

The band's owner pins that the field is "set ONLY by an explicit with_reasoning_band() call" with nothing deriving it internally. So the ordinal is produced here and written there — no dependency edge in either direction, which is what honours that rule rather than breaking it. The v1-provenance gate is carried in the doc comment.

The rung is the layer, not the payload. Rungs project as a stack of alpha layers at zero bit cost: one table per rung over one address space, the 3-bit sample sitting inside a layer. The band is never mapped onto the rung ladder — its owner pins that they are unrelated enums sharing four variant names, at different ordinals.

Verification

  • 20 tests (13 pre-existing, unchanged + 7 new).
  • Five disable-runs, each verified red-then-green: the codebook guard (let search ops declare it → fails), computes-vs-asserts (make search ops assert → fails), meta-is-never-a-cardinality-outcome (let counting emit 6 → fails), the strict floor (< → <= → fails), band contiguity (punch a gap → fails).
  • Anti-vacuity is explicit where it matters: the codebook test asserts predicates do declare it, so it cannot pass by everything answering None.
  • One test was re-pinned, not silently widened: an_unminted_domain_byte_is_refused_not_guessed probed max(RELATIONS)+1, which is now candidates — it would have asserted "unminted" about a minted byte. It now probes past both bands, with the reason in the comment.
  • cargo fmt clean. cargo clippy carries two pre-existing assertions_on_constants findings in the collision-guard test — measured identical before and after this change, and left alone rather than fixed drive-by.

Named next, not built

  • The second-order collector over lance-graph-supervisor's PhaseCensus — a mask over the activities (one &self pass), never the retired actor/pump surface.
  • The 0/1/2/n distribution measurement that would calibrate diffuse_floor.

🤖 Generated with Claude Code

https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs


Generated by Claude Code

claude added 5 commits August 18, 2026 03:04
… BinaryLifting

Operator ruling, 2026-08-18: "Java is an entire different layer that's why
I chose another higher level." The classid domain byte carries ALTITUDE, not
just identity -- a slot's magnitude encodes how high the thing sits, so
placement is neither mnemonic nor next-free. 0x00-0x0F is the canonical
business/reference ontology, 0x17 is the substrate's own orchestration tier
(ogar-loco), and 0xC0+ is the C-band: strata ABOVE the Rust substrate,
foreign host layers the substrate reaches into rather than owns.

  0xC0 JavaRuntime    Panama + Valhalla -- the managed-runtime membrane over
                      the SoA substrate, and the FLOOR of the band: the door
                      every other tenant of that layer arrives through.
  0xC1 Analytics      the analyst estate -- addressable tabular units plus
                      the catalog ontology around them.
  0xC4 BinaryLifting  bolted onto 0xC0 (Ghidra is itself a JVM application),
                      so a TENANT of that layer rather than a peer of C0 --
                      and the slot number is the blast radius of turning any
                      binary into addressable rows.

All three are RESERVED-EMPTY -- zero concept rows, the same posture as
Osint / Genetics / Blocks -- so canonical_concept_domain returns a stable
tag before anything mints. No concept was invented; the 5+3 gate on actual
mints is untouched.

Why altitude earns the space: the domain byte is the first two nibbles of
the classid, so its top nibble is a 16-way altitude selector -- one mask
separates "substrate ontology" from "host layer" with no lookup and no value
decode, which is the canon's "the key prerenders nodes with zero value
decode" applied to layering. A first-nibble split is the most expensive
split the 16-ary cascade has; spending it on altitude is what makes it worth
spending.

Three fences carried in the variant docs, two of them reapplied from
D-BLOCKS-DOMAIN: (1) each domain names the shared CONCEPT, never a vendor --
ogar-bricks and a lakehouse consumer are two app prefixes over ONE Analytics
vocabulary, Ghidra and r2sleigh two consumers of the same SLEIGH specs over
ONE BinaryLifting vocabulary; (2) provenance, load-bearing for 0xC4 -- mints
must derive from permissively-licensed or specification sources (Ghidra core
is Apache-2.0), never by transcribing a GPL/AGPL or LGPL implementation, so
this public codebook stays unencumbered while a GPL consumer links it freely;
(3) no speculative widening -- 0xC0 is deliberately JavaRuntime rather than a
vendor-neutral HostRuntime, and another managed runtime would get its own
slot rather than dilute this one.

0xC2-0xC3 stay Unassigned BY INTENT, pinned by test exactly as the 0x10-0x16
gap below Blocks is. Two disable-runs confirm the guards are load-bearing:
dropping the 0xC4 arm turns the BinaryLifting assertions red; minting into
0xC2 turns the gap assertion red. Also pinned two-sided: 0x0C Automation is
not 0xC0 JavaRuntime -- a digit swap of each other, the one real legibility
hazard here, recorded rather than left to be rediscovered.

Gates: ogar-vocab 157/157 + 6 doctests, workspace 0 failures, cargo fmt
clean, clippy -p ogar-vocab --all-targets clean.

Ledger: docs/DISCOVERY-MAP.md D-CBAND-ALTITUDE (append-only, includes the
storno for three superseded slot proposals and their root cause: clustering
by shape where the axis is altitude). Layout doc updated with the band table
and the structural note.
…epts, not a concept

Cross-session ruling (lance-graph-java x ruff/R2IL, 2026-08-18): a
ConceptDomain is a vocabulary of ADDRESSABLE things. Panama's crossing
concepts -- downcalls, segments, lanes, arenas, masks -- are addressable;
Valhalla flatness is a property of a representation. The 0xC0 doc comment
and the layout-doc band table previously bundled the two as "Panama +
Valhalla" as if both named crossing surfaces; corrected.

Stated precisely so the ruling cannot be misread as "Valhalla is
unintegrated" -- a misreading the first draft of this very correction
invited, caught by an operator double-check before it calcified. Valhalla
IS integrated in lance-graph-java, in two real senses: the shipping
descriptor vocabulary (LaneId / Ordinal / MaskId / RowRange / FacetId) is
designed so the same source compiles as `value record` under JEP 401 --
migration is one word per type -- and a real Valhalla EA build
(27-jep401ea3) ran the A/B with measured results (array-flattening cliff
at 8-byte payload; 4-8-byte descriptors 5.5x smaller / up to 8.3x faster
where flattening applies; bulk data stays native, winning 38-57x on both
platforms). Precisely BECAUSE that integration is a designed property OF
the 0xC0 concepts' vocabulary rather than a concept itself, it mints no
address: properties of concepts do not get domains. A genuine Valhalla
concept, if ever needed, is argued fresh -- no squatting rights in 0xC0.

DISCOVERY-MAP gets a dated correction APPENDED to D-CBAND-ALTITUDE (the
original parenthetical stays, per append-only); the canonical text is the
JavaRuntime doc comment in ogar-vocab. Doc-comment-only change: zero code,
zero id moves. Gates: ogar-vocab 157/157 + doctests, clippy clean, fmt
clean.
The 19 causal predicates are a closed measured set mirroring upstream, so
the constraint-propagation verbs get their own band rather than diluting
it, and carry LOCAL: CURIEs -- a dismech: prefix would assert a provenance
upstream never gave (the ogar-ro precedent this crate already cites).

Sudoku is meant mechanically. Resolution is elimination, not similarity:
naked_single is a cell forced by its own remaining candidate, hidden_single
is the referent that can sit in only one cell of its unit -- the case where
free text does not know what it names, because the uniqueness is a property
of the unit and not of the cell read alone. eliminate is what makes
cardinality a moving state instead of a static count. fold_xref is ordered
before any counting: two addresses of one referent are not two referents,
and counting first reports a bookkeeping artifact as a fork.

residue_band maps candidate cardinality to the consumer's 3-bit reasoning
band. Two of its four outcomes are potholes and the mapping IS the rung
degradation: zero candidates names its own cell (the reach-out hook -- a
failure that says what is missing points at what to fetch), and the diffuse
case is hub-shaped in the same sense Throttle::hub_indegree already means.
diffuse_floor is therefore a required parameter with no shipped default;
no measured value exists and a constant would launder a guess into an
apparent finding.

The residue is an overlay at the graph's own addresses, in separate
tables. The shape is eye tracking: you record where the eye looked, not
what it saw, so 1:1 is the addressing and the occupancy is sparse. Writing
the trace into each subject instead would give every subject a partial
copy of the ontology's structure, which does not stay affordable -- and it
is why three bits suffice. One-way structurally: no search op declares the
target codebook, so a residue value has no path to be read as a graph
address.

It is not evidence. Propagation forces a cell given the constraints and
will force wrong cells confidently from wrong constraints; the value is
search-economic, and confirmation needs a channel the trace did not
travel.

No bits move and nothing derives the band inside the edge crate -- its
owner pins that the field is set only by an explicit call, so the ordinal
is produced here and written there, with no dependency edge either way.
Rungs project as a stack of layers at zero bit cost: one table per rung
over one address space, the 3-bit sample sitting inside a layer. The band
is never mapped onto the rung ladder; they are unrelated enums that share
four variant names.

20 tests. Five disable-runs verified red-then-green: the codebook guard,
computes-vs-asserts, meta-is-never-a-cardinality-outcome, the strict floor,
and band contiguity. fmt clean. clippy carries two pre-existing
assertions_on_constants findings in the collision-guard test, measured
identical before and after this change and left alone.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e695c8c6-85a7-4165-8020-c6bae0ac7fe0


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.

@cursor

cursor Bot commented Aug 21, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_076d1d29-8201-41d5-90f1-4cf73050acf4)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review August 21, 2026 08:59

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Automatic review does not fire on this repository (below the star threshold), and Bugbot is at its usage limit — so this PR would otherwise reach merge with no automated review at all. Requesting one explicitly.

Two places worth a reviewer's attention in particular:

  1. residue_band's diffuse_floor is a required parameter with no default, deliberately — no measured value exists for it. If that reads as an ergonomic gap rather than a guard, say so; I judged the alternative (shipping a constant) to be worse, but that is a judgement, not a fact.
  2. The pushes_result split between the two bands (predicates Some(false), search ops Some(true)) is load-bearing as a contamination boundary, not merely a table entry. It is asserted two-sided and disable-verified, but a second opinion on whether the declaration actually carries that weight — versus needing enforcement at the consumer's dispatch — is welcome.

Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== PR metadata =='
gh pr view 279 --repo AdaWorldAPI/OGAR --json title,baseRefName,headRefName,files --jq '{title,baseRefName,headRefName,files:[.files[].path]}'

echo '== Changed-file summary =='
git diff --stat HEAD^ HEAD
echo '== Diff =='
git diff --find-renames --find-copies --unified=80 HEAD^ HEAD

echo '== Rust source/test map =='
fd -e rs . | sort

echo '== Relevant identifier occurrences =='
rg -n -C 5 -e '\b(pushes_result|residue_band|diffuse_floor|with_reasoning_band|DISMECH_TARGET_CODEBOOK|candidates|fold_xref|naked_single|hidden_single|eliminate|fork)\b' -g '*.rs' .

echo '== AST outlines for changed Rust files =='
git diff --name-only --diff-filter=AM HEAD^ HEAD | rg '\.rs$' | while IFS= read -r f; do
  echo "-- $f --"
  ast-grep outline "$f" --items all || true
done

Length of output: 118290


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Vocabulary API and conformance =='
sed -n '360,550p' crates/ogar-loco/src/vocabulary.rs
sed -n '560,980p' crates/ogar-loco/src/vocabulary.rs

echo '== Statement segmentation =='
sed -n '1,240p' crates/ogar-loco/src/statements.rs

echo '== Production call sites for table semantics =='
rg -n -C 6 --glob '*.rs' --glob '!**/tests/**' --glob '!**/examples/**' \
  '\b(pushes_result|body_refs|branches|statement_bounds|segment_statements)\s*\(' \
  crates

echo '== Direct DisMech vocabulary consumers =='
rg -n -C 6 --glob '*.rs' \
  '\b(DisMechVocabulary|SEARCH_OPS|RESIDUE_BAND|FORK|residue_band|DISMECH_TARGET_CODEBOOK|plug_into)\b' \
  crates --glob '!crates/ogar-dismech/src/lib.rs'

echo '== Manifest dependency relationships =='
rg -n -C 2 'ogar-dismech|ogar-loco' --glob 'Cargo.toml' --glob 'Cargo.lock' .

Length of output: 85537


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Vocabulary documentation around the allocation claim =='
nl -ba crates/ogar-dismech/src/lib.rs | sed -n '425,455p'

echo '== Package description =='
nl -ba crates/ogar-dismech/Cargo.toml | sed -n '1,18p'

Length of output: 648


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Vocabulary documentation around the allocation claim =='
awk 'NR >= 425 && NR <= 455 { printf "%6d  %s\n", NR, $0 }' crates/ogar-dismech/src/lib.rs

echo '== Package description =='
awk 'NR >= 1 && NR <= 18 { printf "%6d  %s\n", NR, $0 }' crates/ogar-dismech/Cargo.toml

Length of output: 2741


@AdaWorldAPI, I found one documentation issue.

  • crates/ogar-dismech/src/lib.rs Line 435–437: The documentation says that 0xA3..=0xFF is reserved and refused. This PR allocates 0xA3..=0xA9 to SEARCH_OPS. Update the range to 0xAA..=0xFF, or describe the reserved range as the bytes after both bands.

On the requested design points:

  1. diffuse_floor is a guard, not an ergonomic gap. The function requires each caller to make an explicit corpus policy decision. A shipped default would silently encode an unmeasured threshold. The documented <= 2 policy also makes an invalid-looking low value an intentional strict policy, not an API failure.

  2. The pushes_result declaration carries real weight. Validation freezes it in VocabularyTable, and statement_bounds uses that table to calculate stack depth and statement boundaries. A predicate incorrectly marked as pushing would change maskable statement grouping. A search operation incorrectly marked as non-pushing would close a statement early.

    The declaration does not enforce an executor’s semantic dispatch by itself. This repository has no production executor for these search operations. When one is added, it must dispatch through the validated VocabularyTable and treat pushes_result as stack semantics. It must not infer behavior from FnIndex values or names.

    FORK is correctly the exception to “search operations push.” It branches to two bodies and is non-pushing, like shared-core control calls. Consider adding an explicit assert_eq!(v.pushes_result(FORK), Some(false)) test. The current test intentionally filters FORK out, so it does not pin this required exception.

Static review complete. I did not execute repository code or tests.

[review]


✏️ Learnings added
Learnt from: AdaWorldAPI
URL: https://github.com/AdaWorldAPI/OGAR/pull/279

Timestamp: 2026-08-21T09:01:26.099Z
Learning: In `crates/ogar-dismech/src/lib.rs`, `residue_band(candidates, diffuse_floor)` intentionally requires the caller to provide `diffuse_floor`; the crate must not ship a default threshold because no measured calibration exists. Values of `diffuse_floor <= 2` are valid strict policies that make the Counterfactual outcome unreachable.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5cc4516fb

ℹ️ 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".

Comment thread crates/ogar-dismech/src/lib.rs
… exception

Two review findings, both real and both introduced by the same change.

The DisMechVocabulary doc said bytes 0xA3..=0xFF are reserved and refused.
That was true until this branch allocated 0xA3..=0xA9 to the search band,
and I did not update the sentence -- so the change shipped a doc comment
that actively contradicted the code beside it. Now it names both bands and
reserves 0xAA..=0xFF.

The FORK exception was pinned nowhere. a_search_op_computes_where_a_
predicate_asserts filters on bodies == 0, which EXCLUDES fork by
construction, and fork_branches_where_every_predicate_is_a_leaf asserts
body_refs without touching pushes_result -- so a change making fork push
would have passed the whole suite. It is asserted explicitly now, in the
test whose filter created the hole, with the reason inline: pushes_result
is what statement_bounds computes stack depth from, so a wrong answer
re-segments statements rather than merely mislabelling a byte.

Disable-verified: making search ops push unconditionally now fails with
"a branching call must not also push". 20 tests, fmt clean.

Copy link
Copy Markdown
Owner Author

Both findings were real and both were mine. Fixed in 0d8ee83.

The reserved range. 0xA3..=0xFF was true until this branch allocated 0xA3..=0xA9, and I did not update the sentence beside the code I changed — so it shipped a doc comment that contradicted its own struct. It now names both bands and reserves 0xAA..=0xFF.

The FORK gap is the one that matters, and the diagnosis is exact. a_search_op_computes_where_a_predicate_asserts filters on bodies == 0, which excludes fork by construction, and fork_branches_where_every_predicate_is_a_leaf asserts body_refs without touching pushes_result. So the single exception to the rule the band is built on was pinned by nothing. It is asserted explicitly now, in the test whose own filter created the hole, and disable-verified: making search ops push unconditionally fails with a branching call must not also push.

That is the third instance of the same failure shape in this session — a test whose filter or fixture excludes precisely the case it exists to cover. Writing the rule down does not confer immunity to it; only running the disable does, and here the review caught what my five disable-runs did not, because I never disabled the thing the filter had already removed.

On the two design points, the useful part is the mechanism you named, which I did not have. I justified the pushes_result split as a declaration; the actual weight is that validate freezes it into VocabularyTable and statement_bounds computes stack depth and statement boundaries from it — so a wrong answer re-segments statements rather than merely mislabelling a byte. That reason is now inline at the assertion.

And your correction stands unqualified: the declaration does not enforce an executor's dispatch, because this repository has no production executor for these verbs. When one lands it must read the validated table rather than infer from FnIndex values or names. I have not softened the module doc's "one-way, structurally" claim, because what it actually says is narrower — no search op declares the target codebook, so a residue value has no path to be read as a graph address — but the distinction between that and runtime enforcement is worth having stated on the record, which it now is here.


Generated by Claude Code

Codex's P2 on the pre-fix commit added a half CodeRabbit's did not: the
doc described every minted operation as a binary non-pushing predicate.
0d8ee83 covered that in the body -- 'Every minted PREDICATE', plus an
explicit carve-out for the search band -- but left the one-line summary
saying 'causal predicate palette', and the summary is what a consumer
reads first. Named both bands there.
@AdaWorldAPI
AdaWorldAPI merged commit 1a68071 into main Aug 21, 2026
2 checks passed
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.

2 participants