Skip to content

gunbc test: witness claims as targets (exact, :all, /...) - #13556

Merged
briansrls merged 1 commit into
mainfrom
own/gunbc-test-claims
Oct 8, 2026
Merged

briansrls merged 1 commit into
mainfrom
own/gunbc-test-claims

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

What

gunbc test <label> now runs witness claims (test fn ... -> Bool in test.claim.* modules), labelled by the existing canonical claim label gunbc.discovery_census site_label (//test/claim/<module>:<fn>). Exact label, :all / :*, and /... subtrees under //test/claim are admitted. The exit contract is unchanged: 0 every selected claim held, 1 at least one did not hold, 2 no observation (unknown label, empty selection, refusal, or a non-verdict outcome).

Model (.dag first)

  • gunbc.target_invocation admit_test_operand now takes a claim_universe parameter and has a TestOperandClaimRoute arm. The native universe is checked first, then the claim universe, then the existing exact/set-form split.
  • gunbc.discovery_census claim_route_universe = //test/claim/.... It is defined as the subtree that site_label maps test.claim.* modules into (a label-space fact, not a copy of the discovery roots).
  • ClaimRouteVerdict + claim_route_termination: a definite failure dominates, and an unobserved member or an empty selection gives SubjectUnreached (2).
  • The set-form refusal now names both routes. Its old retirement trigger ("an executor that enumerates a population outside the native universe") is satisfied for the claim population. Set forms outside both universes (e.g. //dag/test/claim/...) still refuse with 2.

Host mirror

  • target_invocation_host::run_claim_route → cli_run::run_claim_route:
    • narrows the subject to the modules the pattern can reach, so one module never pays for a corpus walk;
    • folds the floor's per-file discovery authority over them through floor_discovery_rows_over_sources. That function is extracted from the required floor, so both callers use one fold;
    • evaluates with run_claim_measured, the evaluation shared with claim_batch. There is one context per entry module.
  • Prints one line per claim (label, verdict, eval_steps, cpu_ms; non-held claims also show the outcome) and a summary.
  • Floor admission policy (gate prefixes, prepared-subject exclusions, eval-step budget tiers) is deliberately not applied. That is the //:required aggregate's question, and this verb reports what a named claim observed. eval_steps is reported on every line.

Witnesses

test.claim.target_invocation_witness:

  • an_exact_claim_label_admits_to_the_claim_route
  • claim_set_forms_admit_to_the_claim_route
  • operands_outside_the_claim_universe_do_not_admit_to_it
  • the_production_claim_universe_is_the_site_label_subtree
  • the_claim_route_termination_maps_to_the_three_exit_statuses
  • a_set_form_refusal_names_both_routes_and_refuses_widening

Every existing admission match has the new arm. Host unit tests claim_route_termination_matches_the_model and claim_universe_containment_matches_the_model pin the mirror.

Executed evidence (fresh target/release/gunbc)

  • (a) gunbc test //test/claim/target_invocation_witness:claim_set_forms_admit_to_the_claim_route → HELD eval_steps=1818, exit 0
  • (b) gunbc test //test/claim/discovery_census_witness:all → 25 lines, 25 held, 0 did not hold, exit 0
    • gunbc test //test/claim/target_invocation_witness:all → 56 claims, 54 held, 2 did not hold, exit 1. All 8 new claims HELD. The 2 reds are pre-existing on main and come from stale literals in authorities this PR does not touch: the_instrument_target_and_its_binding_are_the_same_identity asserts instrument_targets() |> count == 8 while the registry now has 31, and the_instrument_label_is_absent_from_the_derived_required_aggregate also fails. The module is outside the required gate, so the floor never ran them. Left as found; this needs a separate fix.
  • (c) Temporarily changed one expected render in claim_set_forms_admit_to_the_claim_route → DID-NOT-HOLD ... outcome=Fail, exit 1. The change was then reverted.
  • (d) gunbc test //nope:x → no such target, exit 2. //test/claim/target_invocation_witness:no_such_claim → the pattern selected no discovered claim, exit 2. //dag/test/claim/... → set-form refusal naming both routes, exit 2.
  • cargo clippy --all-targets -- -D warnings clean; cargo fmt --all --check clean; cargo test --release -p v1-compiler --lib native_route_termination_tests 5/5.

No generated artifacts or DESIGN projections are affected: no projected authority or CLI surface row changed.

🤖 Generated with Claude Code

Model: gunbc.target_invocation admit_test_operand gains a claim_universe
parameter and a TestOperandClaimRoute arm (native universe asked first);
ClaimRouteVerdict + claim_route_termination fold the member verdicts.
gunbc.discovery_census claim_route_universe = //test/claim/..., the
subtree site_label maps test.claim.* into. Set-form refusal now names both
routes; its retirement trigger is satisfied for the claim population.

Host: target_invocation_host routes claim-universe operands to
run_claim_route -> cli_run::run_claim_route, which narrows the subject to
the modules the pattern reaches, folds the floor's per-file discovery
authority (floor_discovery_rows_over_sources, extracted from the required
floor so both call one fold), and evaluates with run_claim_measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 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-08T00:36:49.742770Z 160ef84 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.

@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: 160ef84fcb

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

module_selected: &dyn Fn(&str) -> bool,
claim_selected: &dyn Fn(&str, &str) -> bool,
) -> Result<Vec<ClaimRouteMember>, String> {
let index = process_shared_index(source_roots);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return index-build errors instead of panicking

When the workspace index cannot be built—for example because a .dag file is unreadable or two files declare the same module—process_shared_index unwraps the fallible index builder and panics. Consequently, a claim-route invocation terminates as a Rust crash instead of reaching this function's Err path and producing the promised status-2 no-observation result; use try_process_shared_index and propagate its error.

Useful? React with 👍 / 👎.

Comment on lines +24949 to +24950
let (outcome, receipt) = run_claim_measured(&ctx, &closure_subject, &function);
v1_interpreter::eval_call_memo_frame_exit(&ctx);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop evaluating claims after an unwind

For a :all or subtree selection, if one claim returns ClaimOutcome::Panicked, this loop continues evaluating subsequent functions in the same process and may publish their results as trustworthy. The evaluator's unwind boundary explicitly treats a panic as an unknown invariant violation, and the required-floor runner stops at that outcome; this route should likewise stop and mark the remaining selected claims unobserved/not attempted rather than emitting post-panic verdicts.

Useful? React with 👍 / 👎.

@briansrls
briansrls added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 658f135 Oct 8, 2026
6 checks passed
@briansrls
briansrls deleted the own/gunbc-test-claims branch October 8, 2026 16:44
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