Skip to content

feat: Zod v4 migration, 25 unit tests, tracking docs cleanup#24

Merged
e6qu merged 2 commits intodevfrom
next/cleanup-and-plan
Mar 21, 2026
Merged

feat: Zod v4 migration, 25 unit tests, tracking docs cleanup#24
e6qu merged 2 commits intodevfrom
next/cleanup-and-plan

Conversation

@e6qu
Copy link
Copy Markdown
Owner

@e6qu e6qu commented Mar 21, 2026

Summary

  • Zod v3→v4 migration: replaced zodToJsonSchema() with native z.toJSONSchema() (sole remaining v3 usage)
  • 25 new unit tests for Frankencode-specific modules (CAS, EditGraph, SideThread, Objective, ContextEdit)
  • Tracking docs compressed: PLAN.md, STATUS.md, WHAT_WE_DID.md, DO_NEXT.md, BUGS.md, GAP_ANALYSIS.md all updated

New Tests

File Tests Module
test/cas/cas.test.ts 5 CAS store/get/dedup/delete/list
test/cas/graph.test.ts 5 EditGraph commit/log/head/chain
test/session/side-thread.test.ts 5 SideThread CRUD + filter + update
test/session/objective.test.ts 5 Objective extract/set/get/re-evaluate
test/context-edit/context-edit.test.ts 5 mark lifecycle + sweep discard/pinned/window

Test plan

  • bun run typecheck (tsgo) — 0 errors
  • bun test — 1473 pass, 0 fail (25 new)
  • SDK build (bun run build in packages/sdk/js) — passes

Adrian Mârza added 2 commits March 21, 2026 22:55
- PLAN.md: remove completed sections, keep only Zod migration + upstream sync
- STATUS.md: compressed to metrics table
- WHAT_WE_DID.md: compressed all phases into summary
- DO_NEXT.md: updated with current priorities (Zod, upstream, testing backlog)
- BUGS.md: compressed fixed bugs to category summary (full details in git)
- GAP_ANALYSIS.md: updated to reflect all goals complete
Zod v3→v4:
- Replace zodToJsonSchema() with z.toJSONSchema() in experimental.ts
- Remove zod-to-json-schema import (sole consumer)
- Use instanceof z.ZodType check instead of _def property check

Unit tests (25 new tests across 5 files):
- test/cas/cas.test.ts: CAS store/get/dedup/delete/list (5 tests)
- test/cas/graph.test.ts: EditGraph commit/log/head/chain (5 tests)
- test/session/side-thread.test.ts: SideThread create/get/list/filter/update (5 tests)
- test/session/objective.test.ts: Objective extract/set/get/re-evaluate (5 tests)
- test/context-edit/context-edit.test.ts: mark/sweep-discard/sweep-pinned/sweep-window (5 tests)

Total: 1473 tests passing (up from 1448), 0 tsgo errors
@e6qu e6qu merged commit 5560fd8 into dev Mar 21, 2026
1 check passed
@e6qu e6qu deleted the next/cleanup-and-plan branch March 21, 2026 21:14
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