TEST-01: test the real illustration-marker insertion, not a copy - #190
Merged
Merged
Conversation
TEST-01. illustration-marker-insertion.test.ts exercised its own copy of the algorithm, so it could not catch changes to the store action. The logic now lives once, as insertMarkerAfterSelection in services/ai/illustrationMarkers.ts (next to the marker pattern), and generateIllustrationForSelection calls it. The 21 existing cases import it and pass unchanged. generateIllustrationForSelection.test.ts runs the real action: the selection gets the next marker and illustration entry, and a rejected planning call leaves the chapter and persistence untouched. Mutation-checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011d1MbSabs9nA9d9w8pxP1W
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Resolves TEST-01 in
Issues.md.tests/store/slices/illustration-marker-insertion.test.tsre-implemented the marker-insertion algorithm and tested that copy, so it couldn't detect changes to the store action it claimed to cover.Changes
generateIllustrationForSelection(store/slices/translationsSlice.ts) intoinsertMarkerAfterSelectioninservices/ai/illustrationMarkers.ts, which already owns the marker pattern. The action calls it.replacealready returns the input when nothing matches.tests/services/ai/insertMarkerAfterSelection.test.ts) and pass unchanged.tests/store/slices/generateIllustrationForSelection.test.tsruns the real action. It covers the two outcomes the issue asks for:[ILLUSTRATION-2]), the matching illustration entry is appended, and the updated translation is persisted.docs/infrastructure/TEST_MANIFEST.mdandIssues.mdare updated.Verification (Node 22 container)
tsc: 0 errorseslinton changed files: 0 errorsvitest run: 9,599 passed, 1 failed. The failure is the known Node-22-onlyindrasNetImageProvider.test.tscase.🤖 Generated with Claude Code
https://claude.ai/code/session_011d1MbSabs9nA9d9w8pxP1W
Generated by Claude Code