Skip to content

refactor(core): drop unused seenMockIndexKeys in tags writers - #4254

Merged
melloware merged 1 commit into
orval-labs:masterfrom
irontaek:refactor/drop-unused-mock-index-keys
Oct 5, 2026
Merged

melloware merged 1 commit into
orval-labs:masterfrom
irontaek:refactor/drop-unused-mock-index-keys

Conversation

@irontaek

@irontaek irontaek commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

writeTagsMode and writeSplitTagsMode create a seenMockIndexKeys set and add an indexKey to it, but nothing ever reads the set. These writers now find index entries with mockIndexEntries.find(...). The set looks like a leftover from #3559, where it was checked with has() before an entry was added. This PR removes the set and the key built for it (6 lines, no behavior change).

split-mode.ts and single-mode.ts still check the same set with has(), so I left them alone.

Checks run locally:

  • vp test run src/writers in packages/core: 18 files, 243 tests passed
  • tsc --noEmit -p packages/core, vp fmt --check and vp lint on the changed files were clean

I found this with a static check for collections that are written but never read, and reviewed the change by hand.

https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq

Summary by CodeRabbit

  • Chores
    • Removed unused internal bookkeeping. Mock index entries continue to be grouped by extension and directory, and tags continue to be added as before. There are no user-visible behavior changes.

The tags and split-tags writers track mock index entries with
mockIndexEntries.find(), so the seenMockIndexKeys set is only written
and never read. Remove it together with the key it was built from.
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: orval-labs/orval/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e411d9a4-bf65-43d1-b143-123869982ea1
📥 Commits

Reviewing files that changed from the base of the PR and between 0336088 and 5d9a342.

📒 Files selected for processing (2)
  • packages/core/src/writers/split-tags-mode.ts
  • packages/core/src/writers/tags-mode.ts
💤 Files with no reviewable changes (2)
  • packages/core/src/writers/split-tags-mode.ts
  • packages/core/src/writers/tags-mode.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Both tag-mode writers remove unused mock index key tracking. Mock index entries continue to be grouped by mock extension and directory.

Changes

Mock index tracking

Layer / File(s) Summary
Remove unused mock index key tracking
packages/core/src/writers/split-tags-mode.ts, packages/core/src/writers/tags-mode.ts
Both writers remove the unused set and its key construction and updates. Mock index entries continue to be found or created by matching the mock extension and directory.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 5d9a3

No actionable merge risk was found in this change; it is ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: removing the unused seenMockIndexKeys set from the tags writers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@melloware melloware added this to the 8.41.0 milestone Oct 5, 2026
@melloware melloware added the mock Related to mock generation label Oct 5, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@orval/angular

bun add https://pkg.pr.new/@orval/angular@5d9a342

@orval/axios

bun add https://pkg.pr.new/@orval/axios@5d9a342

@orval/core

bun add https://pkg.pr.new/@orval/core@5d9a342

@orval/effect

bun add https://pkg.pr.new/@orval/effect@5d9a342

@orval/fetch

bun add https://pkg.pr.new/@orval/fetch@5d9a342

@orval/hono

bun add https://pkg.pr.new/@orval/hono@5d9a342

@orval/mcp

bun add https://pkg.pr.new/@orval/mcp@5d9a342

@orval/mock

bun add https://pkg.pr.new/@orval/mock@5d9a342

orval

bun add https://pkg.pr.new/orval@5d9a342

@orval/pinia-colada

bun add https://pkg.pr.new/@orval/pinia-colada@5d9a342

@orval/query

bun add https://pkg.pr.new/@orval/query@5d9a342

@orval/solid-start

bun add https://pkg.pr.new/@orval/solid-start@5d9a342

@orval/swr

bun add https://pkg.pr.new/@orval/swr@5d9a342

@orval/zod

bun add https://pkg.pr.new/@orval/zod@5d9a342

commit: 5d9a342

@melloware
melloware merged commit 322b2fe into orval-labs:master Oct 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mock Related to mock generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants