Skip to content

test(core): align file-tree test with backup-only hiding (#1366)#1400

Merged
jrusso1020 merged 1 commit into
mainfrom
fix/projects-test-align-backup-hiding
Jun 13, 2026
Merged

test(core): align file-tree test with backup-only hiding (#1366)#1400
jrusso1020 merged 1 commit into
mainfrom
fix/projects-test-align-backup-hiding

Conversation

@jrusso1020

Copy link
Copy Markdown
Collaborator

What

main is red again at e2cc134c. This restores green. Test-only.

e2cc134c  (#1399)   Test: FAILURE   ← current main HEAD
5f12e692  (#1366)   Test: success

Why — my own #1399 regressed it

#1366 (5f12e69, green) is the authoritative fix for #1384: it refined walkDir to hide only .hyperframes/backup (shouldIgnoreDir) and removed .hyperframes from IGNORE_DIRS, so .hyperframes/examples — like any vendored dot-dir — stays visible in the file tree and is gated out of composition discovery by isInHiddenOrVendorDir. Its test asserted exactly that.

My #1399 branched off the older 84a56986 (where .hyperframes was wholesale-hidden) and rewrote projects.test.ts to assert .hyperframes/examples is hidden. When #1399 merged on top of #1366, it clobbered #1366's corrected test, and the assertion now contradicts shouldIgnoreDir → red. My bad.

How (test-only)

Align the file-tree test with #1366's behavior:

  • .cache/examples/preset.html and .hyperframes/examples/preset.html are both visible in files (kept the .cache fixture from test(core): fix contradictory composition-discovery file-tree test (#1385) #1399 — it genuinely exercises isInHiddenOrVendorDir gating for a non-special dot-dir).
  • .hyperframes/backup/snapshot.html is the only thing hidden from the tree.
  • Composition discovery still excludes every dot-dir example.

No production code changes; the walkDir "hides backups" test is untouched.

Test plan

  • projects.test.ts (2/2), safePath.test.ts, lint.test.ts pass.
  • Full bun run --filter '!@hyperframes/producer' test green (exit 0); oxlint / oxfmt --check clean.

Unblocks main (red blocks every PR's merge-test). #1397/#1398 rebase on top once this lands.

🤖 Generated with Claude Code

main went red again at e2cc134: my #1399 fix branched off the pre-#1366
state (where `.hyperframes` was wholesale-hidden via IGNORE_DIRS) and, when
it merged on top of #1366, overwrote #1366's corrected test with an
assertion that `.hyperframes/examples` is hidden.

#1366 is the authoritative behavior: walkDir now hides only
`.hyperframes/backup` (shouldIgnoreDir), so `.hyperframes/examples` — like
any other vendored dot-dir — stays visible in the file tree and is gated out
of composition discovery by isInHiddenOrVendorDir. That is the original #1384
intent.

Correct the file-tree test to match:
- `.cache/examples/preset.html` and `.hyperframes/examples/preset.html` are
  both visible in `files` (kept the `.cache` case from #1399 — it exercises
  isInHiddenOrVendorDir gating for a non-special dot-dir).
- `.hyperframes/backup/snapshot.html` is the only thing hidden from the tree.
- Compositions still exclude every dot-dir example.

Full non-producer suite green; walkDir "hides backups" test untouched.

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

@vanceingalls vanceingalls left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exactly right. The projects.test.ts assertions were contradicting shouldIgnoreDir(".hyperframes/backup") from #1366 because #1399 branched off the older state where .hyperframes was wholesale-hidden. This correctly realigns them:

  • .hyperframes/examples/preset.html → visible (correct: shouldIgnoreDir only hides backup, not the whole .hyperframes dir)
  • .hyperframes/backup/snapshot.html → hidden (correct: shouldIgnoreDir(".hyperframes/backup") from #1366)
  • .cache fixture preserved (correctly exercises isInHiddenOrVendorDir composition gating)

Test comment update and fixture addition are clean. No production code changes. All required CI green.

Regression shards pending at the time of this review — expected per repo convention; the test-only nature of this PR means no shard impact.

Verdict: APPROVE
Reasoning: Test-only realignment of a regressed assertion; logic matches #1366's shouldIgnoreDir behavior exactly. No concerns.

— Via

@jrusso1020 jrusso1020 merged commit ab7f69c into main Jun 13, 2026
47 checks passed
@jrusso1020 jrusso1020 deleted the fix/projects-test-align-backup-hiding branch June 13, 2026 02:44

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Additive — no prior reviews on this PR.

Strengths:

  • projects.test.ts:17-31 — the revised fixture comment correctly maps all three fixture paths to the walkDir contract they exercise (.cache = vendored dot-dir, .hyperframes/examples = vendored under Studio's dir, .hyperframes/backup = the one actually hidden by shouldIgnoreDir). This is the right level of specificity after a two-hop regression.
  • Root cause analysis in the PR body is precise: #1399 branched off the older 84a56986 state (pre-#1366), so when it merged on top of #1366 it silently reverted #1366's corrected assertion. Clear blame trail, easy to trace.

Findings: none.

CI: All checks green — Test ✓, Tests on windows-latest ✓, all 8 regression shards ✓.

Audited: packages/core/src/studio-api/routes/projects.test.ts (only file changed; test-only diff).

Verdict: APPROVE
Reasoning: Test-only, 1-file diff that correctly re-aligns assertions with #1366's backup-only-hiding behavior. All CI green.

— magi

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.

3 participants