Skip to content

feat: count only behavior-linked oracles for success-indicator-separation (Story 1.104) - #183

Merged
muratkeremozcan merged 3 commits into
mainfrom
feat/story-1.104-behavior-linked-success-separation
Oct 4, 2026
Merged

muratkeremozcan merged 3 commits into
mainfrom
feat/story-1.104-behavior-linked-success-separation

Conversation

@muratkeremozcan

Copy link
Copy Markdown
Collaborator

What changes for an adopter

success-indicator-separation used to read every oracle the contract declares. An oracle that no behavior lists could satisfy it, so a contract could report the rule satisfied while no behavior had the evidence.
Both branches had the gap: the structured-response branch and the scalar CLI branch (exit code 0 plus exact whole stdout).

Both branches now credit an oracle only when at least one behavior lists its identifier in oracles. A behavior that cites an undeclared identifier links nothing.
compile still accepts a contract with an unlisted oracle. Coverage evaluation now reports success-indicator-separation as a gap for it until a behavior lists the oracle.
The structured unsatisfied reason now reads no behavior-linked oracle addresses operation <id>'s success indicator ....

No shipped example or corpus contract changed outcome: every witnessing oracle in them is already behavior-linked.
The relevance predicate and the other six rules are untouched. No version bump; the CHANGELOG entry sits under [Unreleased].

Mutation proof

Each mutant applied in a scratch copy of the repo, then vitest run tests/coverage:

Mutant Failing tests
Drop the behavior-link check in the structured branch satisfaction 151, 152, 155, 156
Drop the behavior-link check in the scalar branch the four unlisted-oracle cases in command-coverage (no behavior lists it, orphan beside a weaker linked oracle, undeclared citation, link toggle)
Mark every oracle linked satisfaction 151, 152, 155, 156
Link every declared oracle instead of the ones behaviors list all eight of the above

Validation

  • npm run validate: green (5146 tests, includes docs counts, doc-claims, ad5 registry, AD-31 table, corpus, coverage)
  • npm run format: clean

…tion (Story 1.104)

The rule read every declared oracle, so an oracle no behavior lists could satisfy it in both the structured-response and scalar CLI branches. Both now credit an oracle only when a behavior lists its identifier.
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: bmad-code-org/bmad-eval-quality/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a91bc22f-0a53-47a7-96db-99a7edf2b795
📥 Commits

Reviewing files that changed from the base of the PR and between 6d86afa and edbf4c2.

⛔ Files ignored due to path filters (3)
  • CHANGELOG.md is excluded by none and included by none
  • scripts/audit-website.mjs is excluded by none and included by none
  • scripts/audit-website.test.mjs is excluded by none and included by none
📒 Files selected for processing (2)
  • docs/how-to/evaluate-tool-use-behavior.md
  • tests/coverage/command-coverage.test.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: bmad-code-org/bmad-eval-quality/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1e79bb9f-3f45-4621-bb7c-523ba9f53586
📥 Commits

Reviewing files that changed from the base of the PR and between bb9a80f and 6d86afa.

⛔ Files ignored due to path filters (2)
  • CHANGELOG.md is excluded by none and included by none
  • docs/ad31-coverage-predicates.generated.md is excluded by !**/*.generated.*, !**/*.generated.* and included by docs/**
📒 Files selected for processing (4)
  • src/core/coverage/satisfaction.ts
  • tests/coverage/command-coverage.test.ts
  • tests/coverage/corpus.test.ts
  • tests/coverage/satisfaction.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Rule 1 now requires a behavior to list an oracle before that oracle can witness success-indicator separation. The scalar-command witness check applies the same filter. Failure reasons identify when no behavior-linked oracle provides the required evidence. Tests cover unlinked, weaker, undeclared, and linked oracle references, including contracts with multiple behaviors. Other satisfaction predicates continue to use oracle views without this linkage filter.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 6d86a

No actionable issue remains from this review; the change is mergeable after normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 6d86a

The change affects 2 systems.

Changed systems: tests, src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — tests (service) was modified; 3 changed files map to changed impact.
  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/core/coverage/satisfaction.ts: Adds a set of oracle IDs listed by behaviors and records whether each oracle is linked in its view.
  • observed — Modified behavior in src/core/coverage/satisfaction.ts: Populates each oracle view’s behaviorLinked field by checking its ID against the behavior-derived set.
  • observed — Modified behavior in src/core/coverage/satisfaction.ts: Adds the behavior-linked oracle ID set as a required local parameter to scalarCommandWitnessed.
  • observed — Modified behavior in src/core/coverage/satisfaction.ts: Makes the scalar-command witness search skip oracles not listed by a behavior.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the conventional-commit prefix "feat:" and clearly names the behavior change: only behavior-linked oracles count for success-indicator separation. The story number is supplementary.
Description check ✅ Passed The description explains the oracle-linkage change, its effects on coverage evaluation, and the reported validation results. It is directly related to the changeset.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@muratkeremozcan
muratkeremozcan merged commit 5f3c7e7 into main Oct 4, 2026
24 checks passed
@muratkeremozcan
muratkeremozcan deleted the feat/story-1.104-behavior-linked-success-separation branch October 4, 2026 13:48
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