Skip to content

Fix missing Path import lost during merge of #89#100

Merged
dduugg merged 5 commits intomainfrom
cleanup/validate-owned-globs-test-comments
Mar 6, 2026
Merged

Fix missing Path import lost during merge of #89#100
dduugg merged 5 commits intomainfrom
cleanup/validate-owned-globs-test-comments

Conversation

@dduugg
Copy link
Contributor

@dduugg dduugg commented Mar 6, 2026

Summary

Fixes a missing use std::path::Path import in src/runner.rs that was
introduced during the merge of #89, and cleans up stale comments left in
the tests from that PR.

Root cause of the missing import

The PR branch had use std::{path::Path, process::Command};. The base
branch (main) had the imports on separate lines:
use std::path::PathBuf; / use std::process::Command;. When GitHub
merged the PR, it split the grouped import but silently dropped Path,
keeping only PathBuf and process::Command.

Pre-merge CI passed (the PR branch was correct). The post-merge CI run
on main caught the failure, but by then the merge had already landed.
The right long-term fix is enabling "Require branches to be up to date
before merging"
in branch protection, which re-runs CI against the
post-merge state before the merge button becomes available.

Stale comments cleaned up in tests

  • Remove "THIS TEST CURRENTLY FAILS ON MAIN", "FIX NEEDED", and
    "THIS ASSERTION WILL FAIL ON MAIN" from
    test_validate_files_respects_owned_globs_with_excluded_extensions;
    replaced with a concise description of what the test verifies.
  • Fix inaccurate glob: "**/*.{rb,tsx,erb}"
    "{gems,config,javascript,ruby,components}/**/*.{rb,tsx,erb}".
  • Improve matches_globs doc comment to describe the function.
  • Replace // Apply the same filtering logic as project_builder.rs:172
    with a description of intent.

- Remove pre-fix bug description block from test_validate_files_respects_owned_globs_with_excluded_extensions; replace with a concise description of what the test verifies
- Correct the simplified owned_globs pattern in the comment to match the actual fixture config
- Replace "THIS ASSERTION WILL FAIL ON MAIN" prose with a one-line summary
- Update matches_globs doc comment to describe the function rather than its callsites
- Replace brittle project_builder.rs:172 line-number reference with a description of intent
- Add missing `use std::path::Path` import (compile error introduced in #89)
@dduugg dduugg requested a review from a team as a code owner March 6, 2026 21:08
@github-project-automation github-project-automation bot moved this to Triage in Modularity Mar 6, 2026
@dduugg dduugg requested a review from martinemde March 6, 2026 21:08
The bare `cargo check` job only checked the lib/bin crates and was
strictly less thorough than the existing Test Suite and Lints jobs,
both of which compile all targets. The redundant job also introduced
a stale-cache risk: if its artifacts were reused from a prior run,
compile errors in source files could go undetected.

Removing it so that Test Suite (cargo test) and Lints
(cargo clippy --all-targets) are the authoritative compile checks.
@dduugg dduugg changed the title Clean up stale comments and fix missing Path import from #89 Fix CI gap, stale comments, and missing Path import from #89 Mar 6, 2026
Uses Swatinem/rust-cache@v2 in the Check, Test Suite, and Lints jobs.
Setting cache-on-failure: false (the default) ensures that a failed
build never writes a stale cache entry, which is how a missing import
in #89 was able to pass CI despite being a compile error.

Restores the cargo check job that was removed in the prior commit,
since it gives a clearer signal for compile errors than a mixed
test/lint failure.
@dduugg dduugg changed the title Fix CI gap, stale comments, and missing Path import from #89 Fix CI caching gap, stale comments, and missing Path import from #89 Mar 6, 2026
@dduugg dduugg changed the title Fix CI caching gap, stale comments, and missing Path import from #89 Fix missing Path import lost during merge of #89 Mar 6, 2026
@dduugg dduugg merged commit c86e800 into main Mar 6, 2026
8 checks passed
@dduugg dduugg deleted the cleanup/validate-owned-globs-test-comments branch March 6, 2026 23:00
@github-project-automation github-project-automation bot moved this from Triage to Done in Modularity Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants