Skip to content

CG-BEH-2: ON × WHEN × DO facts of registered DT64 methods, a change query and its falsifiers (read-only lab) - #2005

Draft
AdaWorldAPI wants to merge 2 commits into
mainfrom
ccr-8062bcc7-l7lkz9-cg-beh-2
Draft

AdaWorldAPI wants to merge 2 commits into
mainfrom
ccr-8062bcc7-l7lkz9-cg-beh-2

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

D-CG-BEH-2 under EXO-155 (D-CGMM-0). Coordination: board P-EXO-18, channel EXO-232.

This is a read-only lab gate. It edits no production registration, adds no F### word, and executes no method. It is branched from main and does not depend on #2003 or #2004. It does not touch impact_report.

What it adds

crates/cg-beh-probe is a lab crate with its own workspace root. It contains:

  • facts: reads a method's ON positions, WHEN guard and ordered DO steps from a BindStore through method_ref, admit, resolve and resolve_algebra. It reads the crate's own lab class and Foundry's CanCook class as World::new() registers it.
  • query::diff: compares two readings and reports, per method, which part moved and which obligations are stale.
  • query::impl_change: takes a changed line of the dispatch source and reports the words and registered DO steps it reaches.
  • dispatch: reads the match arms of FoldDialect::call from source text.

The evidence schema (cg-beh.facts.v1, cg-beh.dispatch.v1) is described in crates/cg-beh-probe/README.md. The generated files are in .claude/probes/2026-11-11-cg-beh-2/.

Gate A: registered facts

  • The lab class has three methods. Method 1 has ON, WHEN and DO.
  • Foundry's class has 16 CanCook methods over a 211-field basis. Each has ON and WHEN and an explicit DO_NONE row. No DO step was invented.
  • Every guard leaf is UNKNOWN to DT64. A consumer reading (guard number = field position) is recorded only when the position is in the method's registered reads.

Gate B: the four kinds of change

Each predicted admission answer is compared with what the stores answer.

change registered fact that moves binding digest stale
ON declaration ON positions moves reference stamp, methods_on answers
WHEN guard guard witness does not move guard witness
DO implementation (dispatch arm) none does not move executed parity of each word that has a user
field basis, same count ordered predicates moves for every method of the class witnessed resolve, reference stamp

A changed DO registration (step order) and a guard that is written differently but fires on the same rows are reported separately.

Three evidence grades are kept apart: SOURCE_STRUCTURE, DT64_REGISTRATION, EXECUTED_PARITY. This gate produces none of the third.

Gate C: falsifiers

  • 23 tests pass.
  • disable_runs.py removes 15 guards one at a time; each named test fails (15 of 15).
  • Covered: a basis altered at the same field count, a guard changed without DO, reversed DO steps (independent and dependent), a removed dispatch mapping, a reference from another issuer, an unrelated method, facts altered against the digest, a stale dispatch reading.

Findings

  1. The guard is outside the binding digest. Only the witness comparison in admit catches a guard change.
  2. admit takes no ClassView. Over a reordered basis of the same count, resolve refuses and admit still admits the old reference.
  3. Registration does not check guard positions against the basis or the reads.
  4. on is registered and read by methods_on, footprint, the digest and the registration check. No executor in dt64, r2il, xlog or the Foundry lab evaluates it.
  5. CanCook has no DO step, so no word implementation reaches it through DO.

Findings 1 to 3 are observations for the EXO-155 owner. Nothing here changes DT64.

Gate D: diagrams

gate-d-diagram-check.md checks .mermaid/03, /05 and /06 against source: 104 statements, 13 stale. The main stale group: 05 and 06 describe PR #1996 as open; it is merged. A worker produced the lists; four items were re-read by hand, the rest were not.

What it does not show

  • No executed parity for any word.
  • The native lowering path and relalg's guard lowering are not mapped to source.
  • Which source line builds ON or WHEN is not derived; those changes are found by comparing facts.
  • One production-shaped binding and one lab class.

Other files

  • Root Cargo.toml: the crate is added to exclude.
  • .github/workflows/cg-beh-probe.yml: fmt, clippy, tests, and a check that the committed fact files match the registrations.
  • A board entry and the regenerated entries index.
  • .codegraph/: regenerated. Adding a crate renumbers the generated dependency diagrams, so 103 generated files change.

Checks run

  • cargo test --release --manifest-path crates/cg-beh-probe/Cargo.toml: 23 passed.
  • cargo clippy --all-targets -- -D warnings and cargo fmt --check: clean.
  • python3 -I .claude/probes/2026-11-11-cg-beh-2/disable_runs.py: 15 of 15 red.
  • codegraph_index.py --check: current. The supersession index regenerates unchanged.

Generated by Claude Code

…ange query, falsifiers

D-CG-BEH-2 (EXO-155), read-only. A lab crate, crates/cg-beh-probe, reads a
method's ON positions, WHEN guard and ordered DO steps from a BindStore
through method_ref, admit and resolve, for its own class and for Foundry's
CanCook as World::new() registers it. No production registration is edited,
no polyfill word is added, nothing is executed.

Gate A: cg-beh.facts.v1 rows (crates/cg-beh-probe/README.md). CanCook has ON
and WHEN and an explicit DO_NONE.
Gate B: query::diff tells a changed ON declaration, WHEN guard, DO
registration and field basis apart, and names the stale obligations;
query::impl_change handles a changed DO implementation, which moves no
registered fact. Every predicted admission answer is compared with the
stores' answer.
Gate C: 23 tests; disable_runs.py removes 15 guards, 15 named tests fail.
Gate D: .mermaid/03, /05 and /06 checked against source
(.claude/probes/2026-11-11-cg-beh-2/gate-d-diagram-check.md).

Adds the crate to the root exclude list, a CI workflow for it, a board entry
and the regenerated entries and .codegraph indexes (adding a crate renumbers
the generated dependency diagrams).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

This branch has not been deployed

No deployments
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