Skip to content

refactor(opencode): speed up file service test fixtures#28500

Open
esadomer wants to merge 1 commit into
anomalyco:devfrom
esadomer:optimize-file-test-fixtures
Open

refactor(opencode): speed up file service test fixtures#28500
esadomer wants to merge 1 commit into
anomalyco:devfrom
esadomer:optimize-file-test-fixtures

Conversation

@esadomer
Copy link
Copy Markdown

@esadomer esadomer commented May 20, 2026

Issue for this PR

N/A (refactor-only test-speed cleanup)

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Speeds up test/file/index.test.ts by removing git: true from file service cases that do not assert repository state. The .git exclusion case now creates a plain .git directory, so the coverage remains without paying for full repo setup.

How did you verify your code works?

  • bun test --timeout 30000 test/file/index.test.ts from packages/opencode
  • Before: 33.002s median from 31.354, 33.002, 34.678
  • After: 15.981s median from 16.757, 15.981, 15.821
  • Net: 17.021s faster, 51.6% lower wall time, 2.06x faster
  • bun typecheck currently fails on unrelated upstream errors in src/cli/cmd/run/stream.transport.ts, src/cli/cmd/tui/component/dialog-workspace-create.tsx, test/cli/run/stream.transport.test.ts, and packages/enterprise/src/custom-elements.d.ts.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@esadomer esadomer force-pushed the optimize-file-test-fixtures branch from 08da734 to f145917 Compare May 23, 2026 07:55
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

1 participant