Skip to content

ci: one Rust-first workflow, and fix the long-broken Python job - #68

Merged
KhazP merged 3 commits into
mainfrom
ci-consolidate-workflows
Aug 14, 2026
Merged

KhazP merged 3 commits into
mainfrom
ci-consolidate-workflows

Conversation

@KhazP

@KhazP KhazP commented Aug 14, 2026

Copy link
Copy Markdown
Owner

The problem

Reference engine (Python 1.5.0) has been failing on every push since April, for a self-inflicted reason:

pytest: error: unrecognized arguments: --cov=. --cov-report=term-missing
env: PYTEST_DISABLE_PLUGIN_AUTOLOAD: 1

The workflow disables plugin autoload — which unloads pytest-cov — and then passes --cov to pytest. That env var is a workaround for stray plugins in a local dev environment; a clean runner has no such problem.

What changed

  • rust.yml + tests.yml → ci.yml. One workflow, so the Actions tab reflects that this is a Rust project rather than showing a permanently-red Python entry beside it.
  • The reference engine's 76 tests now run inside the parity job. That's where they belong: they guard the implementation the parity harnesses measure the rewrite against, so if they break, every parity result below them is meaningless.
  • Dropped --cov. Coverage of retired code that will never ship again is noise.

Verified, not assumed

The whole legacy suite runs headless with no PyQt6 installed — the four tests that touch Qt inject stubs into sys.modules rather than importing it. I confirmed this by blocking the real PyQt6 with a meta_path finder:

76 passed in 0.76s

So no --ignore flags and no PyQt6 install are needed in CI.

Also

  • README test count 246 → 251, plus how to run the reference suite
  • docs/CODE_CHECKLIST_AUDIT.md pointed at files that exist now, rather than tests.yml, pyinstaller.yml and AutoTidy.spec — all removed in the rewrite

Jobs

Job Runs
Engine (windows + ubuntu) fmt, clippy, 251 tests — both platforms, since glob case-sensitivity intentionally differs
Frontend typecheck, build
Parity vs the 1.5.0 engine 76 reference tests, then dry parity (12 variants) and wet parity (11)
Tauri app shell tests, release build, artifact

🤖 Generated with Claude Code

The "Reference engine (Python 1.5.0)" workflow had been failing on every
push since April, for a self-inflicted reason: it set
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1, which unloads pytest-cov, and then
passed --cov to pytest.

    pytest: error: unrecognized arguments: --cov=. --cov-report=term-missing

That env var is a workaround for stray plugins in a local developer
environment and has no business on a clean runner. Dropped, along with
coverage: measuring coverage of retired code that will never ship again
is noise.

rust.yml and tests.yml are consolidated into ci.yml, so the Actions tab
reflects what this project is. The reference engine's own 76 tests now
run as a step inside the parity job, where they belong — they exist to
guard the implementation the parity harnesses measure against, so if they
break, every parity result below them is meaningless.

Verified the whole legacy suite runs headless with no PyQt6 installed:
the four tests that touch Qt inject stubs into sys.modules rather than
importing it. Blocked the real PyQt6 with a meta_path finder and got
76/76, so no --ignore flags and no PyQt6 install are needed.

Also refreshed the test counts in README (246 -> 251) and pointed the
code checklist audit at the files that exist now rather than at
tests.yml, pyinstaller.yml and AutoTidy.spec, all removed in the rewrite.
Copilot AI lite review requested due to automatic review settings August 14, 2026 10:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

KhazP added 2 commits August 14, 2026 13:46
Three fixes from the first CI run of the consolidated workflow.

Clippy failed on both platforms. My local toolchain was 1.93 and the
runner is 1.97, which added `manual_sort_by`:

    error: consider using `sort_by_key`
      --> crates/autotidy-core/src/undo.rs:93

Updated the local toolchain to reproduce it rather than patching blind,
which surfaced a third lint the run had not reached: `byte_char_slices`
in src-tauri. That one was never going to be caught, because the Engine
job lints only the two engine crates and clippy lints are not emitted by
rustc — so `-D warnings` on the app's build step does not cover them. The
app job now runs clippy too. It stays out of the Linux Engine job because
the Tauri crate needs GTK/WebKit libraries that runner does not have.

The legacy suite no longer runs in CI. It covers retired 1.5.0 modules —
the PyQt dialogs, config_manager, startup_manager — that nothing imports
and that will never ship, and one of its tests asserts on a path shape
that breaks wherever the username exceeds eight characters:

    'C:\Users\RUNNER~1\...\monitor_me' not found in
    ['C:\Users\runneradmin\...\monitor_me']

A red X for an 8.3 filename quirk in a test for a dead dialog is noise.
The part of the reference engine that matters is utils.py and
constants.py, which both parity harnesses import directly and exercise
across 23 rule variants — if those break, parity breaks. The suite stays
runnable locally and is documented in legacy/README.md.
`Engine (ubuntu-latest)` failed on one test while Windows passed:

    scan::tests::destination_outside_the_tree_needs_no_guard

The fixture asked whether `D:/elsewhere/{YYYY}` needs a guard. On Windows
that is an absolute path outside the monitored tree, so the answer is no.
On Unix there are no drive letters: `D:/elsewhere` is a *relative* path
naming a directory called `D:`, so `guard_paths` correctly resolved it
inside the monitored folder and produced a guard.

The engine was right both times; the test was Windows-only in disguise
and silently asserted the opposite of its name on Linux. Fixtures now go
through `monitored()` and `elsewhere()` helpers that spell an absolute
path for the host platform.

This is what the ubuntu leg of the matrix is for. Swept the engine crates
for other hardcoded drive letters and found none; the remaining ones are
in src-tauri, which is Windows-only by nature and only ever built there.
@KhazP
KhazP merged commit 7872e9d into main Aug 14, 2026
5 checks passed
@KhazP
KhazP deleted the ci-consolidate-workflows branch August 14, 2026 11:16
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.

2 participants