Skip to content

Match complete CI paths, including newline filenames - #3628

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
roger-sato:fix/selected-ci-newline-paths
Oct 20, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
roger-sato:fix/selected-ci-newline-paths

Conversation

@roger-sato

Copy link
Copy Markdown
Contributor

Summary

check_selected_ci_inputs.py --require-triggers could report PASS_SELECTED_CI_INPUTS for a required file named supplier/proof.md\n when the workflow only includes the literal path supplier/proof.md. Python's $ accepts a position before the final newline. Conversely, the regex . excluded LF inside ** and **/, rejecting valid coverage. GitHub's workflow syntax requires the entire path to match and defines ** to include any character.

Use strict \A / \Z anchors and re.DOTALL, preserving the supported glob grammar, slash restriction for *, ordered negations, and advisory default. Add ten matcher controls and twelve real CLI invocations with complete temporary source inventories and certificates, covering both event types and advisory/required modes. The LF filesystem cases are skipped on Windows, where these filenames are invalid; matcher tests run everywhere.

This is a narrow production correction based on canonical main 20ecf2891d80b5acf18d980b2164fb44ea7faa90. It changes neither the selected result nor frozen evidence. No missed hosted run or mathematical-construction failure is claimed.

Test plan

  • Negative control before the production change: the two new tests failed in 16 subtests, including exit 0 / PASS_SELECTED_CI_INPUTS for the uncovered trailing-LF file on both events, and false failures for both globstar forms.
  • python3.12 -W error -B -m unittest discover -s tests -p test_selected_ci_inputs.py -v — all 26 tests passed.
  • python3.12 -I -O -B -m unittest discover -s tests -p test_selected_ci_inputs.py -q — all 26 tests passed under optimized execution.
  • python3.12 -I -B scripts/check_selected_ci_inputs.py --require-triggers — all 35 live pins and 1,635 required paths passed.
  • python3.12 -I -B scripts/verify_selected_result.py — selected record, exact kappa, original source inventory, and proof supplements passed.
  • git diff --check.
  • Hosted GitHub Actions and the full selected cold replay were not run; this change only affects the static trigger-coverage matcher.

Tests ran on macOS arm64 using CPython 3.12.14. Initial full-module attempts identified missing files in the sparse checkout; after materializing the selected dependencies and proof supplements, the complete focused module passed in the isolated worktree.

Attribution and overlap

Credit Sagar Thakrar's original guard (#1361), Nick Petalas's ordered branch-filter repair (#2928), and the retained selected-record and supplier authors. This addresses the newline/full-path mismatch separately from branch ordering. The complete overlap snapshot refreshed on 2026-10-18 covered 340 open PRs and 2,453 Discussions; live all-state PR searches and local notes identified these predecessors and no equivalent newline repair. Search coverage is limited to those records.

Prepared by roger-sato with substantial OpenAI Codex assistance. Apache-2.0.

@roger-sato
roger-sato marked this pull request as ready for review October 18, 2026 11:26
Mister-Meeseeks added a commit that referenced this pull request Oct 19, 2026
…hing pinned inputs (#3725)

* research_baseline: name sparse-checkout omissions instead of failing opaquely

portable-replay (verifier-engineering). In a sparse checkout the card's
positive control died with "Invalid selected file: .../ASSEMBLY.json" and no
hint which of 27 directories to materialize; at least five sessions recorded
that failure and stopped (#1594, #2690, #2253, #1317, PR #3628).

Before the strict check, enumerate the selected record's inputs (reading the
source manifest from HEAD if it is itself omitted) and apply the chooser's
PR3102 contract: stage-zero regular skip-worktree entries matching HEAD are
reported as SPARSE_SELECTED_INPUTS_ABSENT with the exact
`git sparse-checkout add` directories (exit 2). Deletions and drift still
fail as before; full checkouts are unchanged. verify_selected_result.py is
not modified.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* research_baseline_sparse: name sparse-checkout omissions without touching pinned inputs

Move the sparse-checkout diagnosis out of scripts/research_baseline.py and
tests/test_research_onboarding.py, which research packages pin as live
inputs, into a new preflight script and test module. Both pinned files are
restored to main's bytes, so no package replay is selected by this change.

scripts/research_baseline_sparse.py lists every input the selected-record
check reads, applies the PR3102 skip-worktree/HEAD contract via
choose_research_task.check_catalog_files (imported, unchanged), and prints
SPARSE_SELECTED_INPUTS_ABSENT with the git sparse-checkout add command
(exit 2), or NO_SPARSE_SELECTED_OMISSIONS (exit 0). Ordinary deletions and
staged index drift still raise "Invalid selected file".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EfKX1CiD4571K7pdqM8re

---------

Co-authored-by: Mister-Meeseeks <doug@crocodilelabs.io>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Mister-Meeseeks
Mister-Meeseeks merged commit 65d9fb4 into CrocSwap:main Oct 20, 2026
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