Repository navigation
[CI] Compile generated UCI 2.5 output with bounded memory #1
Description
Current gap
The CI workflow builds only the PolyXML CLI, then runs python3 runner.py --bin "$POLYXML_BIN". The runner executes polyxml validate and polyxml build --dry-run. It neither emits generated source nor invokes any destination-language compiler. Its module-graph result can therefore pass while generated UCI 2.5 source fails to compile in all seven targets (observed 2026-09-28). The runner docstring's claim of codegen/compilation benchmarking is misleading for the current behavior.
Proposed bounded gate
Add an opt-in or separate CI job that builds the exact four-schema [modules.defense_uci] into a temporary output directory, then serially checks Python, Go, C++, Java, TypeScript, C#, and Rust. Keep the existing fast validation/dry-run job. Use per-language timeouts and a real memory limit (cgroup/systemd-run or repository scripts/memcap.sh where available); do not launch the language compilers in parallel. Log generated file counts/sizes, elapsed time, peak RSS, and first compiler errors. Treat missing toolchains explicitly in local runs, while CI installs the required versions.
Done when
- CI emits actual UCI 2.5 code and runs destination-language syntax/compile checks, serially and within a documented memory budget.
- The gate fails on any generated-code failure and retains concise actionable logs/artifacts.
- The runner description reflects what it actually checks.
- The new gate passes after the linked PolyXML compiler issues are fixed.
PolyXML compiler issues will be linked after creation.
Linked compiler work
- Multi-namespace UCI type ownership / missing types
- Multiline documentation syntax
- Rust raw identifier locals
- Oversized compilation units / memory
Local status (not merged)
After the PolyXML fixes in progress, five UCI targets pass bounded checks: Python syntax, Go, TypeScript, Java, and C#. Rust and C++ exceed practical memory budgets on the 8 GiB development host even after syntax/alias fixes; keep the gate staged until #92 provides a safe split strategy or a larger CI runner.
Reproducible check added locally (not merged)
polyxml-schema-corpus/scripts/check_uci_codegen.py now creates an isolated temporary UCI manifest, generates and compiles Python, Go, TypeScript, Java, and C# serially, using the PolyXML memory-cap wrapper at 35% of available RAM and a timeout per command. A complete local run passed all five. CI wiring remains pending until the PolyXML fixes are merged; Rust and C++ need the size work in #92 before joining a bounded compile gate. The existing runner.py validation/dry-run path remains separate.
Draft PRs
- Compiler fixes
- Five-target bounded check; CI wiring and Rust/C++ remain open.
Activity
nth-bailey commentedon Oct 3, 2026
The bounded seven-target harness is now on main via #4. A complete local UCI run passes Python, Go, C++, Java, TypeScript, C#, and Rust under a documented 12000 MiB hard cgroup cap with swap disabled and serial compilers. Rust retains codecs/Serde, uses 250-type topological chunks, and disables debug info/incremental compilation; peak process RSS was 11729812 KiB. Compiler fixes are published on PolyXML main (031ab53).
Raw results: https://github.com/polyxml/polyxml-schema-corpus/tree/main/results/2026-10-03/corpus-uci-all-12000-final
The final manual CI verification is running: https://github.com/polyxml/polyxml-schema-corpus/actions/runs/37109687233 . Keeping this issue open until its UCI job passes. Other heavy-module failures remain visible independently.
nth-bailey commentedon Oct 3, 2026
All seven UCI targets passed the bounded GitHub CI gate: https://github.com/polyxml/polyxml-schema-corpus/actions/runs/37109687233 . The
Compile defense_uci / all seven targetsjob generates the exact four-schema module and compiles Python, Go, C++, Java, TypeScript, C#, and Rust serially at 12000 MiB, swap disabled, with ten-minute command timeouts. Real kernel-limit and timeout-cleanup regression tests also pass in CI. Command logs, source manifests, generated file counts, compiler hash, resource measurements, and results are retained in thecompile-defense_uci-allartifact.Merged harness/CI: #4. Compiler fixes are on PolyXML main and released in v0.34.2. The local seven-target run also passes with complete codecs/Serde and split Rust units.
The other heavy-module compiler failures remain tracked separately in polyxml/PolyXML#135 ; full-corpus validation failures are tracked in polyxml/PolyXML#134 and polyxml/PolyXML#136 . They do not negate this completed UCI gate.