fix(pascal): parse anonymous variable records #473
Workflow file for this run
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
| name: rust | |
| # Builds + tests the single-binary Rust engine. | |
| # | |
| # Cost split: PRs verify on **Linux only** (the cheapest runner, and the parity | |
| # gate — the golden/parity suites under crates/argot-core/tests/ compare Rust | |
| # output to fixtures captured from the Python engine, so a green Linux run proves | |
| # Rust == Python). Push to main and manual runs fan out to **all three** | |
| # (Linux · macOS · Windows), so any macOS/Windows-specific regression is caught | |
| # on main before a release is cut from it — without paying macOS (10x) and | |
| # Windows (2x) Actions minutes on every PR. | |
| # | |
| # Branch protection: require the single `verify result` gate job below, NOT the | |
| # per-OS `verify (…)` legs — those don't exist on PRs (Linux-only matrix), so | |
| # requiring them would block every merge. The gate reports one stable status | |
| # that is green iff every leg that actually ran passed. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'crates/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'rust-toolchain.toml' | |
| - '.github/workflows/rust.yml' | |
| # No paths filter: the verify jobs are required status checks on main, and a | |
| # PR that doesn't trigger the workflow reports no status at all — blocking | |
| # the merge forever. (Skip-via-`if` doesn't work either: skipped matrix jobs | |
| # report under the unexpanded job name.) Warm-cache runs are ~2.5 min. | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: rust-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Supply-chain gate: RustSec advisories, license policy, dependency bans, and | |
| # source restrictions (config in deny.toml). Cheap + Linux-only, so it runs on | |
| # every PR alongside the verify matrix. See deny.toml for the pinned-dep | |
| # advisory ignores. | |
| deny: | |
| name: cargo-deny (advisories · licenses · bans · sources) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1 | |
| with: | |
| command: check | |
| arguments: --all-features | |
| verify: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # PR → Linux only; push to main / manual → all three. (Expression form | |
| # because a matrix list can't be conditioned with `if:` directly.) | |
| os: ${{ fromJSON(github.event_name == 'pull_request' && '["ubuntu-latest"]' || '["ubuntu-latest", "macos-latest", "windows-latest"]') }} | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| # bash is available on all three runners (Git Bash on Windows); pin it | |
| # so the smoke step's heredoc + `test -s` behave identically. | |
| shell: bash | |
| env: | |
| # No debugger runs in CI; skipping debuginfo cuts compile + link time | |
| # (test failures still report file:line from source, not debuginfo). | |
| CARGO_PROFILE_DEV_DEBUG: 0 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 # extract walks git history; the smoke step needs it | |
| - name: Install Rust toolchain (pinned by rust-toolchain.toml) | |
| run: rustup show && rustup component add rustfmt clippy | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| with: | |
| # A red run should still warm the cache for the fix-up run. | |
| cache-on-failure: true | |
| - name: Format check | |
| run: cargo fmt --check | |
| - name: Clippy (deny warnings) | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| # The self-update feature only ships in release builds; lint it here so | |
| # it can't rot unchecked until a release. Linux-only + check-mode keeps | |
| # the axoupdater dependency tree off the hot path (cached after run one). | |
| - name: Clippy self-update feature (release-only code) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo clippy -p argot --all-targets --features self-update -- -D warnings | |
| # The architecture-graph layer (`arch`) is feature-gated + off by default, | |
| # but pure Rust, so it is cheap enough to lint + unit-test on | |
| # the PR path — keeps the resolver/classify logic and its 24 tests from | |
| # rotting unchecked. Corpus-backed recall lives in `just bench-arch`. | |
| - name: Clippy + test arch feature (pure-Rust, feature-gated) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| cargo clippy -p argot-core -p argot-bench --all-targets --features arch -- -D warnings | |
| cargo test -p argot-core --features arch arch_graph:: | |
| # The test-integrity layer (`integrity`) has the same shape as `arch`: | |
| # feature-gated, off by default, pure-Rust — cheap enough to lint + | |
| # unit-test on the PR path. Corpus-backed recall/FP live in | |
| # `just integrity-verify` / `just bench-integrity-fp`. | |
| - name: Clippy + test integrity feature (pure-Rust, feature-gated) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| cargo clippy -p argot-core -p argot-bench --all-targets --features integrity -- -D warnings | |
| cargo test -p argot-core --features integrity | |
| cargo check -p argot-core --features arch,integrity | |
| # The scripted-rules layer (`script`) is pure-Rust (rhai) — same cheap | |
| # PR-path shape as arch/integrity. Runs the slice's unit tests plus the | |
| # end-to-end pipeline suite (discovery → findings → suppression). | |
| - name: Clippy + test script feature (pure-Rust, feature-gated) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| cargo clippy -p argot-core -p argot --all-targets --features script -- -D warnings | |
| cargo test -p argot-rules-script | |
| cargo test -p argot-core --features script --test script_rules | |
| # `semantic` used to stay off the PR path because it compiled a native | |
| # runtime from source. It is pure Rust now — its weights ship in-tree, so there is | |
| # nothing to fetch and no C++ toolchain to install — and it runs on every | |
| # PR like the other slices. That exclusion is exactly what let a | |
| # release-only build break sit green (see the release-combo step below). | |
| - name: Clippy semantic feature | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo clippy -p argot-core --all-targets --features semantic -- -D warnings | |
| - name: Test semantic feature | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo test -p argot-core --features semantic | |
| # The release builds every feature together — compile that exact combo | |
| # here so a cross-feature gap can't first surface on the release runners | |
| # (v0.2.62 broke that way; so did a `self-update`+`semantic` symbol gap | |
| # that every single-feature build reported green). | |
| - name: Check the release feature combo | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo check -p argot --features self-update,semantic,arch,integrity,script | |
| # `self-update` alone is in no other build: the base loop omits it and the | |
| # combo above hides a break inside it behind the other four. | |
| - name: Check self-update on its own | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo check -p argot --features self-update | |
| - name: Test (incl. Python-parity golden suites) | |
| env: | |
| # On Windows `bash` resolves to the WSL stub (System32, no distro | |
| # installed) before Git Bash. Point the fixture-building tests at | |
| # Git's real bash explicitly; empty/unset elsewhere → plain `bash`. | |
| ARGOT_TEST_BASH: ${{ runner.os == 'Windows' && 'C:\Program Files\Git\usr\bin\bash.exe' || '' }} | |
| run: cargo test --workspace | |
| # Dev profile: reuses the build from the test step (a release build here | |
| # costs ~3 min of pure recompilation; extract itself takes seconds). | |
| - name: Smoke (extract runs end-to-end) | |
| run: | | |
| cargo run -p argot -- extract --repo . | |
| test -s .argot/dataset.jsonl && echo "OK — dataset.jsonl non-empty" | |
| # Single required status check for branch protection, independent of how the | |
| # matrix expanded (Linux-only on PRs, all three on main). Green iff every leg | |
| # that ran succeeded — so require THIS job on main, not the per-OS `verify (…)` | |
| # legs (which are absent on PRs and would otherwise block every merge). | |
| verify-result: | |
| name: verify result | |
| if: always() | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Gate on the matrix result | |
| run: | | |
| echo "verify matrix result: ${{ needs.verify.result }}" | |
| test "${{ needs.verify.result }}" = "success" |