From ad9282efd583b3138838e960221e662534519a75 Mon Sep 17 00:00:00 2001 From: Bailey Nguyen Date: Sat, 3 Oct 2026 18:20:02 -0500 Subject: [PATCH 1/2] fix(xml): decode namespace attribute entities before QName resolution --- .agents/skills/polyxml-core-engine/SKILL.md | 8 ++ crates/polyxml-core/src/parser.rs | 36 ++++---- .../tests/test_namespace_entities.rs | 90 +++++++++++++++++++ 3 files changed, 117 insertions(+), 17 deletions(-) create mode 100644 crates/polyxml-core/tests/test_namespace_entities.rs diff --git a/.agents/skills/polyxml-core-engine/SKILL.md b/.agents/skills/polyxml-core-engine/SKILL.md index 86dd4b3..f1e17fc 100644 --- a/.agents/skills/polyxml-core-engine/SKILL.md +++ b/.agents/skills/polyxml-core-engine/SKILL.md @@ -274,3 +274,11 @@ retain whitespace-token rejection, escaping and empty-list behavior. For measured changes, use [polyxml-runtime-investigation](../polyxml-runtime-investigation/SKILL.md). + +Namespace declarations are XML attribute values too: unescape predefined and +numeric references exactly once before storing their URI in NamespaceScope. +Propagate failures through document entry, nested Start/Empty handling and +XmlItemStream inheritance. Compare decoded URIs for strict-root and xsi:type +matching; escaped source text is not the namespace name. Preserve inherited +already-decoded bindings and test a literal amp-entity spelling against double +decoding. diff --git a/crates/polyxml-core/src/parser.rs b/crates/polyxml-core/src/parser.rs index afc027e..e6fe150 100644 --- a/crates/polyxml-core/src/parser.rs +++ b/crates/polyxml-core/src/parser.rs @@ -171,21 +171,23 @@ fn is_nil_element(e: &BytesStart) -> bool { /// Extend inherited namespace bindings for this element. Elements without /// declarations share the existing map. -fn namespace_scope(parent: &NamespaceScope, e: &BytesStart) -> NamespaceScope { +fn namespace_scope(parent: &NamespaceScope, e: &BytesStart) -> Result { let mut scope = None; for attr in e.attributes().flatten() { let key = attr.key.as_ref(); if key == "xmlns" { - scope - .get_or_insert_with(|| (**parent).clone()) - .insert(String::new(), attr.value.as_ref().to_string()); + scope.get_or_insert_with(|| (**parent).clone()).insert( + String::new(), + quick_xml::escape::unescape(attr.value.as_ref())?.into_owned(), + ); } else if let Some(prefix) = key.strip_prefix("xmlns:") { - scope - .get_or_insert_with(|| (**parent).clone()) - .insert(prefix.to_string(), attr.value.as_ref().to_string()); + scope.get_or_insert_with(|| (**parent).clone()).insert( + prefix.to_string(), + quick_xml::escape::unescape(attr.value.as_ref())?.into_owned(), + ); } } - scope.map(Arc::new).unwrap_or_else(|| Arc::clone(parent)) + Ok(scope.map(Arc::new).unwrap_or_else(|| Arc::clone(parent))) } /// Raw unescaped value of the type attribute in the XML Schema Instance @@ -342,7 +344,7 @@ pub const DEFAULT_MAX_DEPTH: usize = 256; impl XmlDeserializer { fn check_root(start: &BytesStart, schema: &ModelSchema) -> Result<()> { if schema.strict_root { - let scope = namespace_scope(&Arc::new(HashMap::new()), start); + let scope = namespace_scope(&Arc::new(HashMap::new()), start)?; let (ns, local) = resolve_element_qname(start, &scope); if local.as_bytes() != schema.xml_name || ns.as_deref().filter(|s| !s.is_empty()) @@ -384,7 +386,7 @@ impl XmlDeserializer { } Ok(Event::Empty(ref e)) => { Self::check_root(e, &root_schema)?; - let scope = namespace_scope(&Arc::new(HashMap::new()), e); + let scope = namespace_scope(&Arc::new(HashMap::new()), e)?; let schema = resolve_record_schema(&root_schema, e, &scope)?; let mut frame = StackFrame::new(schema); Self::parse_attributes(e, &mut frame)?; @@ -415,7 +417,7 @@ impl XmlDeserializer { inherited_scope: &NamespaceScope, ) -> Result { let mut stack: Vec = Vec::with_capacity(16); - let mut namespace_stack = vec![namespace_scope(inherited_scope, root_start)]; + let mut namespace_stack = vec![namespace_scope(inherited_scope, root_start)?]; let root_schema = resolve_record_schema(&root_schema, root_start, namespace_stack.last().unwrap())?; let mut root_frame = StackFrame::new(root_schema); @@ -431,7 +433,7 @@ impl XmlDeserializer { loop { match reader.read_event_into(&mut buf) { Ok(Event::Start(ref e)) => { - namespace_stack.push(namespace_scope(namespace_stack.last().unwrap(), e)); + namespace_stack.push(namespace_scope(namespace_stack.last().unwrap(), e)?); if unknown_depth > 0 { unknown_depth += 1; continue; @@ -626,11 +628,11 @@ impl XmlDeserializer { continue; } if any_stack.is_empty() { - let scope = namespace_scope(namespace_stack.last().unwrap(), e); + let scope = namespace_scope(namespace_stack.last().unwrap(), e)?; record_content_token(stack.last_mut().unwrap(), e, &scope); } if !any_stack.is_empty() { - let scope = namespace_scope(namespace_stack.last().unwrap(), e); + let scope = namespace_scope(namespace_stack.last().unwrap(), e)?; let (ns, local) = resolve_element_qname(e, &scope); let qname = if let Some(uri) = ns { format!("{{{}}}{}", uri, local) @@ -651,7 +653,7 @@ impl XmlDeserializer { continue; } let local_name = e.local_name(); - let scope = namespace_scope(namespace_stack.last().unwrap(), e); + let scope = namespace_scope(namespace_stack.last().unwrap(), e)?; let is_nil = is_nil_element(e); let current_schema = Arc::clone(&stack.last().unwrap().schema); @@ -1085,7 +1087,7 @@ impl XmlItemStream { .last() .cloned() .unwrap_or_else(|| Arc::new(HashMap::new())); - self.namespace_stack.push(namespace_scope(&inherited, e)); + self.namespace_stack.push(namespace_scope(&inherited, e)?); } Ok(Event::Empty(ref e)) => { let local = e.local_name(); @@ -1097,7 +1099,7 @@ impl XmlItemStream { .last() .cloned() .unwrap_or_else(|| Arc::new(HashMap::new())); - let scope = namespace_scope(&inherited, e); + let scope = namespace_scope(&inherited, e)?; let schema = resolve_record_schema(&self.schema, e, &scope)?; let mut frame = StackFrame::new(schema); XmlDeserializer::parse_attributes(e, &mut frame)?; diff --git a/crates/polyxml-core/tests/test_namespace_entities.rs b/crates/polyxml-core/tests/test_namespace_entities.rs new file mode 100644 index 0000000..9d92f2a --- /dev/null +++ b/crates/polyxml-core/tests/test_namespace_entities.rs @@ -0,0 +1,90 @@ +use polyxml::schema::{FieldKind, FieldSchema, ModelSchema, ScalarType, ValueType}; +use polyxml::{deserialize, serialize, PolyValue, XmlItemStream}; +use std::{io::Cursor, sync::Arc}; + +const NS: &str = "urn:polyxml:A&B"; +fn value_field() -> FieldSchema { + FieldSchema::new( + "value", + b"Value", + FieldKind::Element, + ValueType::Scalar(ScalarType::Int), + ) +} + +#[test] +fn escaped_namespace_bindings_match_strict_root_and_round_trip() { + let schema = ModelSchema::builder("Root") + .namespace(NS) + .strict_root(true) + .field(value_field()) + .build(); + for xml in [ + "7", + "7", + "7", + ] { + let value = deserialize(xml.as_bytes(), Arc::clone(&schema)).unwrap(); + assert_eq!(value.get("value"), Some(&PolyValue::Int(7))); + let output = serialize("Root", &value, &schema, None).unwrap(); + assert_eq!(value, deserialize(&output, Arc::clone(&schema)).unwrap()); + } +} + +#[test] +fn namespace_entity_values_are_decoded_once() { + let schema = ModelSchema::builder("Root") + .namespace("urn:polyxml:literal&") + .strict_root(true) + .build(); + let xml = b""; + assert!(deserialize(xml, schema).is_ok()); +} + +fn abstract_schema() -> Arc { + let base = ModelSchema::builder("Root").is_abstract(true).build(); + let concrete = ModelSchema::builder("Derived") + .namespace(NS) + .field(value_field()) + .build(); + base.set_variants(vec![concrete]); + base +} + +#[test] +fn entity_decoding_applies_to_inherited_and_local_xsi_type_bindings() { + let base = abstract_schema(); + for xml in [ + "9", + "", + ] { + let value=deserialize(xml.as_bytes(),Arc::clone(&base)).unwrap(); + let PolyValue::Record{schema,..}=value else{panic!("expected concrete record")}; + assert_eq!(schema.name,"Derived"); + } + let xml="9"; + let mut stream = XmlItemStream::new(Cursor::new(xml.as_bytes()), base, b"Root"); + for _ in 0..2 { + let value = stream.next_item().unwrap().unwrap(); + let PolyValue::Record { schema, .. } = value else { + panic!("expected concrete record") + }; + assert_eq!(schema.name, "Derived"); + } + assert!(stream.next_item().unwrap().is_none()); +} + +#[test] +fn undefined_entities_cannot_form_namespace_bindings() { + let schema = ModelSchema::builder("Root").build(); + for xml in [ + "", + "", + "", + ] { + assert!( + deserialize(xml.as_bytes(), Arc::clone(&schema)).is_err(), + "{xml}" + ); + } +} From 36b618d468f87effcdd0e9257aa5c6b7a579e400 Mon Sep 17 00:00:00 2001 From: Bailey Nguyen Date: Sat, 3 Oct 2026 19:45:28 -0500 Subject: [PATCH 2/2] docs: retain namespace decoding regression evidence --- .../namespace-entities/SHA256SUMS | 4 + .../namespace-entities/metadata.json | 8 + .../namespace-entities-baseline-tests.log | 37 + .../namespace-entities-gate.log | 985 ++++++++++++++++++ .../namespace-entities-tests.log | 57 + .../runtime-namespace-entities-2026-10-03.md | 22 + 6 files changed, 1113 insertions(+) create mode 100644 research/data/runtime-followups-2026-10-03/namespace-entities/SHA256SUMS create mode 100644 research/data/runtime-followups-2026-10-03/namespace-entities/metadata.json create mode 100644 research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-baseline-tests.log create mode 100644 research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-gate.log create mode 100644 research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-tests.log create mode 100644 research/runtime-namespace-entities-2026-10-03.md diff --git a/research/data/runtime-followups-2026-10-03/namespace-entities/SHA256SUMS b/research/data/runtime-followups-2026-10-03/namespace-entities/SHA256SUMS new file mode 100644 index 0000000..52081ae --- /dev/null +++ b/research/data/runtime-followups-2026-10-03/namespace-entities/SHA256SUMS @@ -0,0 +1,4 @@ +eabcc902c35bfd262c2a1009a50e06f82f24a792be3c605068cd3735a9b267a6 metadata.json +df1ef8b4289ef8587a49e3df9e7ad98322894a41c22c1100d8f4085fac4e4f90 namespace-entities-baseline-tests.log +139cd3ae6bc1c7399bf99d7d0144004277ebddd8bdeb9388539cd1b9edffd3af namespace-entities-gate.log +8258e57b86805096a3e08fd9b63e5493d1f18d90e7d2ee5a0721d36c66b56824 namespace-entities-tests.log diff --git a/research/data/runtime-followups-2026-10-03/namespace-entities/metadata.json b/research/data/runtime-followups-2026-10-03/namespace-entities/metadata.json new file mode 100644 index 0000000..81ed394 --- /dev/null +++ b/research/data/runtime-followups-2026-10-03/namespace-entities/metadata.json @@ -0,0 +1,8 @@ +{ + "baseline": "1819c91", + "implementation": "ad9282e", + "rust_tests": 325, + "workspace_target": "/home/bailey/github/PolyXML/target/followup-namespace-verification", + "command": "PATH=/tmp/polyxml-corpus-tools/node_modules/.bin:$PATH CARGO_TARGET_DIR=/home/bailey/github/PolyXML/target/followup-namespace-verification POLYXML_MEMCAP_BACKEND=systemd CARGO_BUILD_JOBS=1 DOTNET_ROLL_FORWARD=Major scripts/memcap.sh scripts/gate.sh", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)\nbinary: rustc\ncommit-hash: b940084d7eb6a299eb4bfeb8e34901bc051e7ac4\ncommit-date: 2026-09-28\nhost: x86_64-unknown-linux-gnu\nrelease: 1.99.0\nLLVM version: 23.1.1\n" +} diff --git a/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-baseline-tests.log b/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-baseline-tests.log new file mode 100644 index 0000000..4f603ef --- /dev/null +++ b/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-baseline-tests.log @@ -0,0 +1,37 @@ +memcap: <=7762 MiB (60% of 12937 MiB available) [systemd MemoryMax, swap off] + Compiling polyxml v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-core) + Finished `test` profile [unoptimized + debuginfo] target(s) in 6.78s + Running tests/test_namespace_entities.rs (/home/bailey/github/PolyXML/target/followup-borrow-verification/debug/deps/test_namespace_entities-4bd83b729ca4f37e) + +running 3 tests +test escaped_namespace_bindings_match_strict_root_and_round_trip ... FAILED +test undefined_entities_cannot_form_namespace_bindings ... FAILED +test entity_decoding_applies_to_inherited_and_local_xsi_type_bindings ... FAILED + +failures: + +---- escaped_namespace_bindings_match_strict_root_and_round_trip stdout ---- + +thread 'escaped_namespace_bindings_match_strict_root_and_round_trip' (502620) panicked at crates/polyxml-core/tests/test_namespace_entities.rs:27:70: +called `Result::unwrap()` on an `Err` value: SchemaError("Unexpected root element {urn:polyxml:A&B}Root") +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +---- undefined_entities_cannot_form_namespace_bindings stdout ---- + +thread 'undefined_entities_cannot_form_namespace_bindings' (502621) panicked at crates/polyxml-core/tests/test_namespace_entities.rs:75:9: + + +---- entity_decoding_applies_to_inherited_and_local_xsi_type_bindings stdout ---- + +thread 'entity_decoding_applies_to_inherited_and_local_xsi_type_bindings' (502619) panicked at crates/polyxml-core/tests/test_namespace_entities.rs:51:59: +called `Result::unwrap()` on an `Err` value: SchemaError("xsi:type=\"t:Derived\" does not match any known derivation of 'Root' (known: Derived)") + + +failures: + entity_decoding_applies_to_inherited_and_local_xsi_type_bindings + escaped_namespace_bindings_match_strict_root_and_round_trip + undefined_entities_cannot_form_namespace_bindings + +test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + +error: test failed, to rerun pass `-p polyxml --test test_namespace_entities` diff --git a/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-gate.log b/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-gate.log new file mode 100644 index 0000000..6e26f65 --- /dev/null +++ b/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-gate.log @@ -0,0 +1,985 @@ +memcap: <=7744 MiB (60% of 12907 MiB available) [systemd MemoryMax, swap off] +==> [1/6] Running Rust format check (cargo fmt)... +==> [2/6] Running Rust Clippy (cargo clippy -D warnings)... + Compiling proc-macro2 v1.0.107 + Compiling unicode-ident v1.0.24 + Compiling quote v1.0.47 + Compiling syn v3.0.5 + Compiling serde_core v1.0.229 + Checking memchr v2.8.3 + Compiling serde v1.0.229 + Compiling serde_derive v1.0.229 + Compiling syn v2.0.119 + Checking lexical-util v1.0.7 + Compiling zmij v1.0.23 + Compiling serde_json v1.0.151 + Checking siphasher v1.0.3 + Checking phf_shared v0.14.0 + Checking aho-corasick v1.1.5 + Checking fastrand v2.5.0 + Checking itoa v1.0.18 + Checking regex-syntax v0.8.11 + Checking regex-automata v0.4.18 + Checking lexical-write-integer v1.0.6 + Checking lexical-parse-integer v1.0.6 + Compiling thiserror v2.0.21 + Checking lexical-parse-float v1.0.6 + Checking lexical-write-float v1.0.6 + Checking regex v1.13.1 + Checking phf_generator v0.14.0 + Compiling thiserror-impl v2.0.21 + Checking memo-map v0.3.4 + Checking minijinja v2.24.0 + Checking phf_codegen v0.14.0 + Checking lexical-core v1.0.6 + Checking quick-xml v0.42.0 + Checking heck v0.5.0 + Checking smallvec v1.16.2 + Checking once_cell v1.21.4 + Compiling libc v0.2.189 + Checking polyxml v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-core) + Checking cfg-if v1.0.4 + Checking utf8parse v0.2.2 + Checking anstyle-parse v1.0.0 + Checking anstyle v1.0.14 + Checking is_terminal_polyfill v1.70.2 + Checking colorchoice v1.0.5 + Checking anstyle-query v1.1.5 + Checking anstream v1.0.0 + Checking strsim v0.11.1 + Checking bitflags v2.13.2 + Checking clap_lex v1.1.0 + Checking clap_builder v4.6.7 + Compiling clap_derive v4.6.7 + Checking clap v4.6.7 + Compiling getrandom v0.4.3 + Compiling rustix v1.1.5 + Compiling zerocopy v0.8.57 + Compiling zerocopy-derive v0.8.57 + Compiling find-msvc-tools v0.1.12 + Checking linux-raw-sys v0.12.1 + Compiling shlex v2.0.1 + Compiling cc v1.4.5 + Compiling autocfg v1.5.1 + Compiling num-traits v0.2.19 + Checking tempfile v3.27.0 + Checking half v2.7.1 + Compiling alloca v0.4.0 + Checking either v1.18.0 + Checking ciborium-io v0.2.2 + Checking ciborium-ll v0.2.2 + Checking itertools v0.13.0 + Checking cast v0.3.0 + Checking same-file v1.0.6 + Checking walkdir v2.5.0 + Checking criterion-plot v0.8.2 + Compiling phf_macros v0.14.0 + Checking ciborium v0.2.2 + Checking page_size v0.6.0 + Checking tinytemplate v1.2.1 + Checking anes v0.1.6 + Checking oorandom v11.1.5 + Checking yansi v1.0.1 + Checking diff v0.1.13 + Checking pretty_assertions v1.4.1 + Checking criterion v0.8.2 + Checking phf v0.14.0 + Compiling target-lexicon v0.13.5 + Compiling wasm-bindgen-shared v0.2.129 + Compiling pyo3-build-config v0.29.2 + Checking winnow v1.0.4 + Compiling rustversion v1.0.23 + Checking toml_parser v1.1.3+spec-1.1.0 + Compiling pyo3-ffi v0.29.2 + Checking toml_datetime v1.1.1+spec-1.1.0 + Checking serde_spanned v1.1.1 + Checking toml_writer v1.1.2+spec-1.1.0 + Checking toml v1.1.6+spec-1.1.0 + Checking glob v0.3.4 + Compiling bumpalo v3.20.3 + Compiling unicode-segmentation v1.13.3 + Compiling convert_case v0.6.0 + Compiling wasm-bindgen-macro-support v0.2.129 + Compiling wasm-bindgen v0.2.129 + Compiling pyo3 v0.29.2 + Compiling pyo3-macros-backend v0.29.2 + Compiling napi-build v2.5.0 + Compiling semver v1.0.28 + Compiling napi-derive-backend v1.0.75 + Compiling polyxml-js v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-js) + Compiling pyo3-macros v0.29.2 + Compiling wasm-bindgen-macro v0.2.129 + Checking polyxml-cli v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-cli) + Compiling ctor v0.2.9 + Checking napi-sys v2.4.0 + Compiling napi-derive v2.16.13 + Checking napi v2.16.17 + Checking polyxml-wasm v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-wasm) + Checking polyxml-python v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-python) + Checking polyxml-c v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-c) + Finished `dev` profile [unoptimized + debuginfo] target(s) in 50.76s +==> [3/6] Running Rust workspace tests (cargo test)... + Compiling unicode-ident v1.0.24 + Compiling proc-macro2 v1.0.107 + Compiling quote v1.0.47 + Compiling syn v3.0.5 + Compiling serde_core v1.0.229 + Compiling siphasher v1.0.3 + Compiling memchr v2.8.3 + Compiling regex-syntax v0.8.11 + Compiling serde_derive v1.0.229 + Compiling heck v0.5.0 + Compiling serde v1.0.229 + Compiling lexical-util v1.0.7 + Compiling syn v2.0.119 + Compiling zmij v1.0.23 + Compiling aho-corasick v1.1.5 + Compiling phf_shared v0.14.0 + Compiling fastrand v2.5.0 + Compiling itoa v1.0.18 + Compiling cfg-if v1.0.4 + Compiling serde_json v1.0.151 + Compiling regex-automata v0.4.18 + Compiling lexical-parse-integer v1.0.6 + Compiling lexical-write-integer v1.0.6 + Compiling once_cell v1.21.4 + Compiling lexical-write-float v1.0.6 + Compiling lexical-parse-float v1.0.6 + Compiling regex v1.13.1 + Compiling phf_generator v0.14.0 + Compiling thiserror-impl v2.0.21 + Compiling memo-map v0.3.4 + Compiling minijinja v2.24.0 + Compiling thiserror v2.0.21 + Compiling phf_codegen v0.14.0 + Compiling lexical-core v1.0.6 + Compiling quick-xml v0.42.0 + Compiling smallvec v1.16.2 + Compiling libc v0.2.189 + Compiling polyxml v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-core) + Compiling utf8parse v0.2.2 + Compiling anstyle-parse v1.0.0 + Compiling is_terminal_polyfill v1.70.2 + Compiling colorchoice v1.0.5 + Compiling anstyle-query v1.1.5 + Compiling anstyle v1.0.14 + Compiling anstream v1.0.0 + Compiling strsim v0.11.1 + Compiling clap_lex v1.1.0 + Compiling clap_builder v4.6.7 + Compiling clap_derive v4.6.7 + Compiling bitflags v2.13.2 + Compiling clap v4.6.7 + Compiling linux-raw-sys v0.12.1 + Compiling rustix v1.1.5 + Compiling getrandom v0.4.3 + Compiling zerocopy-derive v0.8.57 + Compiling zerocopy v0.8.57 + Compiling tempfile v3.27.0 + Compiling half v2.7.1 + Compiling ciborium-io v0.2.2 + Compiling either v1.18.0 + Compiling itertools v0.13.0 + Compiling ciborium-ll v0.2.2 + Compiling cast v0.3.0 + Compiling same-file v1.0.6 + Compiling walkdir v2.5.0 + Compiling criterion-plot v0.8.2 + Compiling num-traits v0.2.19 + Compiling alloca v0.4.0 + Compiling phf_macros v0.14.0 + Compiling ciborium v0.2.2 + Compiling page_size v0.6.0 + Compiling tinytemplate v1.2.1 + Compiling yansi v1.0.1 + Compiling diff v0.1.13 + Compiling anes v0.1.6 + Compiling oorandom v11.1.5 + Compiling criterion v0.8.2 + Compiling pretty_assertions v1.4.1 + Compiling phf v0.14.0 + Compiling winnow v1.0.4 + Compiling toml_parser v1.1.3+spec-1.1.0 + Compiling toml_datetime v1.1.1+spec-1.1.0 + Compiling serde_spanned v1.1.1 + Compiling toml_writer v1.1.2+spec-1.1.0 + Compiling toml v1.1.6+spec-1.1.0 + Compiling wasm-bindgen-shared v0.2.129 + Compiling glob v0.3.4 + Compiling wasm-bindgen-macro-support v0.2.129 + Compiling wasm-bindgen-macro v0.2.129 + Compiling polyxml-cli v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-cli) + Compiling wasm-bindgen v0.2.129 + Compiling pyo3-macros-backend v0.29.2 + Compiling polyxml-js v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-js) + Compiling napi-derive-backend v1.0.75 + Compiling pyo3-macros v0.29.2 + Compiling pyo3-ffi v0.29.2 + Compiling ctor v0.2.9 + Compiling napi-sys v2.4.0 + Compiling napi v2.16.17 + Compiling pyo3 v0.29.2 + Compiling napi-derive v2.16.13 + Compiling polyxml-wasm v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-wasm) + Compiling polyxml-python v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-python) + Compiling polyxml-c v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-c) + Finished `test` profile [unoptimized + debuginfo] target(s) in 1m 16s + Running unittests src/lib.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/polyxml-675b717e531d04ed) + +running 16 tests +test integer::tests::comparison_uses_sign_and_magnitude ... ok +test ir::chunker::tests::test_topological_scc_chunking_dag_invariants ... ok +test ir::root_selection_tests::inherited_base_does_not_select_sibling_types ... ok +test ir::root_selection_tests::keeps_references_descendants_and_substitutions ... ok +test json::tests::test_json_deserialization_accepts_python_field_names ... ok +test json::tests::test_json_roundtrip_primitives ... ok +test ir::root_selection_tests::rejects_missing_and_ambiguous_roots ... ok +test tests::test_streaming_xml_item_stream ... ok +test ir::root_selection_tests::field_reference_keeps_substitution_group_members ... ok +test tests::test_nested_elements_and_lists ... ok +test tests::test_roundtrip_serialization_deserialization ... ok +test tests::test_deserialization_does_not_confuse_xmlns_with_attributes ... ok +test pattern::tests::bounded_cache_evicts_and_retains_invalid_results ... ok +test tests::test_namespaced_serialization ... ok +test pattern::tests::cache_matches_uncached_regex_under_churn_and_concurrency ... ok +test pattern::tests::cyclic_working_set_above_capacity_keeps_reusing_entries ... ok + +test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.16s + + Running tests/test_adversarial_identifiers.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_adversarial_identifiers-34056256ccaa17cb) + +running 7 tests +test test_rust_adversarial_compilation ... ok +test test_python_adversarial_compilation ... ok +test test_go_adversarial_compilation ... ok +test test_cpp_adversarial_compilation ... ok +test test_java_adversarial_compilation ... ok +test test_typescript_adversarial_compilation ... ok +test test_csharp_adversarial_compilation ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.71s + + Running tests/test_any_attribute.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_any_attribute-d5795d9c5e0fdefd) + +running 1 test +test test_any_attribute_schema_parser_and_runtime_roundtrip ... ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_any_element.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_any_element-1fb225d6616938e8) + +running 2 tests +test test_any_element_go_codegen ... ok +test test_any_element_schema_parser_and_runtime_roundtrip ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_conformance.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_conformance-0b37810d65fedfce) + +running 4 tests +test test_soap_envelope_conformance ... ok +test test_ubl_invoice_conformance ... ok +test test_atom_feed_conformance ... ok +test test_streaming_catalog_conformance ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s + + Running tests/test_core.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_core-f4cc1079f88df2bc) + +running 9 tests +test integer_mappings_keep_fixed_width_builtins ... ok +test test_gregorian_partial_date_lexical_validation ... ok +test test_all_scalar_types ... ok +test test_malformed_xml_syntax_error ... ok +test test_roundtrip_serialization_with_indentation ... ok +test test_xsi_nil_handling ... ok +test test_error_handling_invalid_scalars ... ok +test unbounded_integers_round_trip_and_compare_exact_bounds ... ok +test test_xsd_gregorian_fields_round_trip_and_reject_invalid_dates ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_cpp_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_cpp_codegen-a4cd5571504c64d5) + +running 14 tests +test simple_aliases_follow_their_base_types ... ok +test test_cpp_cmake_modules_file_set ... ok +test test_cpp_cmake_and_meson_generation ... ok +test test_cpp_mode_and_backend_from_str_loose ... ok +test test_cpp_glaze_backend_meta_generation ... ok +test test_cpp_sanitization ... ok +test mixed_content_self_cycle_compiles ... ok +test mixed_content_mutual_cycle_compiles ... ok +Recursive tree unique_ptr passed. +test test_cpp_recursive_cycle_unique_ptr ... ok +Inheritance test passed. +test test_cpp_inheritance_codegen ... ok +Choice pattern matching passed. +test test_cpp_choice_variant_compilation ... ok +All C++20 tests passed successfully. +test test_cpp_struct_and_enum_codegen_compilation ... ok +test test_cpp_modules_compilation ... ok +ISO 20022 pacs.008 C++20 test passed. +test test_cpp_from_xsd_schema ... ok + +test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.84s + + Running tests/test_csharp_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_csharp_codegen-cf32febf6e7f0777) + +running 20 tests +test choice_variants_avoid_record_member_names ... ok +test emits_unrestricted_simple_types_and_validates_empty_records ... ok +test test_csharp_date_or_datetime_lexical_union ... ok +test test_csharp_any_attribute_codegen ... ok +test test_csharp_record_kind_from_str_loose ... ok +test test_csharp_sanitization ... ok +test test_csharp_sequence_nested_inside_choice_codegen ... ok +test test_csharp_source_gen_context ... ok +test unbounded_integer_xml_preserves_digits ... ok + Determining projects to restore... + Restored /tmp/.tmpOsIfWt/PaymentsApp.csproj (in 168 ms). + PaymentsApp -> /tmp/.tmpOsIfWt/bin/Debug/net8.0/PaymentsApp.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:01.02 +Choice pattern matching and XML serialization passed! +test test_csharp_choice_polymorphic_hierarchy ... ok + Determining projects to restore... + Restored /tmp/.tmpFK5x4e/CrmApp.csproj (in 170 ms). + CrmApp -> /tmp/.tmpFK5x4e/bin/Debug/net8.0/CrmApp.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:01.06 +Customer C# tests passed cleanly! +test test_csharp_records_and_enums_generation ... ok + Determining projects to restore... + Restored /tmp/.tmpcdPJ7o/TreeApp.csproj (in 168 ms). + TreeApp -> /tmp/.tmpcdPJ7o/bin/Debug/net8.0/TreeApp.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:01.02 +Recursive tree C# tests passed cleanly! +test test_csharp_recursive_cycle ... ok +test test_csharp_mutable_inheritance_roundtrip ... ok +test test_csharp_mutable_wrappers_and_choices_without_validation ... ok +test test_csharp_simple_content_class_validator_and_unsealed_records ... ok +test lexical_union_attributes_round_trip ... ok +test fixed_values_are_enforced_on_read_and_write ... ok +test element_defaults_preserve_absence_and_empty_presence ... ok +test nillable_enum_collection_round_trips ... ok +test particle_wire_structure_round_trips ... ok + +test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 50.21s + + Running tests/test_go_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_go_codegen-005c45ed4341be87) + +running 25 tests +test root_alias_names_are_unique_after_go_normalization ... ok +test referenced_element_uses_declared_type_after_includes ... ok +test test_go_any_attribute_codegen ... ok +test test_go_backend_from_str_loose ... ok +go: creating new go.mod: module payments +go: to add module requirements and sums: + go mod tidy +test imported_ordered_types_do_not_add_unused_bytes_import ... ok +test test_go_date_or_datetime_lexical_union ... ok +test test_go_easyjson_backend ... ok +test test_go_enum_only_schema_omits_unused_xml_import ... ok +test abstract_substitution_heads_are_rejected ... ok +go: creating new go.mod: module tree +go: to add module requirements and sums: + go mod tidy +test nested_lexical_unions_compile_and_round_trip_in_go ... ok +test test_go_sanitization ... ok +test roots_and_union_attributes_round_trip ... ok +test test_go_sonic_backend ... ok +test repeated_sequence_groups_enforce_bounds_and_order ... ok +go: creating new go.mod: module crm +test duplicate_choice_names_reject_invalid_branch_shapes ... ok +go: to add module requirements and sums: + go mod tidy +test separate_choices_enforce_each_group ... ok +test repeated_choice_branch_rejects_mixed_and_empty_selections ... ok +test test_go_abstract_xsi_type_dispatch ... ok +=== RUN TestChoiceMutualExclusivity + payments_test.go:44: Correctly rejected concurrent choice branches: choice ContactChoice mutual exclusivity violation: multiple branches populated (2) +--- PASS: TestChoiceMutualExclusivity (0.00s) +PASS +ok payments 0.003s +test temporal_scalars_preserve_xsd_lexical_values ... ok +test test_go_choice_mutual_exclusivity ... ok +test test_go_namespaced_element_ref_matching ... ok +=== RUN TestRecursiveTree +--- PASS: TestRecursiveTree (0.00s) +PASS +ok tree 0.002s +test test_go_recursive_cycle_pointers ... ok +=== RUN TestCustomerRoundtrip +--- PASS: TestCustomerRoundtrip (0.00s) +PASS +ok crm 0.003s +test test_go_struct_and_enum_generation ... ok +test unbounded_integer_xml_preserves_digits ... ok +test ordered_particles_and_choice_branches_round_trip ... ok + +test result: ok. 25 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.08s + + Running tests/test_java_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_java_codegen-a6078e165fc64681) + +running 17 tests +test test_direct_codec_rejects_wildcards_and_name_collisions ... ok +test test_java_jackson_backend_enum_annotations ... ok +test test_java_identifier_sanitization ... ok +test test_java_jackson_backend_from_str_loose ... ok +test test_java_jackson_backend_simple_type_annotations ... ok +test test_java_jackson_backend_union_annotations ... ok +test test_java_jackson_backend_struct_annotations ... ok +test test_java_bean_validation_annotations_are_opt_in ... ok +test jackson3_preserves_core_annotations_and_maps_record_text ... ok +test test_java_plain_record_inlines_base_fields ... ok +test test_java_module_container_class ... ok +test test_java_records_and_enums_generation ... ok +test test_java_sealed_interface_choice ... ok +test test_java_plain_record_extension_javac_execute ... ok +test test_java_record_builder_and_nested_codec_execute ... ok +test test_java_mutable_builders_and_direct_codecs_execute ... ok +test test_java_direct_nil_lists_choices_and_namespaces ... ok + +test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.46s + + Running tests/test_json.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_json-74440efee0e911e7) + +running 4 tests +test test_polyvalue_direct_json_methods ... ok +test test_json_scalar_coercion ... ok +test test_json_primitives_and_alias_modes ... ok +test test_json_nested_objects_and_lists ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_lexical_lists.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_lexical_lists-0f6750d9c4bf9a3c) + +running 2 tests +test named_list_items_enforce_facets_and_enumerations ... ok +test typed_lexical_lists_round_trip_across_codecs ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.27s + + Running tests/test_lexical_union_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_lexical_union_codegen-3c208893561d2732) + +running 2 tests +test lexical_union_xml_selects_first_valid_member_and_round_trips ... ok +test lexical_unions_are_typed_in_all_targets ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_mixed_content.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_mixed_content-1a697ad935ae2797) + +running 5 tests +test mixed_items_field_avoids_existing_attribute_name ... ok +test parser_builds_ordered_mixed_content_union ... ok +test mixed_content_preserves_text_and_child_order ... ok +test mixed_content_preserves_nested_child_order ... ok +test generated_models_keep_typed_content_items_in_all_targets ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_namespace_entities.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_namespace_entities-4c617e2673a7b703) + +running 4 tests +test namespace_entity_values_are_decoded_once ... ok +test entity_decoding_applies_to_inherited_and_local_xsi_type_bindings ... ok +test undefined_entities_cannot_form_namespace_bindings ... ok +test escaped_namespace_bindings_match_strict_root_and_round_trip ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_pattern_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_pattern_codegen-5eee5f9fe2ed3d1a) + +running 9 tests +test generated_typescript_pattern_validation_all_backends ... ok +test pattern_restrictions_preserve_or_groups_and_inherited_and_steps ... ok +test gregorian_primitives_emit_validated_types_across_targets ... ok +test generated_go_pattern_validation_and_xml_roundtrip ... ok +test generated_python_pattern_validation ... ok +test generated_java_pattern_validation_and_direct_codecs ... ok +test generated_cpp_pattern_validation ... ok +test generated_csharp_pattern_validation ... ok +test generated_rust_pattern_validation_and_xml_roundtrip ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 24.46s + + Running tests/test_python_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_python_codegen-cc734e908fb39fb6) + +running 16 tests +test test_identifier_sanitization ... ok +test test_python_abstract_meta_emission ... ok +test multiline_xsd_documentation_stays_inside_python_comments ... ok +test test_python_choice_union_codegen ... ok +test test_python_codecs_generation ... ok +test test_python_any_element_codegen ... ok +test test_python_any_attribute_codegen ... ok +test test_python_dataclass_codegen ... ok +test test_python_generated_tag_and_custom_header ... ok +test test_python_recursive_type_codegen ... ok +test test_python_pydantic_codegen_with_facets ... ok +test test_python_aot_codegen ... ok +test test_python_derived_meta_inheritance ... ok +test test_python_simplecontent_default_factory ... ok +test test_python_sequence_nested_inside_choice_codegen ... ok +test quoted_docstrings_preserve_text_and_remain_valid_python ... ok + +test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s + + Running tests/test_qualified_attributes.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_qualified_attributes-f8397a31cf1ecf15) + +running 5 tests +test global_attribute_references_round_trip_by_namespace ... ok +test imported_inline_global_attribute_enum_round_trips ... ok +test derived_validators_preserve_base_constraints ... ok +test inherited_attribute_and_distinct_element_keep_separate_property_names ... ok +test lexical_dependencies_compile_and_round_trip_without_implicit_imports ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.11s + + Running tests/test_runtime_fast_paths.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_runtime_fast_paths-7bf9091b7252b7db) + +running 6 tests +test repeated_lexical_lists_keep_whitespace_validation ... ok +test repeated_nested_records_validate_their_own_lexical_lists ... ok +test lexical_list_formatting_preserves_escaping_empty_lists_and_long_numbers ... ok +test indexed_scalar_state_preserves_enum_pattern_and_split_text ... ok +test cached_patterns_keep_raw_restriction_and_trimmed_pattern_semantics ... ok +test unified_scalar_state_keeps_mixed_branch_order_nil_and_nested_frames ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_rust_codecs.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_rust_codecs-9692e165bd5e14bf) + +running 4 tests +test test_empty_element_codec ... ok +test test_facet_validation_min_max_length ... ok +test test_order_choice_roundtrip ... ok +test test_recursive_boxing_roundtrip ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_rust_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_rust_codegen-8bce8b4b67c7eca3) + +running 26 tests +test test_rust_attribute_codec_loop_syntax ... ok +test multiline_docs_and_raw_field_names_are_valid_source ... ok +test test_rust_choice_union_codegen ... ok +test test_rust_digit_prefixed_module_sanitization ... ok +test test_rust_enum_and_methods ... ok +test test_rust_codecs_codegen ... ok +test test_rust_identifier_sanitization ... ok +test test_rust_owned_codegen ... ok +test test_rust_extension_base_cycle_cut ... ok +test test_rust_phf_dispatch_union_groups_branch_tags ... ok +test test_rust_extension_inlines_base_fields ... ok +test test_rust_extension_codecs_decode_and_encode_base_fields ... ok +test test_rust_recursive_cycle_boxing ... ok +test test_rust_rkyv_derives ... ok +test test_rust_phf_dispatch_uniquifies_like_field_metas ... ok +test test_rust_phf_dispatch_emission ... ok +test test_rust_simple_type_cycle_resilience ... ok +test test_rust_zero_copy_codegen ... ok +test test_rust_topological_scc_chunking ... ok +test test_rust_simple_content_extension_shadow_rule ... ok +test test_rust_simple_content_text_codec ... ok +test test_rust_read_element_text_accumulates_refs_and_cdata ... ok +test binary_lexical_values_compile_and_round_trip_in_owned_and_borrowed_modes ... ok +test empty_modules_compile_without_unused_reexports ... ok +test duplicate_wire_names_keep_distinct_json_values ... ok +test named_choice_wrappers_round_trip_without_unreachable_dispatch ... ok + +test result: ok. 26 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 58.73s + + Running tests/test_schema_audit.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_schema_audit-24992dfb5b4a626c) + +running 13 tests +test duplicate_enumeration_values_are_deduped ... ok +test distinct_values_with_colliding_variant_names_stay_unique ... ok +test derived_simple_type_inherits_base_patterns ... ok +test quick_xml_serde_skips_unknown_elements ... ok +test all_languages_disambiguate_flat_collision ... ok +test generated_rust_has_no_deny_unknown_fields ... ok +test nested_inline_complex_type_is_extracted_not_leaked ... ok +test rust_flat_output_has_no_colliding_type_names ... ok +test simple_content_extension_emits_value_field ... ok +test named_group_reference_fields_are_parsed ... ok +test restricted_simple_types_emit_named_aliases ... ok +test chameleon_include_adopts_including_namespace_per_includer ... ok +test diamond_includes_do_not_duplicate_upa_source_documents ... ok + +test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_schema_ir.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_schema_ir-f793c1b9895343c7) + +running 20 tests +test global_attribute_reference_uses_declared_type ... ok +test consumed_child_subtrees_do_not_swallow_following_types ... ok +test schema_errors_preserve_forward_imports_and_annotation_payloads ... ok +test consumed_particles_do_not_swallow_following_declarations ... ok +test test_language_context_adapter ... ok +test inline_list_item_types_preserve_enum_and_union_declarations ... ok +test test_list_fields_do_not_trigger_spurious_cycles ... ok +test missing_included_schema_is_an_error ... ok +test derived_complex_type_keeps_base_and_bounded_choice ... ok +test schema_for_schemas_declared_types_are_not_unknown_builtins ... ok +test test_tarjan_mutual_recursive_cycle_detection_and_boxing ... ok +test test_parse_lexical_union_member_types_and_inline_members ... ok +test test_substitution_groups ... ok +test test_tarjan_self_recursive_cycle_detection_and_boxing ... ok +test test_minijinja_template_engine_and_filters ... ok +test xml_prefix_is_available_without_explicit_declaration ... ok +test test_parse_complex_type_and_facets ... ok +test imported_inline_global_attribute_types_are_resolved ... ok +test test_sequence_nested_inside_choice_preserved_in_ir ... ok +test test_parse_choice_as_union ... ok + +test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_security.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_security-c3afa670f1d6c619) + +running 6 tests +test test_cdata_section_handling ... ok +test test_malformed_unclosed_cdata_rejection ... ok +test unsupported_general_entities_are_rejected ... ok +test test_xml_entity_roundtrip_escaping ... ok +test test_numeric_character_references ... ok +test test_max_depth_recursion_limit ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_temporal_union.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_temporal_union-e25d1f9b83e2fdc4) + +running 2 tests +test go_temporal_union_preserves_branches_and_lexicals ... ok +test csharp_temporal_union_preserves_branches_and_lexicals ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.01s + + Running tests/test_transcoder.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_transcoder-6854114408316a2e) + +running 6 tests +test test_schemaless_preserves_refs_cdata_and_attr_entities ... ok +test test_schema_directed_transcoding ... ok +test test_schemaless_pretty_transcoding ... ok +test test_transcoder_errors ... ok +test test_schemaless_xml_to_json_and_back ... ok +test test_schema_from_ir_transcoding ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_ts_codegen.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_ts_codegen-4e67290c9758f4d9) + +running 9 tests +test test_ts_backend_from_str_loose ... ok +test test_ts_identifier_sanitization ... ok +test test_ts_discriminated_union_choice ... ok +test test_ts_interface_and_enum_codegen ... ok +test test_ts_recursive_cycle_zod_lazy ... ok +test test_ts_typebox_schema_generation ... ok +test test_ts_zod_schema_generation ... ok +test test_ts_valibot_schema_generation ... ok +test mixed_content_inheritance_compiles_with_widened_items ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.32s + + Running tests/test_ubl_csharp.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_ubl_csharp-b04bc8d2d5f891c2) + +running 2 tests +test unprefixed_xsd_builtin_simple_content_base_uses_default_namespace ... ok +test multi_namespace_roots_and_inherited_simple_content_compile_and_round_trip ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.02s + + Running tests/test_unbounded_choice.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_unbounded_choice-7672e62aa5ecca1a) + +running 1 test +go: creating new go.mod: module testmod +go: to add module requirements and sums: + go mod tidy +=== RUN TestUnboundedChoiceOrder +--- PASS: TestUnboundedChoiceOrder (0.00s) +PASS +ok testmod 0.002s +test test_unbounded_choice_ir_and_all_targets ... ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.15s + + Running tests/test_upa.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_upa-a20019d257c7eac5) + +running 6 tests +test model_groups_derivation_and_substitution_members_are_checked ... ok +test local_form_and_in_scope_qnames_distinguish_namespaces ... ok +test imported_groups_and_chameleon_wildcards_keep_source_namespaces ... ok +test all_groups_and_wildcard_namespaces_are_checked ... ok +test optional_siblings_and_choice_lookahead_violate_upa ... ok +test occurrence_ranges_keep_particle_identity_and_count_boundaries ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_value_constraints.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_value_constraints-73eb81a96de588c1) + +running 2 tests +test fixed_constraints_cover_input_and_output_in_value_space ... ok +test repeated_particle_cardinality_belongs_to_the_group ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_xsi_type.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_xsi_type-2c07a0776bd0ec60) + +running 11 tests +test abstract_type_without_derivations_errors ... ok +test abstract_type_requires_concrete_selector ... ok +test from_ir_flattens_base_fields_and_registers_variants ... ok +test plain_type_attribute_is_not_mistaken_for_dispatch ... ok +test nil_abstract_complex_type_skips_concrete_dispatch ... ok +test variant_serialization_requires_namespaces ... ok +test root_xsi_type_dispatch_including_empty_element ... ok +test iterparse_dispatches_each_streamed_item ... ok +test unknown_xsi_type_on_abstract_type_errors ... ok +test nested_xsi_type_dispatch_and_round_trip ... ok +test xsi_type_resolves_namespace_inherited_from_parent ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running unittests src/lib.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/polyxml-4ccc220bbd6a27a0) + +running 2 tests +test tests::test_c_abi_namespaced_roundtrip ... ok +test tests::test_c_abi_nested_list_batch_roundtrip ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running unittests src/lib.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/polyxml_cli-dabf613ae4318f1b) + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running unittests src/main.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/polyxml-cec02944de7101b9) + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_cli.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/test_cli-714ccf0c30d96734) + +running 47 tests +test fish_completion_filters_values_when_available ... ok +Loading manifest: /tmp/.tmp6CzCFy/polyxml.toml +Compiling schema: /tmp/.tmp6CzCFy/model.xsd +test manifest_generation_does_not_ignore_cli_overrides ... ok + Namespace: urn:app + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Emitting target [csharp] into /tmp/.tmp6CzCFy/cs +Emitting target [ts] into /tmp/.tmp6CzCFy/ts +Emitting target [go] into /tmp/.tmp6CzCFy/go +Emitting target [rust] into /tmp/.tmp6CzCFy/rs +Build finished successfully. +test test_cli_build_polyxml_manifest_with_new_features ... ok +Parsing schema: /tmp/.tmpwIb502/customer.xsd + Namespace: urn:crm + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Code generation complete. +test test_cli_csharp_source_gen_and_record_struct ... ok +test test_cli_cpp_modules_and_glaze ... ok +test jackson3_cli_and_manifest_emit_equivalent_models ... ok +test test_cli_generate_dry_run ... ok +test test_cli_generate_custom_header_and_generated_tags ... ok +test imported_substitution_helpers_do_not_require_spurious_module_owners ... ok +Parsing schema: /tmp/.tmpnmAVc1/service.xsd +test test_cli_generate_help ... ok + Namespace: urn:service + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Code generation complete. +test test_cli_generate_multi_lang ... ok +Parsing schema: /tmp/.tmpnmAVc1/service.xsd +test test_cli_help ... ok +test python_features_respect_manifest_false_values_and_backend ... ok + Namespace: urn:service + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Code generation complete. +test test_cli_go_easyjson_and_sonic_backend ... ok +Loading manifest: /tmp/.tmpZJAinE/polyxml.toml +Compiling schema: /tmp/.tmpZJAinE/schema.xsd +test retained_imported_ordered_helpers_belong_to_the_unique_namespace_module ... ok + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Emitting target [rust] into /tmp/.tmpZJAinE/rs +Emitting target [go] into /tmp/.tmpZJAinE/go +Emitting target [csharp] into /tmp/.tmpZJAinE/cs +Build finished successfully. +test test_cli_manifest_custom_header_workspace_and_target_override ... ok +test test_cli_generate_python_backends ... ok +test test_cli_generate_rust_zero_copy_and_owned ... ok +test test_cli_python_aot_generation ... ok +Parsing schema: /tmp/.tmpXDspjd/event.xsd + Namespace: urn:events + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Code generation complete. +Parsing schema: /tmp/.tmpHybuJJ/event.xsd + Namespace: urn:events + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Code generation complete. +test completion_candidates_follow_target_validation ... ok +test test_cli_rust_phf_feature ... ok +test test_cli_multiple_root_element_selection ... ok +test test_cli_rust_rkyv_feature ... ok +test test_cli_python_aot_rejects_dataclass_style_and_slots ... ok +go: creating new go.mod: module crm +go: to add module requirements and sums: + go mod tidy +test invalid_schema_grammar_and_types_fail_before_generation ... ok +Parsing schema: /tmp/.tmpOjFISS/item.xsd + Namespace: urn:store + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Code generation complete. +test test_cli_transcode_bidirectional ... ok +Parsing schema: /tmp/.tmpOjFISS/item.xsd +test test_cli_validate_valid_and_invalid ... ok + Namespace: urn:store + Types: 1 total (1 structs, 0 enums, 0 unions, 0 simple restrictions) + Root elements: 0 +Code generation complete. +test test_cli_typescript_valibot_and_typebox_backend ... ok +test bash_completion_filters_values_in_the_shell ... ok +test test_polyxml_toml_manifest_build ... ok +test test_root_selection_keeps_imported_module_types ... ok +test unified_help_shows_generation_options ... ok +test test_cli_root_element_selection ... ok +test test_java_csharp_model_style_options_and_manifest ... ok +test unified_manifest_forms_generate_identical_output_and_validate_early ... ok +test zsh_completion_filters_values_when_available ... ok +test validate_and_generate_reject_upa_violations ... ok +test unsupported_xsd_alternatives_fail_explicitly ... ok +test unified_options_fail_before_schema_io_including_dry_run ... ok +test unified_supported_backends_and_styles_validate ... ok +=== RUN TestAccountE2E +--- PASS: TestAccountE2E (0.00s) +PASS +ok crm 0.004s +test test_cli_go_generation ... ok +E2E C++20 driver passed! +test test_cli_cpp_generation ... ok +test test_cli_java_generation ... ok +test test_cli_shared_modules_deduplication ... ok + Determining projects to restore... + Restored /tmp/.tmpdctDVd/cli_csharp_app/CrmCliApp.csproj (in 207 ms). +test test_cli_typescript_generation ... ok + CrmCliApp -> /tmp/.tmpdctDVd/cli_csharp_app/bin/Debug/net8.0/CrmCliApp.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:01.44 +E2E C# CLI test passed successfully! +test test_cli_csharp_generation ... ok +test test_cli_rust_split_units_and_chunking ... ok + +test result: ok. 47 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 9.47s + + Running unittests src/lib.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/polyxml_js-878a75d7b7901cc9) + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running unittests src/lib.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/_polyxml-a668b0910babaf29) + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running unittests src/lib.rs (/home/bailey/github/PolyXML/target/followup-namespace-verification/debug/deps/polyxml_wasm-d510c7f48918b595) + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Doc-tests polyxml + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Doc-tests polyxml_cli + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Doc-tests polyxml_wasm + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + +==> [4/6] Compiling Python PyO3 extension (maturin develop)... +🍹 Building a mixed python/rust project +🐍 Found CPython 3.14 at /home/bailey/github/polyxml-namespace-entities/.venv/bin/python +🔗 Found pyo3 bindings with abi3-py3.12 support +📡 Using build options features from pyproject.toml +Using Python 3.14.4 environment at: /home/bailey/github/polyxml-namespace-entities/.venv +Checked 6 packages in 32ms + Compiling syn v3.0.5 + Compiling serde_core v1.0.229 + Compiling serde_derive v1.0.229 + Compiling serde v1.0.229 + Compiling pyo3-ffi v0.29.2 + Compiling syn v2.0.119 + Compiling fastrand v2.5.0 + Compiling phf_generator v0.14.0 + Compiling pyo3-macros-backend v0.29.2 + Compiling thiserror-impl v2.0.21 + Compiling serde_json v1.0.151 + Compiling minijinja v2.24.0 + Compiling thiserror v2.0.21 + Compiling pyo3 v0.29.2 + Compiling pyo3-macros v0.29.2 + Compiling phf_codegen v0.14.0 + Compiling quick-xml v0.42.0 + Compiling polyxml v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-core) + Compiling polyxml-python v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-python) + Finished `dev` profile [unoptimized + debuginfo] target(s) in 24.10s +📦 Built wheel for abi3 Python ≥ 3.12 to /tmp/.tmpYx8hAm/polyxml-0.34.6-cp312-abi3-linux_x86_64.whl +✏️ Setting installed package as editable +🛠 Installed polyxml-0.34.6 +==> [5/6] Running Python Ruff checks... +All checks passed! +10 files already formatted +==> [6/6] Running Python tests with 100% statement & branch coverage... +........................................................................ [ 64%] +........................................ [100%] +================================ tests coverage ================================ +_______________ coverage: platform linux, python 3.14.4-final-0 ________________ + +Name Stmts Miss Branch BrPart Cover Missing +--------------------------------------------------- +TOTAL 181 0 58 0 100% + +3 files skipped due to complete coverage. +Required test coverage of 100% reached. Total coverage: 100.00% +112 passed in 0.63s +✨ All PolyXML dual-language quality gates passed! diff --git a/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-tests.log b/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-tests.log new file mode 100644 index 0000000..46fb676 --- /dev/null +++ b/research/data/runtime-followups-2026-10-03/namespace-entities/namespace-entities-tests.log @@ -0,0 +1,57 @@ +memcap: <=7778 MiB (60% of 12963 MiB available) [systemd MemoryMax, swap off] + Compiling polyxml v0.34.6 (/home/bailey/github/polyxml-namespace-entities/crates/polyxml-core) + Finished `test` profile [unoptimized + debuginfo] target(s) in 4.35s + Running tests/test_any_attribute.rs (/home/bailey/github/PolyXML/target/followup-borrow-verification/debug/deps/test_any_attribute-f8564805a9b9d00f) + +running 1 test +test test_any_attribute_schema_parser_and_runtime_roundtrip ... ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_any_element.rs (/home/bailey/github/PolyXML/target/followup-borrow-verification/debug/deps/test_any_element-48a6e5ab2c28f2fe) + +running 2 tests +test test_any_element_go_codegen ... ok +test test_any_element_schema_parser_and_runtime_roundtrip ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_namespace_entities.rs (/home/bailey/github/PolyXML/target/followup-borrow-verification/debug/deps/test_namespace_entities-4bd83b729ca4f37e) + +running 4 tests +test namespace_entity_values_are_decoded_once ... ok +test undefined_entities_cannot_form_namespace_bindings ... ok +test entity_decoding_applies_to_inherited_and_local_xsi_type_bindings ... ok +test escaped_namespace_bindings_match_strict_root_and_round_trip ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_security.rs (/home/bailey/github/PolyXML/target/followup-borrow-verification/debug/deps/test_security-e324fcc17a7a8524) + +running 6 tests +test test_malformed_unclosed_cdata_rejection ... ok +test test_cdata_section_handling ... ok +test test_numeric_character_references ... ok +test test_max_depth_recursion_limit ... ok +test test_xml_entity_roundtrip_escaping ... ok +test unsupported_general_entities_are_rejected ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Running tests/test_xsi_type.rs (/home/bailey/github/PolyXML/target/followup-borrow-verification/debug/deps/test_xsi_type-c45053350e445953) + +running 11 tests +test abstract_type_without_derivations_errors ... ok +test plain_type_attribute_is_not_mistaken_for_dispatch ... ok +test from_ir_flattens_base_fields_and_registers_variants ... ok +test abstract_type_requires_concrete_selector ... ok +test iterparse_dispatches_each_streamed_item ... ok +test root_xsi_type_dispatch_including_empty_element ... ok +test nil_abstract_complex_type_skips_concrete_dispatch ... ok +test xsi_type_resolves_namespace_inherited_from_parent ... ok +test unknown_xsi_type_on_abstract_type_errors ... ok +test variant_serialization_requires_namespaces ... ok +test nested_xsi_type_dispatch_and_round_trip ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + diff --git a/research/runtime-namespace-entities-2026-10-03.md b/research/runtime-namespace-entities-2026-10-03.md new file mode 100644 index 0000000..ac6c35e --- /dev/null +++ b/research/runtime-namespace-entities-2026-10-03.md @@ -0,0 +1,22 @@ +# Namespace URI decoding — October 3, 2026 + +Source: `ad9282e`, compared with runtime investigation baseline `1819c91`. + +Namespace declarations previously retained escaped XML source text. The URI +`urn:A&B` therefore failed to match the schema URI `urn:A&B`, affecting +strict root matching and xsi:type dispatch. Decode declaration values once, +propagate errors, and preserve inherited bindings that are already decoded. + +Four regressions cover default and prefixed roots, full round trips, local and +inherited xsi:type bindings, streamed Start/Empty records, double decoding and +undefined entities. The original three positive regressions fail on the baseline. +This is a namespace URI decoding fix, not a claim of full namespace conformance. + +Builds and tests use a dedicated workspace target with one Cargo worker and the +repository systemd memory cap. See the retained evidence for exact commands and +results. No compiler or generated-model behavior changes are included. + +The complete quality gate passes: 325 Rust tests, strict workspace formatting +and Clippy, Ruff, and 112 Python tests with 100% statement and branch coverage. +Raw baseline failures, focused checks and the full gate are retained in +[the evidence directory](data/runtime-followups-2026-10-03/namespace-entities/).