fix: keep prior rule locations in concise conflict diagnostics - #820
Merged
Anand Krishnamoorthi (anakrish) merged 2 commits intoSep 23, 2026
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Maksym (maksym-mishchenko)
marked this pull request as ready for review
September 23, 2026 14:42
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Anand Krishnamoorthi (anakrish)
approved these changes
Sep 23, 2026
Copilot started reviewing on behalf of
Anand Krishnamoorthi (anakrish)
September 23, 2026 16:06
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
This PR simplifies rule-conflict diagnostics by referencing the prior rule’s file, line, and column while preserving current-source context and runtime behavior.
Changes:
- Updated diagnostic formatting and path escaping.
- Added interpreter, RVM, FFI, and C# regression coverage.
- Updated fixtures and changelog documentation.
| File | Summary |
|---|---|
tests/rvm/compiler.rs |
Verifies unchanged RVM conflict semantics. |
tests/interpreter/cases/rule/multiple_outputs.yaml |
Updates conflict expectations. |
src/tests/interpreter/mod.rs |
Tests diagnostic formatting and path escaping. |
src/interpreter.rs |
Generates compact prior-rule locations. |
CHANGELOG.md |
Documents the diagnostic change. |
bindings/ffi/src/engine.rs |
Verifies FFI status and message propagation. |
bindings/csharp/Regorus.Tests/RegorusTests.cs |
Verifies managed diagnostic behavior. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Anand Krishnamoorthi (anakrish)
merged commit Sep 23, 2026
edbaa0b
into
microsoft:main
60 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal
I propose replacing the nested prior-rule source excerpt in
Interpreter::check_rule_pathwith a compact file, line, and column reference.The current rule's source envelope stays intact.
The proposed wording,
rule conflicts with rule at ..., remains provisional.For this policy:
The proposed diagnostic is:
The prior rule's location replaces its second source line/caret block and
defined heresuffix. No quotes are added around the location.Scope
rule conflicts with the following rule:plus nested prior-rule diagnosticrules must not produce multiple outputs,rules should not produce multiple outputs., and function-output diagnosticsrecursion detected when evaluating rule:with dependency/source blockscomplete rules should not produce multiple outputsalternate call sitesValue::Undefined, not a new terminal conflict error.RuleDataConflictConflict detection, evaluation order, cleanup, public signatures, and status
mapping do not change. The interpreter diagnostic still crosses FFI as
RegorusStatus::Errorand reaches C# asInvalidOperationException.The known skipped RVM partial-object conflict cases remain outside this change.
Version-scoped examples
The bounded comparison exercised the exact
Microsoft.RegorusNuGet0.11.0package and the paired managed/native binaries from this local patched tree
(assembly version
0.12.0.0). This is not a comparison against an unmodifiedreleased
0.12.0package or proof of the current downstream deployment version.The package's metadata associates
0.11.0with source commitf98865fc980b9919d201e20969d9b28685ee72bc. Among the interpreter examples,only the targeted separate-rule diagnostic changed. Recursive dependency
chains and the captured dynamic/function-output diagnostics were unchanged.
The corrected RVM probe compiles and loads a program and executes its named
entrypoint. Both versions return concrete values for the positive controls,
retain
"<undefined>"for unequal complete/function outputs, and throw thesame C# data-setup exception:
This is representative coverage, not execution of every error template.
Validation
cargo xtask ci-debugpassed on the production change. The final twocompiled-policy regression tests were added afterward and passed focused
runs; no production code changed after the full run.
no duplicated prior source, and no added quote delimiters. Existing
multiple-output and dependency suites passed.
Value::Undefinedin RVM while the interpreter retains its errors; equaloutputs succeed in both. A Rust runtime test checks
RuleDataConflictandpc: 0.test executed successfully against the paired native build.
git diff --checkpassed.The C# package-based test route encountered an SDK wildcard native-path packing
error; local project-reference execution succeeded. These runtime checks do
not establish package publication readiness.
Open questions
the right format for this conflict family? Should recursion simplification
remain a separate proposal?
it live, and which downstream consumers and templates must it cover?
No AGS source changes, new terminal RVM conflict semantics, deployment, or
rollout changes are included.