Phase 4: CLI sh+ps1 pair, delete last bash, Windows CI, docs sweep#17
Merged
Conversation
Final phase of the standalone/cross-platform initiative. - tools/fetch-schema.sh DELETED (the last bash plumbing). CI now materialises the cache cross-platform via `python -m fundsxml_schema` (Phase-2 module); the Python venv install moved before it and the duplicate venv step removed. - XSD_Validation/cli/validate.sh rewritten as POSIX sh (no bash-isms): self-resolving 3-step schema (env -> .schema-cache -> curl -L 302 + xmldsig sibling) then xmllint. New validate.ps1 Windows counterpart (xmllint if present, else the built-in .NET System.Xml.Schema). - XML_Signature/cli/sign-verify-xmlsec1.sh -> POSIX sh; new sign-verify.ps1 (forwards to the .NET example on Windows). - XSD_Validation/powershell/Validate-FundsXml.ps1 now self-resolves too (was the last thing pinned to fetch-schema.sh). - GenerateTestKey.java also emits test-signing-key.pem (PKCS#8, pure JDK via the loaded PKCS#12) — closes the Phase-1-deferred openssl/PEM gap so the xmlsec1 / signxml reference examples have a cross-platform key source. Verified the PEM is a valid private key. - CI: new `windows-smoke` job (windows-latest, pwsh) proving Python, Java (mvnw.cmd), .NET, the PowerShell CLI and a DB round-trip all run standalone & self-resolving on Windows. New ubuntu CLI step exercises validate.sh (positive + negative). - Docs swept end-to-end: every FundsXML_Files README, Data_Binding_JSON, Database_Integration, XSD_Validation, CONTRIBUTING, root README, .github templates, CLAUDE.md — all off fetch-schema.sh onto the in-language resolvers / `python -m fundsxml_schema`. Only `.sh` remaining: the two didactic CLI examples, each paired with a `.ps1`. No bash prerequisite anywhere; every example is standalone and cross-platform. Verified locally: validate.sh under dash (cache/env/negative/cold), GenerateTestKey emits a valid PEM key, `python -m fundsxml_schema` caching, ci.yml is well-formed YAML (validate + windows-smoke jobs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitHub's pwsh wrapper exits each step with the last $LASTEXITCODE. The negative (must-fail) cases leave it at 1, so steps failed even though the logic succeeded (positive VALID + negative correctly INVALID, both shown in the log). End each windows-smoke step with an explicit 'exit 0'. The ubuntu 'validate' job was already green; only the new windows-smoke job was affected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Why
Phase 4 of 4 — completes the standalone & cross-platform initiative. Removes the last bash plumbing, gives the CLI examples a Windows counterpart, and adds a
windows-latestCI job that actually proves the whole point: every example runs on a clean Windows box with no bash and no prior tool step.What changed
tools/fetch-schema.shdeleted — the last bash plumbing script. CI materialises the cache cross-platform viapython -m fundsxml_schema(the Phase-2 module); the Python venv install moved ahead of it and the duplicate venv step removed.XSD_Validation/cli/validate.shrewritten as POSIX sh (no bash-isms) — resolves the schema itself ($FUNDSXML_SCHEMA_DIR→.schema-cache/→curl -L302 + xmldsig sibling) thenxmllint.XSD_Validation/cli/validate.ps1— Windows:xmllintif present, else the built-in .NETSystem.Xml.Schema.XML_Signature/cli/sign-verify-xmlsec1.sh→ POSIX sh; newsign-verify.ps1forwards to the .NET example on Windows.XSD_Validation/powershell/Validate-FundsXml.ps1now self-resolves too (was the last thing pinned tofetch-schema.sh).GenerateTestKey.javaalso emitstest-signing-key.pem(PKCS#8, pure JDK from the loaded PKCS#12) — closes the Phase-1-deferred openssl/PEM gap so thexmlsec1/signxmlreference examples have a cross-platform key source. Verified the PEM is a valid key.windows-smokejob (windows-latest, pwsh) — Python, Java (mvnw.cmd), .NET, the PowerShell CLI, and a DB round-trip, all standalone & self-resolving on Windows. New ubuntu CLI step exercisesvalidate.sh(positive + negative).FundsXML_Files/**README,Data_Binding_JSON,Database_Integration,XSD_Validation,CONTRIBUTING, rootREADME,.githubtemplates — all moved offfetch-schema.shonto the in-language resolvers /python -m fundsxml_schema.The only
.shfiles left are the two didactic CLI examples, each paired with a.ps1. No bash prerequisite anywhere.Verification
Locally:
validate.shunderdash(cache-hit /$FUNDSXML_SCHEMA_DIR/ negative exit 1 / cold download);GenerateTestKeyemits atest-signing-key.pemthatopenssl pkeyaccepts;python -m fundsxml_schemacaching;ci.ymlparses (jobsvalidate+windows-smoke). Thewindows-smokejob itself is exercised by CI on this PR (first real Windows run).With this merged, all 4 phases are done: every example is standalone and cross-platform (Windows + Linux/macOS), using each language's idiomatic build system.
🤖 Generated with Claude Code