Skip to content

testing-layers --check walks nested git worktrees: false unclassified reds on developer checkouts #3137

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: a75dfe1627b5492e8588d310d8e1dd70
Branch: dev/3-testing-layers-scope
Base: 16915af
At: 2026-11-17T04:06:11Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Bot: FlyBot Dev-3

Dedupe (checked before opening): searched open and closed issues for this scan-scope defect (keywords around testing-layers / worktree / unclassified / scan scope) — the only hit is #749 itself, the feature this fix lives inside (closed completed via #755); no open or closed issue covers "the classifier classifies test files that are not the repository's own".

What happens

node .github/scripts/testing-layers.mjs --check walks every *.test.{m?[jt]s|cjs} under the working root with only node_modules, .git and .dsh-test* skipped (collectTestFiles, testing-layers.mjs:42–55). A development git worktree nested inside the checkout (our box keeps ~60 under tmp/) is a plain directory whose .git is a file, so the walk enters it and collects the worktree's own test files; check then flags them as unclassified (testing-layers.mjs:145–148) and the scripts+policy segment goes red on the box (684/685) while the same tip in a clean checkout is 685/685 green. CI is unaffected because its clean checkout carries no worktrees — but the false red is real enough to have cost two seats significant time tonight (#3133's push waited on proving the environment, not the diff).

Expected

The check classifies the repository under test — the test files that belong to the checkout — and never files inside a nested git worktree (a directory that is itself a worktree: its .git is a file) or otherwise outside the repository's own set. #749's acceptance is unchanged: a genuinely unclassified new *.test.mjs inside the repository proper still fails the check by name, and removing a suite's rows from the manifest still fails it.

Scope

  • .github/scripts/testing-layers.mjs — scope collectTestFiles to the repo under test.
  • .github/scripts/testing-layers.test.mjs — red first: a test file inside a nested worktree is not collected and not reported; the repo-proper controls keep both directions (a stray unclassified file inside the repo still reports, a manifest row removal still fails).
  • docs/testing-layers.md / docs/testing-layers.json — only if wording or rows must move with the fix; no layer semantics change.
  • Out of scope: gate/queue scripts, policy/gates.json (testing-layers.mjs is not gate-listed — the 13 gate paths verified), CI workflow files (test.yml is gate-listed and must not be touched).

Sequencing

Bench task (2026-11-17): fix and verify on a clean base first; this issue is created at READY with the claim. The bench branch dev/3-testing-layers-scope was cut at 7c4c5c3e0b93654aeb1f4c7ad2dfba5d2ee6017f (live main at task start); the PR opens draft-first within the claim window and is brought onto claim-time live main (16915af98bb2341eeb374590e68ac56855149886 at issue-open time) with verification re-run at the final tip before it un-drafts.

Tier: T3 — both changed paths match .github/** in .github/agent/risk-rules.json (verified at live main 16915af98bb2); 2 files, +34 lines, inside T3 limits (250 lines / 12 files). A PASS at the final tip is required.

Activity

  1. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Scoping evidence — three readings, for the reviewer (to be mirrored in the PR body before it goes ready):

    • 684/685 — the box's scripts+policy segment: the walk enters ~60 nested dev worktrees under tmp/ and flags their test copies as unclassified (this defect; reproduced on a pristine base with a probe worktree — unclassified test file: tmp/parked/core/test/copy.test.js, exit 1).
    • 685/685 — the same tip in a clean worktree is green (Translate the host-posted room notices with the window's language #3136 verified at 94ae2af1856a5548c9c2e4d22861f493ef53a81f): the box red is the environment's shape, not any diff's.
    • 898 test files / 16 workflows — the real repository's classification count is unchanged at the fix tip: narrowing the scan scope swallowed no real file.
  2. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: a75dfe1627b5492e8588d310d8e1dd70
    At: 2026-11-17T04:49:12Z

  3. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: a75dfe1627b5492e8588d310d8e1dd70
    At: 2026-11-17T07:02:17Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions