Skip to content

fix(ci): cover shared workspace inputs in path detection - #5756

Open
latreon wants to merge 1 commit into
block:mainfrom
latreon:fix/ci-shared-path-detection
Open

latreon wants to merge 1 commit into
block:mainfrom
latreon:fix/ci-shared-path-detection

Conversation

@latreon

@latreon latreon commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Pull-request path detection omitted several shared workspace inputs, which could skip required CI groups when those inputs changed.

  • correct the case-sensitive Justfile match
  • map Hermit, root workspace, and CI workflow inputs to their affected groups
  • map shared checker implementations to the desktop and web groups that invoke them
  • add an always-on, dependency-free contract test for representative path-selection cases

Related issue

N/A — no matching issue or pull request found.

Testing

  • node --test scripts/check-ci-path-filters.test.mjs (proved red before the workflow fix, then green)
  • node --test scripts/*.test.mjs (7/7 passing)
  • pnpm exec biome check scripts/check-ci-path-filters.test.mjs
  • git diff --check

Signed-off-by: latreon <ferdakerim@gmail.com>
@latreon
latreon requested a review from a team as a code owner August 13, 2026 10:52
@Chessing234

Copy link
Copy Markdown
Contributor

good catch on justfile -> Justfile — the file is capitalised, so on a case-sensitive runner that rust filter never matched and Justfile edits have not been triggering rust CI at all.

one shared input still missing: patches/**. pnpm-workspace.yaml is now covered but the patches it applies are not, and patches/virtua@0.49.3.patch patches the virtualization library the desktop message timeline runs on (useVirtualizedBottomSettle, MessageTimeline). editing that changes desktop runtime behaviour and would currently skip the desktop job entirely — the same class of hole this PR is closing.

patches/isomorphic-git.patch is the same story for the projects/repo surface.

@Chessing234 Chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the new contract test fails against this diff. expectedSelections requires ".github/workflows/ci.yml" to select ["rust","desktop","web","mobile"], but the mobile filter never gets it — the hunk adds only 'bin/**' and 'Justfile' there, and main's mobile block carries '.github/workflows/mobile-release-candidate.yml', not ci.yml. nothing in selectsPath reaches it, so it trips on ".github/workflows/ci.yml must select the mobile CI group".

that's a real gap and not just a test bug: the Mobile job at ci.yml:850 gates on needs.changes.outputs.mobile alone — no ||rust / ||desktop fallback like every desktop-rust consumer has — so a PR editing ci.yml, including the Mobile job's own steps, skips mobile entirely. adding '.github/workflows/ci.yml' to the mobile filter fixes both at once.

the Justfile fix is real fwiw — git ls-files confirms the tracked name is Justfile, so the old lowercase pattern never matched on a linux runner.

baxen pushed a commit that referenced this pull request Sep 25, 2026
A documentation-only update to #7809 selected desktop builds and E2E
tests because path detection compared an old PR base SHA with GitHub's
newer synthetic merge commit. The [failing run's path-detection
log](https://github.com/block/buzz/actions/runs/35789957773/job/106955810630)
includes four unrelated desktop files from `main`; `VISION_MOBILE.md`
did not match a runtime filter.

Use GitHub's PR file list for pull requests so unrelated changes in the
synthetic merge commit cannot select runtime suites. The existing
directory filters are unchanged: root and docs/ Markdown do not select
runtime suites, while Markdown under runtime directories still selects
its affected suites. Mixed code/documentation changes retain normal
coverage. Always-on security, policy, and source-contract checks and
full push-to-main coverage are unchanged.

Added regression coverage runs the pinned paths-filter action against
real fixture repositories, including a synthetic merge containing
unrelated upstream desktop code. All 35 selection scenarios and 26
required-check scenarios pass; the new regressions failed before the
fix. Existing required-context isolation, file-size policy, and
security-review contract checks pass, as do script lint and workflow
syntax validation. Full workflow lint reports the same two pre-existing
shell-quoting findings in the untouched dead-token guard. A desktop E2E
build was run to diagnose the unrelated required smoke failure.

Related: #7809 (incident, unchanged) and #5756 (shared-input path
coverage, separate scope). No matching issue found.

PRs with at least 3,000 changed files now select every runtime suite,
avoiding GitHub's PR-file-list ceiling. Boundary tests cover 2,999,
3,000, and 3,001 files, including a runtime file omitted beyond the API
cap; disabling the safeguard makes the latter two regressions fail.

Required checks now run and fail when path selection fails, is
cancelled, or is skipped. Regression coverage exercises the workflow
conditions and shell checks for all 13 required wrappers, plus an
API-denial case against the pinned action. Mutating either the
scheduling guard or the result check makes all 13 failure regressions
fail.

The required mention-settings smoke test expected a pin after explicitly
disabling automatic mentions. Waiting for its old avatar to exit
reproduced the CI failure 3/3; the test now checks that subsequent
mentions remain manual and retains outgoing recipient-tag assertions.
Corrected browser regression: 20/20 repeated runs; related picker unit
tests: 18/18. No desktop production behavior changed. The always()
requirement is now pinned in required-wrapper regression tests; deleting
it fails all 26 gate cases.

---------

Signed-off-by: Tom Brow <tomb@block.xyz>

This branch has not been deployed

No deployments
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