chore(post-#168): tsc-hygiene round 2 — d3 types + tuple-mock + fixture catch-up#169
Merged
Conversation
@types/d3-transition was accidentally placed in dependencies instead of devDependencies in commit 07add8a; d3 type errors do not appear once pnpm install correctly wires the devDependency symlinks. Move @types/d3-transition to devDependencies alongside @types/d3-selection and @types/d3-zoom; all four @types/d3-* packages now sit in the correct field and resolve cleanly under Bundler moduleResolution. Refs investigations.md item 1 (post-#168 tsc hygiene). Co-Authored-By: ruflo <ruv@ruv.net>
vi.fn(() => ...) inferred a 0-arg call signature, making .mock.calls[0] an empty tuple []. Changed to vi.fn<typeof fetch>(() => ...) (vitest 4.x single-type-param form) so MockParameters<typeof fetch> flows through and [url, init] destructuring type-checks correctly. Applied to all three fetchMock declarations in the file for consistency. Refs investigations.md item 2 (post-#168 tsc hygiene). Co-Authored-By: ruflo <ruv@ruv.net>
Add status, title, consecutiveOnTargetTicks, hasOverride, and lastEvaluatedSnapshotId to all inline SustainmentRecord literals in processHub.test.ts (3 sites), processState.test.ts (1 site), and the recordFor() builder in sustainment.test.ts (1 site); semantically meaningful defaults throughout — no as-casts or ts-ignore. Refs investigations.md item 3 (post-#168 tsc hygiene). Co-Authored-By: ruflo <ruv@ruv.net>
…ismatches Add version, tributaries, createdAt, updatedAt to ProcessMap fixtures in stampStepCapabilities.test.ts via a local makeMap builder; fix two ctqColumn values from null to undefined (omitted) to match ProcessMapNode's string|undefined type. Refs investigations.md item 3 (post-#168 tsc hygiene). Co-Authored-By: ruflo <ruv@ruv.net>
…PR A post-168) T1 (e2c584ec) — d3 types placement fix; original hypothesis amended. T2 (35c34d83) — vi.fn<typeof fetch>(...) tuple-mock typing. T3 (7685734d) — SustainmentRecord fixture catch-up. T4 (27027162) — ProcessMap fixture catch-up. Item 4's vitest-timeout sub-item remains open for PR B. Co-Authored-By: ruflo <ruv@ruv.net>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the 4 pre-existing tsc errors deferred into
docs/investigations.mdby PR #168. All mechanical, no design decisions, zero runtime change.3b02e15d) —fix(hooks): resolve d3 module type imports.@types/d3-transitionwas incorrectly placed independencies(commit07add8a4) instead ofdevDependencies. Moved to align with siblings. Note: original investigations.md hypothesis ("missing hoisting entry") was wrong; empirical--prodinstall reproduction was not run, fix accepted on semantic grounds (type packages belong in devDeps).aa921381) —fix(hooks): type vi.fn fetch mock.vi.fn<typeof fetch>(...)(vitest 4.x single-type-param form) at 3 sites inuseHubCommentStream.test.ts. Resolves TS2493 + TS2339 from.mock.calls[N]being typed as empty tuple.d0dad59c) —test(core): catch up SustainmentRecord fixtures. 5 missing required fields (status,title,consecutiveOnTargetTicks,hasOverride,lastEvaluatedSnapshotId) added acrossprocessHub.test.ts,processState.test.ts,sustainment.test.ts.recordForbuilder improved in place; noascasts.d898e1d9) —test(core): catch up ProcessMap fixtures. LocalmakeMapbuilder (matches siblingmapOf/mkMappatterns); 4 fixture sites instampStepCapabilities.test.ts;ctqColumn: nullremoved (type isstring | undefined).8e6816e4) —docs(investigations): close items 1, 2, and fixture-shape half of 4. Vitest worker-timeout concern stays open for PR B (tracked at.claude/rules/testing.md:18+feedback_pr_ready_check_retry_on_grep_test).Plan:
~/.claude/plans/how-should-we-handle-generic-sonnet.md(PR A section).Test plan
pnpm --filter @variscout/core exec tsc --noEmit— 0 errorspnpm --filter @variscout/hooks exec tsc --noEmit— 0 errorspnpm --filter @variscout/ui exec tsc --noEmit— 0 errorspnpm --filter @variscout/core test— 3402/3402 passpnpm --filter @variscout/hooks test— 1213/1213 passas any/as unknown as/// @ts-ignoreintroduced (per-task + final reviewer verified)--no-verifyon any commitPre-existing issues surfaced during review (PR B candidates)
Final-branch review surfaced more pre-existing tsc errors in other packages (NOT in scope for PR A):
@variscout/stores—Finding.evidenceTypemissing inwallSelectors.test.ts:41,127(same RPS-era fixture-shape drift as item 4); 2 cast errors inprojectStore.test.ts:291,297;beforeEachglobal insetup.ts:22@variscout/data—ImportMeta.envaccess from core source seen transitively; suggestsvite-env.d.tsplacement / cross-package tsconfig issueTo be logged as a fresh
docs/investigations.mdentry in PR B.Spec workaround handled
A
bfc4bdabworkaround commit was needed mid-flight to satisfy the dead-link pre-commit hook (PR #168 introduced aroadmap.mdlink to an untracked spec). Discovered the user had already authored the canonical Sessions A+B+C version of that spec on local main (1e201e2a, unpushed). That commit was pushed to main first; PR A then rebased to drop the workaround. PR A's diff is now clean (8 files, 78/20 lines).🤖 Generated with ruflo