Skip to content

CG-BEH-1: trace a changed dispatch arm to the registered methods that use its algebra word (read-only) - #2003

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

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

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

This is a read-only experiment under D-CODEGRAPH-BEHAVIOR-RULING-1. It adds no word, classid or binding, and it prepares and executes nothing. The area owner is EXO-155 (D-CGMM-0). Coordination is on the board P-EXO-18, channel EXO-232.

It touches neither impact_report nor the Codegraph crate, so it does not depend on #2001 or #2002 and conflicts with neither.

Question

A function changes. Which registered behaviours may change with it, and on what evidence?

What this adds

Result

The trace has three hops and two kinds of evidence:

hop read from evidence
code → opcode the match f arms of FoldDialect::call source structure
opcode → word POLYFILL[p], cross-checked against binding::EXECUTABLE source structure
word → method, in order method_ref + admit in a test run DT64 registration

Measured at 317c4ffc0:

  • The lens 0xFFFF_F000 has 17 words, and all 17 opcodes have a dispatch arm.
  • A change at lib.rs:980 is inside the INT_S_LESS arm (lines 976 to 1018). That is word 5, used at ordinal 0 by methods 1 and 2 of class 0x7F0B_0001.
  • At symbol level the one function realizes all 17 words. Three are used in this store. The other 14 print "no registered user in this uses file", never "unaffected".

Negative controls

control result
dispatch mapping of one opcode removed its word is UNKNOWN, its uses rows are withdrawn, every other row is unchanged
source changed after the witness was taken STALE, exit 4, no impact row
a function whose name matches a word but is not dispatched no edge
a symbol that dispatches nothing "no behaviour edge (not: no impact)"
uses file missing ARTIFACT_MISSING, exit 3
  • beh.py --self-test runs 13 tests.
  • disable_runs.py runs 12 cases, and all go red.
  • The Rust ordering assertion goes red when the effects are read in reverse.

What it does not show

  • realizes is an arm reading from source. It is not a compiler call fact and not a behavioural witness for the word's declared meaning.
  • The native lowering path (binding_native::prepare_native) and everything below it are not mapped.
  • No production crate registers a binding with DO effects. Foundry's can_cook_method has effects: Vec::new(), so the uses come from one test store.
  • ON and WHEN are not read; only DO is joined.

For the #2001 and #2002 sessions

Plan §4 compares the two impact_report shapes field by field and proposes one. One point needs a decision either way: UnresolvedDispatch means trait dispatch in #2001 and dynamic calls in #2002. Nothing was pushed to either branch.

Checks run

  • cargo test -p lance-graph-r2il --test integration: 57 passed.
  • cargo clippy -p lance-graph-r2il --all-targets -- -D warnings and cargo fmt: clean.
  • python3 -I beh.py --self-test and python3 -I disable_runs.py: pass.
  • codegraph_index.py --check: current. The supersession index regenerates unchanged.

Generated by Claude Code

…n v1

Two r2il integration tests read the algebra-word uses of two existing test
bindings through method_ref and admit, cross-check words_used and users_of,
and export the rows. No preparation or execution. Plan: ownership crosswalk,
PR #2001 / #2002 reconciliation proposal, CG-BEH-1 definition and gate.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
beh.py reads the POLYFILL table and the FoldDialect::call match arms from
source and joins them to method uses exported from a bind store. Each row
names its evidence. Negative controls: missing dispatch mapping, stale
witness, name match, unused word, missing uses file; 13 self-tests and 12
disable runs. Report and board entry included.

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