Skip to content

feat(analysis): verify wrpc-binding resolves to a bus (REQ-WRPC-BINDING-003)#308

Merged
avrabe merged 2 commits into
mainfrom
feat/wrpc-binding-003
Jun 26, 2026
Merged

feat(analysis): verify wrpc-binding resolves to a bus (REQ-WRPC-BINDING-003)#308
avrabe merged 2 commits into
mainfrom
feat/wrpc-binding-003

Conversation

@avrabe

@avrabe avrabe commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Second v0.22.0 feature. Closes the V for REQ-WRPC-BINDING-003 (and the #281 follow-up).

What

Follow-up to REQ-WRPC-BINDING-002 (which checks binding presence). When a cross-processor connection has an Actual_Connection_Binding, wrpc-binding now resolves the binding's reference (...) target and warns only when it resolves unambiguously to a non-bus component (e.g. a connection mistakenly bound to a processor).

Sound rule (avoids new false-positives): a bus / virtual bus, an unresolvable name, a dotted/multi-level path, or a multi-reference binding list are all accepted (no warning) — only an exactly-one-match non-bus resolution warns.

  • extract_simple_reference_name — split-based parse of reference (x) / (reference (x)); rejects empty, dotted, and multi-reference values (no manual index arithmetic).
  • unambiguous_non_bus_category — warns only on a single-match non-bus component, returning its category for the diagnostic.

Oracle — TEST-WRPC-BINDING-BUS-TARGET

non-bus (processor) target warns "not a bus"; real bus and virtual bus do not warn; unresolvable / dotted / multi-reference do not warn; plus a parser unit test. The presence-only REQ-WRPC-BINDING-002 path (TEST-WRPC-BINDING) is unchanged and still green.

Gates (local)

16 wrpc tests pass (10 existing unchanged + 6 new); 898 spar-analysis lib tests pass; clippy -D warnings clean; nightly fmt clean; mutation --in-diff 8 caught / 3 unviable / 0 missed.

Falsification

If a connection bound to a real bus warns, or a connection bound unambiguously to a non-bus component does not, the check is wrong.

🤖 Generated with Claude Code

@avrabe avrabe enabled auto-merge (squash) June 26, 2026 12:42
…s to a bus (REQ-WRPC-BINDING-003)

Follow-up to REQ-WRPC-BINDING-002 (presence check). When a cross-processor
connection HAS an Actual_Connection_Binding, wrpc-binding now resolves the
binding's `reference (...)` target and warns ONLY when it resolves
UNAMBIGUOUSLY to a non-bus component. A bus / virtual bus, an unresolvable
name, a dotted/multi-level path, or a multi-reference list are all accepted
(the sound rule from the requirement — avoids new false-positives).

- extract_simple_reference_name: split-based parse of `reference (x)` /
  `(reference (x))`; rejects empty, dotted, and multi-reference values.
- unambiguous_non_bus_category: warns only on an exactly-one-match non-bus
  resolution.

Oracle (TEST-WRPC-BINDING-BUS-TARGET): non-bus target warns; real bus and
virtual bus do not; unresolvable / dotted / multi-reference do not; parser
unit test. 16 wrpc tests pass (10 existing unchanged), 898 spar-analysis
lib tests pass, clippy -D clean, nightly fmt clean, mutation --in-diff
8 caught / 3 unviable / 0 missed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the feat/wrpc-binding-003 branch from dd86c54 to 79cec96 Compare June 26, 2026 12:45
@github-actions

Copy link
Copy Markdown

Rivet verification gate

20/20 passed

count
Passed 20
Failed 0
Skipped (no steps) 0

Filter: (and (= type "feature") (or (has-tag "v093") (has-tag "v0100")))

Failed artifacts

(none)

Updated automatically by tools/post_verification_comment.py. Source of truth: artifacts/verification.yaml.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.13043% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spar-analysis/src/wrpc_binding.rs 99.13% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit b7edf77 into main Jun 26, 2026
18 checks passed
@avrabe avrabe deleted the feat/wrpc-binding-003 branch June 26, 2026 16:14
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