Skip to content

Share the save validators with the solve log - #58

Merged
weevilgenius merged 1 commit into
mainfrom
claude/project-thread-tkfohz-validators
Oct 31, 2026
Merged

weevilgenius merged 1 commit into
mainfrom
claude/project-thread-tkfohz-validators

Conversation

@weevilgenius

Copy link
Copy Markdown
Owner

Requested by Barry · project thread

Fixes item 9 from the Ponytail repo audit.

src/solves.ts defined its own copies of the object and duration checks from src/save.ts. Now save.ts exports them as documented functions, as AGENTS.md requires for exported helpers, and solves.ts imports them. If the rules for saved data change, there is one place to change them.

count stays in solves.ts, since save.ts has no matching check (its integer takes a range). The diff is +5 lines net, because the exported helpers need JSDoc and the function form. The gain is one definition, not fewer lines.

No behavior change and no version bump. pnpm run check passes (324 tests, including the save and solve log validation tests).


Generated by Claude Code

solves.ts had its own copies of save.ts's object and duration checks.
It now imports them, so the rules for saved data live in one place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGfak3CRUUVwG8x6w8D3gr
@weevilgenius weevilgenius self-assigned this Oct 31, 2026
@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit e61fdfa):

https://stumped-game--pr58-claude-project-threa-orjk7ga9.web.app

(expires Sat, 07 Nov 2026 14:56:26 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: dfc2bf844eeac82ebd1846d84aacfdcd42e42a2f

@weevilgenius
weevilgenius merged commit 4ba9f18 into main Oct 31, 2026
2 checks passed
@weevilgenius
weevilgenius deleted the claude/project-thread-tkfohz-validators branch October 31, 2026 18:15
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.

2 participants