Skip to content

fix: small code defects from the full example review + documentation sweep - #25

Merged
karlkauc merged 2 commits into
mainfrom
fix/small-bugs-doc-sweep
Aug 29, 2026
Merged

fix: small code defects from the full example review + documentation sweep#25
karlkauc merged 2 commits into
mainfrom
fix/small-bugs-doc-sweep

Conversation

@karlkauc

Copy link
Copy Markdown
Contributor

Summary

Third PR from the full verification pass over every example (after #23 Schematron, #24 CSV/TPT). Small code defects plus every stale documentation reference the review turned up.

Code

  • XML_Signature/java/VerifyFundsXml — KeyInfo without X509Data/KeyValue (the committed skeleton) crashed with Didn't get a key + stack trace; now INVALID, exit 1 as documented.
  • Database_Integration/java/ExportFundsXml — document lookup concatenated the CLI id into SQL (only unbound query in the repo) → PreparedStatement.
  • Custom_Internal_Checks/custom_internal_checks.xsltconcentrationLimitPct typed xs:decimal broke the README's concentrationLimitPct=5 example (runners pass strings); untyped + cast. R3 now fails with the tighter limit.
  • Data_Binding_JSON/python/fundsxml_json.py — usage printed None; explicit usage line.
  • Data_Binding_JSON/java/NativeBinding — consistently Fund[1] and documented as single-fund binding.
  • pyproject.toml — optional extra signature (signxml).

Docs

  • All five .csproj comments: no more broken dotnet run project … commands (XML comments can't contain --); XSD one also dropped the deleted SchemaResolver.cs / version arg.
  • Schematron Basic_Checks README: ./mvnw runner first, dead ../README.md links fixed, positions/ in sample paths, invocation pom.xml uses repo-root path, .NET row states the NuGet packages are dotnet tools (NU1212).
  • XSLT_DataQuality_Checks README: Custom_Internal_Checks listed, ./mvnw/saxonche runners; "6 main validation areas".
  • XML_Signature: .NET marked verified (cross-verifies with Java both ways); xmlsec1/skeleton profile difference documented; Python header + .gitignore comment fixed.
  • FundsXML_Files: 12 asset types, Multi-Fund fixture listed, "Phase 3" placeholders → links, Saxon XSD validation marked EE-only, EFT = European Feedback Template (per XSD annotation), ID_001 8.33 %.
  • Data_Binding_JSON README: real JSON shape. Database_Integration: package.json scripts, export header, Verified column, venv note. Large_File README: measured memory figures. top-holdings.xq comment.

Deliberately not in this PR (to avoid conflicts with #23): the Schematron README rule tables that still describe 7 patterns — follow-up after #23 merges.

Verification (local)

./mvnw -q -B compile green · skeleton verify → INVALID exit 1, signed → VALID exit 0 · Java DB import/export EQUIVALENT + XSD-valid, injection-shaped id rejected · custom DQ default 4× PASS, limit=5 → 1 FAIL · fundsxml_json.py usage exit 2, Multi-Fund roundtrip EQUIVALENT · NativeBinding 21 (Mixed) / 4 (Multi first fund) · pip install -e ".[signature]" OK · all edited XML well-formed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YXZWhwE5EbHSybt55K6oUZ

karlkauc and others added 2 commits August 29, 2026 19:26
…ion sweep

Code
- XML_Signature/java/VerifyFundsXml: a KeyInfo without X509Data/KeyValue
  (e.g. the committed skeleton with only ds:KeyName) crashed Santuario with
  "Didn't get a key" and a stack trace; now reports INVALID and exits 1 as
  documented.
- Database_Integration/java/ExportFundsXml: the document lookup concatenated
  the CLI id into SQL - the only unbound query in the repo; use a
  PreparedStatement like every other query.
- XSLT_DataQuality_Checks/Custom_Internal_Checks: concentrationLimitPct was
  declared as xs:decimal, so the README's "concentrationLimitPct=5" example
  failed with a type error (runners pass strings); param is untyped now and
  cast where used. R3 fails as intended with the tighter limit.
- Data_Binding_JSON/python/fundsxml_json.py printed "None" as usage (header
  is a comment block, not a docstring); print an explicit usage line.
- Data_Binding_JSON/java/NativeBinding: bind consistently to Fund[1] and say
  it is a single-fund binding (previously fund-1 metadata was mixed with
  all-fund positions on multi-fund input).
- pyproject.toml: optional extra "signature" (signxml) for the Python
  signature example.

Documentation (all stale references found by the review)
- .csproj comments no longer show broken "dotnet run project ..." commands
  (XML comments cannot contain a double dash); they point at the .cs headers.
  XSD_Validation csproj also dropped the deleted SchemaResolver.cs / version
  argument.
- Schematron Basic_Checks README: Quick Start now leads with the ./mvnw
  runner, dead ../README.md links point at invocation/README.md, sample
  paths include positions/; invocation pom.xml example uses a repo-root path;
  .NET row states that the Saxon .NET NuGet packages are dotnet tools
  (NU1212) so the reference variant does not restore as-is.
- XSLT_DataQuality_Checks README lists Custom_Internal_Checks and the
  ./mvnw / saxonche runners; Basic README "6 main validation areas".
- XML_Signature: .NET marked verified (sign/verify/tamper, cross-verifies
  with Java both ways); xmlsec1/skeleton profile difference (inclusive C14N,
  KeyName only) documented; Python header no longer refers to a future
  build-system migration; .gitignore names GenerateTestKey.java.
- FundsXML_Files: 12 asset types (not 13), Multi-Fund fixture listed,
  "Phase 3" placeholders replaced by links to XML_Signature/, Saxon XSD
  validation marked EE-only, EFT expanded as European Feedback Template
  (per the XSD annotation), README snippet/table for ID_001 uses the
  file's 8.33 %.
- Data_Binding_JSON README documents the real JSON shape (funds[] /
  portfolios[] / positions[]).
- Database_Integration: package.json scripts point at the split
  import/export programs (fundsxml_db.mjs no longer exists), export
  header uses python for xml_equiv.py, README Verified column consistent
  with CI, venv note for the python3 commands.
- Large_File_Processing README states the measured constant-memory
  figures (16 MiB RSS at 30k and 200k positions, Java under -Xmx16m).
- XQuery top-holdings.xq comment uses the bare n=5 form.

Verified: ./mvnw -q -B compile green; skeleton verify -> INVALID exit 1,
signed file -> VALID exit 0; Java DB import/export still EQUIVALENT and
XSD-valid, injection-shaped id rejected; custom DQ default 4x PASS,
limit 5 -> 1 FAIL; fundsxml_json usage exit 2, Multi-Fund roundtrip
EQUIVALENT; NativeBinding 21 positions (Mixed), 4 (first fund of
Multi-Fund); pip install -e ".[signature]" installs signxml; all edited
XML files well-formed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXZWhwE5EbHSybt55K6oUZ
@karlkauc
karlkauc merged commit 79c17c4 into main Aug 29, 2026
4 checks passed
@karlkauc
karlkauc deleted the fix/small-bugs-doc-sweep branch August 29, 2026 19:43
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