Conversation
Object records carry a type name and nothing else, so attribution has always had to guess ownership from the namespace prefix. Namespaces are shared, so that guess cannot be made correct at any precision. The dataset's new `_asm` field closes the gap; this is the runner half that consumes it. Three changes: - `ParseObjectEventAssembly` reads the declaring assembly and type from a new event shape, consulted only when the Method event yielded nothing so the method path is untouched. - `ProbeTypeCandidates` collects every loaded assembly declaring a given type, so an object record whose type is declared more than once is counted by the existing ambiguity metric instead of being normalised away silently. - No change to year handling. `StripConfigSuffix` already collapses the Revit `_20NN` suffix and `IsFromSubjectAssembly` already compares on it, so this adds tests rather than code. Inert until Versioning_Toolkit emits the event: the runner's only view of the dataset is the TestResult tree, so with nothing emitting, every path is unchanged. The existing 135 tests pass unmodified.
This was referenced Sep 14, 2026
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.
Issues addressed by this PR
Refs BHoM/internal-tickets#35
The versioning check has to decide which repository a finding belongs to. For an object record it has only a type name, so it infers ownership from the namespace. Namespaces are shared, so it gets it wrong:
BHoM/BHoM_Adapterrun31844962538reported 1,056 failures, none of them that repository's.BHoM/BHoMrun33849699768reported 145 findings, all 145 attributed by namespace guess and none by evidence.Method records do not have this problem, because a method's declaring type is serialised assembly-qualified. This teaches the runner to read a declaring assembly for object records too, when one is recorded, and to fall back to today's behaviour when it is not.
Test files
163 tests pass, of which 135 are pre-existing and unmodified. Four mutation checks were run against the new behaviour, including reverting the message format to an earlier one; each failed tests and reverted clean.
Changelog
ci-versioningattributes an object-record finding by its declaring assembly when the dataset records one, instead of inferring ownership from the namespace.Additional comments
This is inert on its own. The runner's only view of the dataset is the
TestResulttree. Nothing emits the new field yet, so the new parser matches nothing and every existing path is unchanged. The field is added to the dataset, and emitted into the result, by separate changes onBHoM/Versioning_Toolkit.The contract, which is the thing worth scrutinising.
Versioning_Toolkitmust emit exactly this, or the field is unreadable:This is the only interface between the two changes, and getting it wrong fails silently: attribution just returns to guessing.
The quoted part holds the assembly alone, deliberately. An earlier version also put the type there, which cannot represent a closed generic, because those type names contain commas. Measured over the 9.2 dataset, that form parsed 1,690 of 1,713 records and silently lost 23. One of the 23 is declared by a different repository than its namespace suggests, so it stayed misattributed. An assembly name can never contain a quote, so the assembly-only form is unambiguous and covers all 1,713.
What changed
ParseObjectEventAssembly, new. Read only when the Method event yields nothing, so the method path is untouched.ProbeTypeCandidates, new. Reports when more than one loaded assembly declares a type, so an ambiguous attribution is counted rather than silently resolved.AttributeWholeClosure, extracted. The no-subject-list path had two call sites with a duplicated predicate; one was uncovered.ExtractFilteredResultgains one optional parameter. Null keeps existing behaviour.Unchanged:
AttributeToSubject,IsFromSubjectAssembly,StripConfigSuffix,ProbeDeclaringType, the ambiguity metric, and every dataset, workflow and action.Year-insensitive comparison of Revit per-year assemblies was already implemented by
StripConfigSuffix, so this adds tests for it rather than code.