test(core): align file-tree test with backup-only hiding (#1366)#1400
Conversation
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>
miguel-heygen
left a comment
There was a problem hiding this comment.
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:shouldIgnoreDironly hidesbackup, not the whole.hyperframesdir).hyperframes/backup/snapshot.html→ hidden (correct:shouldIgnoreDir(".hyperframes/backup")from #1366).cachefixture preserved (correctly exercisesisInHiddenOrVendorDircomposition 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
miguel-heygen
left a comment
There was a problem hiding this comment.
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 byshouldIgnoreDir). 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
84a56986state (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
What
mainis red again ate2cc134c. This restores green. Test-only.Why — my own #1399 regressed it
#1366 (5f12e69, green) is the authoritative fix for #1384: it refined
walkDirto hide only.hyperframes/backup(shouldIgnoreDir) and removed.hyperframesfromIGNORE_DIRS, so.hyperframes/examples— like any vendored dot-dir — stays visible in the file tree and is gated out of composition discovery byisInHiddenOrVendorDir. Its test asserted exactly that.My #1399 branched off the older
84a56986(where.hyperframeswas wholesale-hidden) and rewroteprojects.test.tsto assert.hyperframes/examplesis hidden. When #1399 merged on top of #1366, it clobbered #1366's corrected test, and the assertion now contradictsshouldIgnoreDir→ red. My bad.How (test-only)
Align the file-tree test with #1366's behavior:
.cache/examples/preset.htmland.hyperframes/examples/preset.htmlare both visible infiles(kept the.cachefixture from test(core): fix contradictory composition-discovery file-tree test (#1385) #1399 — it genuinely exercisesisInHiddenOrVendorDirgating for a non-special dot-dir)..hyperframes/backup/snapshot.htmlis the only thing hidden from the tree.No production code changes; the
walkDir"hides backups" test is untouched.Test plan
projects.test.ts(2/2),safePath.test.ts,lint.test.tspass.bun run --filter '!@hyperframes/producer' testgreen (exit 0);oxlint/oxfmt --checkclean.🤖 Generated with Claude Code