Repository navigation
Query filter: match civil Extended entities by their class name (R3.2) - #3389
Merged
HakanSeven12 merged 1 commit intoNov 20, 2026
Merged
Conversation
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.
R3.2 — civil-aware querying: match Extended entities by their class name
Closes the R3.2 gap from the OCS parity requirements
(ocs-parity-requirements.md, row R3.2;
repro evidence: M2 artifact
2026-11-20T10-07_m2_ocs_roundtrip.json).Repro (source-verified + artifact)
entity_type_matches(src/app/automation.rs:328-343) compared onlynames::ui_name—"Extended Entity"for every civil/AEC entity — thennames::dxf_name, which returns the blacklisted placeholder"ENTITY"forExtended variants, then the node-library names. An AECC entity's real class
identity (
AECC_ALIGNMENT,AECC_COGO_POINT, …) never entered thecomparison, so
ocs_query {"type":"AECC_ALIGNMENT"}matched nothing andscripts had to fall back to
where /data/Arch/dxf_name.Fix
For
EntityType::Extended, when the UI-name and dxf_name comparisons fail,entity_type_matchesadditionally comparesentity.class_name()(the classrecord's dxf_name, e.g.
AECC_ALIGNMENT,AECC_COGO_POINT) case-insensitively.The
"ENTITY"blacklist semantics are untouched; UI-name, native-type andnode-library matching are untouched.
Base: branch cut from current upstream main
c0100157f("fix(save): a read-onlysession refuses every native write"); fork main
f0374da43was a snapshot 22commits behind, with the acadrust pin moved to a7d3785 — this branch is rebased
and verified on the current pin. Overlap re-check vs upstream main and open PRs
(#3379/#3360/#3338/#3259):
entity_type_matchesunchanged upstream, no overlap.Tests
Unit tests in
type_name_tests(automation.rs), on the rebased branch(
cargo test --release type_name_tests): 3 passed / 0 failed"ENTITY"blacklist still behave; native types unaffectedLive verification (M2 recipe, BusBay example, authorized per D010)
Scratch copy of
DE_Busbucht_2023.dwg(MD5397f183a451459f39b19c0d839e77cba,identical to the M2 source; original untouched), driven through MCP stdio on a
host booted from this branch's post-rebase
cargo build --releaseexe(base
c0100157f, acadrust a7d3785) — numbers identical to the pre-rebase run:type=AECC_ALIGNMENTtype=AECC_COGO_POINTtype=aecc_tin_surfacetype=Line/Line+layer 0type=Extended Entitytype=ENTITYCensus on the same live document: 12,870 total / 722 Extended — exactly the
artifact 10-07 numbers; the change is query-only.
Census-passthrough statement
This PR touches only
entity_type_matches(query filtering) and adds tests.It cannot affect the save path: no entity, writer, or document code is
modified. The census invariants (12,870 total / 722 Extended / 585
AECC_COGO_POINT,
dropped_on_save:0) are re-confirmed live above.