Skip to content

chore: 分割で増えた scoria の指摘を直す(循環 import・重複・未使用 export) - #191

Merged
isamu merged 2 commits into
mainfrom
chore/split-followups
Oct 21, 2026
Merged

isamu merged 2 commits into
mainfrom
chore/split-followups

Conversation

@isamu

@isamu isamu commented Oct 21, 2026

Copy link
Copy Markdown
Member

Summary

Clears the three new findings that scoria reported after the splits (#188, #189, #190).

  • circular-dependency (evaluator.ts ⇄ arrayEvaluation.ts): EvaluatorContext moves to src/engine/evaluatorContext.ts, so the two files no longer import each other. src/engine/index.ts adds export * from "./evaluatorContext", so the type stays public.
  • jscpd (calculator.ts's normalizeData and sheetRows.ts's normalizeSheetData had the same body): the editor side now uses the engine's normalizeData, and src/vue/sheetRows.ts is removed.
  • knip/unused-export: ensureSpillsCovering in rangeReading.ts is no longer exported. Nothing outside the file used it.

Items to Confirm

  • One behaviour change: when a sheet in the editor JSON has data of an unknown shape (neither an array of rows nor a flat array of cells), normalizeData prints a console.warn. normalizeSheetData did not. In every other case the two return the same thing: the two functions had the same branches.
  • The cycle is gone. npx madge --circular --extensions ts src finds the one cycle on origin/main and none on this branch.
  • The public exports are unchanged. The runtime export lists of src/engine/index.ts, src/index.ts and src/core/index.ts are the same on origin/main and here.
  • jscpd (with scoria's settings) finds no duplicates, and oxlint reports nothing.
  • yarn lint, yarn typecheck, yarn build, yarn test, yarn test:engine and test:evaluator pass. The first test:engine run had one failure, under a high machine load; running the whole suite again passed every test.

User Prompt

🤖 Generated with Claude Code

work in GUIChatPluginSpreadsheet

isamu and others added 2 commits October 21, 2026 16:18
…icate, an unused export

EvaluatorContext moves to evaluatorContext.ts, so evaluator.ts and arrayEvaluation.ts no longer import
each other; the editors read rows with the engine's normalizeData instead of a copy of it
(sheetRows.ts); ensureSpillsCovering is no longer exported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@isamu

isamu commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

CODEX VERDICT: LGTM\n\nRead SHA: 3eb7655.\n\n| Axis | Result |\n|---|---|\n| correctness and edge cases | none |\n| security (injection / path traversal / code evaluation) | none |\n| tests: does a test go red if the new behaviour breaks | none; yarn typecheck passes and yarn test:engine passes 2,216 tests. The requested Vitest command is blocked before test discovery by the existing vite.config.ts __dirname startup error. |\n| API / schema / wire / on-disk compatibility | none; the root engine export remains public, and the moved type is re-exported. |\n| consistency with the rest of the codebase | none |\n| i18n lockstep (src/lang has 8 locales) | none; no locale files are changed. |\n| TIER S→C (moves a public type; replaces a View helper with the engine's) | none |\n| the type move: EvaluatorContext identical to before; every importer updated; public export unchanged | confirmed; none |\n| normalizeSheetData → normalizeData in useMiniEditor.ts and editorSelection.ts: same result for every input (compare the two bodies in origin/main), the only difference the console.warn on an unknown shape | confirmed; none |\n| ensureSpillsCovering: unused outside rangeReading.ts | confirmed; none |\n\nFINDINGS COMPLETE: I read every hunk of the diff and this is every finding I have.

@isamu
isamu merged commit 0769b77 into main Oct 21, 2026
17 checks passed
@isamu
isamu deleted the chore/split-followups branch October 21, 2026 07:31
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