Repository navigation
build: move repository tooling to one Rust crate - #335
Conversation
|
Important Review skippedToo many files! This PR contains 162 files, which is 62 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Repository tooling uses Bash to sequence commands and one Rust crate, xml-sec-tools, for every piece of logic. Node, Python and Perl are gone from repository tooling; the only JavaScript left is what the platform needs (the clean-build-output action's post step and the dashboard's browser code). - CI planning and gates: ci-blocks, check-features, hardening, pkcs11-tests, pedantic-lints, documentation, shared-pkix and wasm-smoke (the WebAssembly module's C14N and signature verification exports run in the wasmi interpreter). - Security corpus and fuzzing: security-corpus (its disposition table is data in tests/fixtures/security/dispositions.json) and fuzz-security. - Benchmarks: bench-latency, bench-compare, bench-cli, bench-library, bench-regression, bench-identity, bench-dashboard, bench-xslt and competitor-lock. Child waits block until exit with a deadline, so latency observations carry no polling delay. - XSLT: libxslt-fixtures and xslt-conformance. - XAdES corpus: xades check, corpus, dss, binding, fixtures and package. Every command runs in its own process group with a deadline. The archive carries the whole runner crate and a root manifest derived from the baseline one, so the overlay builds over the recorded commit. - Donors and oracles: donor-fixtures, install-xmlsec1 (which restores the previous installation on any failure before commit), kernel-examples and fetch-standards. - Release: publish-crate. A step that runs another subcommand goes through cargo run, since an earlier step may rebuild the tool with other workspace features. Script tests and the Rust tests that drove Bash scripts become tests of the tool, using a recorded process runner. Closes #333
2a3201d to
fe0288d
Compare
Summary
Repository tooling now uses two things: Bash to sequence commands and one Rust
crate,
xml-sec-tools, for every piece of logic. Node, Python and Perl are gonefrom repository tooling; the only JavaScript left is what the platform needs
(the
clean-build-outputaction'spost:step and the dashboard's browsercode).
ci-blocks,check-features,hardening,pkcs11-tests,pedantic-lints,documentation,shared-pkixandwasm-smoke(the WebAssembly module's C14N and XMLDSig verification exportsrun in the
wasmiinterpreter instead of a Node host).security-corpus(its disposition table is nowdata in
tests/fixtures/security/dispositions.json) andfuzz-security.bench-latency,bench-compare,bench-cli,bench-library,bench-regression,bench-identity,bench-dashboard,bench-xsltandcompetitor-lock. Reports are read withfloat_roundtrip, so measurementscopied from earlier runs keep their exact digits. Child processes are awaited
with a blocking wait and a deadline, so latency observations include no
polling delay after the child exits.
libxslt-fixtures(XSLTMark databases from a port of upstreamdbgen.pl) andxslt-conformance.xades check | corpus | dss | binding | fixtures | package.DSS reports and fixtures are read with xml-sec's own DOM; every command runs
in its own process group with a deadline that stops the group. The archive
carries the whole runner crate and a root
Cargo.tomlbuilt from thebaseline manifest with the runner added to the workspace, so the overlay
builds over the recorded commit without changing the frozen
xml-secpackage.
donor-fixtures(including the CLI runner snapshot),install-xmlsec1(any failure between promotion and commit restores theprevious installation),
kernel-examplesandfetch-standards.publish-crate.A step that runs another subcommand goes through
cargo run, because anearlier step may rebuild the tool with other workspace features and replace the
running binary. Script tests and the Rust integration tests that drove Bash
scripts (
tests/import_donor_fixtures.rs,tests/install_xmlsec1.rs,tools/xmlsec1/tests/import_snapshot.rs) become tests of the tool, using arecorded process runner instead of fake commands on
PATH. No CI job sets upNode anymore.
Replaces #334, closed after its history was squashed into one commit.
Testing
Each replaced script was checked against the original on the same inputs
before removal:
ci-blocks,check-features,hardening,pedantic-lints,shared-pkix,fuzz-security: identical command plans and outputs withrecorded tools;
security-corpus checkreproducesaudit.jsonbyte for byte.bench-dashboardoutput is byteidentical and
bench-regressiondiffers only in itsgeneratedtime. A fulllocal
bench-comparevalidated 336 command-line and 144 library cases, and abench-latencysmoke run completed.xades checkpassed live: 100 independent octet vectors, DSS default andstrict-policy expectations.
xades corpusreports no unexpected outcome.builds the runner;
cargo nextest run -p xml-sec-tools xadespasses thereand
xades corpusruns to completion.libxslt-fixtures --check,donor-fixtures(default,--xmlenc-corporaand
--cli --check) reproduce the committed fixtures exactly.xades fixtureswrites templates identical to the original generator'sapart from the certificate digests of new random keys.
install-xmlsec1built the oracle from the pinned donor and reuses a validcache;
xslt-conformance --cache-managedpassed against it.cargo nextest run -p xml-sec-tools(210 tests),cargo clippy -p xml-sec-tools --all-targets -D warningsandcargo fmt --checkpasslocally on macOS;
wasm-smokepasses both exports from an unoptimizedbuild of the tool. Linux and Windows run in CI.
Not run live:
publish-crate(it would publish) andfetch-standards(itwould overwrite the local reference corpus); both are covered by tests with
recorded processes.
Closes #333