Compare commits

...
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 39a251ec69 Move dedupe cases fixture into web so docker build can see it
CI / ci (push) Successful in 2m27s
CI / ci (pull_request) Successful in 2m24s
The PWA's names.test.ts imported internal/ai/harness/testdata/dedupe_cases.json,
which is outside the web build context the Dockerfile's web stage copies, so
tsc failed and docker build . failed. The single case file now lives at
web/src/dinners/testdata/dedupe_cases.json; the harness Go test reads it from
there, as TestLetterFoldsMatchPWA already reads letterFolds.json.

Maestro task: 3eee9f68-2d34-4e49-8ca5-43bacfb642f0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:33:02 -04:00
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -517,7 +517,7 @@ Regular has a name `harness.Similar` to it — the PWA's copy of the name
rules in `web/src/dinners/names.ts` folds letters with
`web/src/dinners/letterFolds.json`, which `gen_folds.py` writes from the
same table as the server's, and runs the same cases,
`internal/ai/harness/testdata/dedupe_cases.json`, as the server's) and
`web/src/dinners/testdata/dedupe_cases.json`, as the server's) and
notifications (`/onboarding/notifications`: what MealQuest notifies about,
the iOS install hint, "Turn on notifications" and "Maybe later"). Either
button sends `PATCH /api/v1/settings/household` with
+4 -4
View File
@@ -8,11 +8,11 @@ import (
"unicode/utf8"
)
// TestSharedDedupeCases runs testdata/dedupe_cases.json, which the PWA's
// copy of Normalize and Similar (web/src/dinners/names.ts) runs too, so the
// two cannot drift apart on these names.
// TestSharedDedupeCases runs web/src/dinners/testdata/dedupe_cases.json,
// which the PWA's copy of Normalize and Similar (web/src/dinners/names.ts)
// runs too, so the two cannot drift apart on these names.
func TestSharedDedupeCases(t *testing.T) {
raw, err := os.ReadFile("testdata/dedupe_cases.json")
raw, err := os.ReadFile("../../../web/src/dinners/testdata/dedupe_cases.json")
if err != nil {
t.Fatal(err)
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
import cases from '../../../internal/ai/harness/testdata/dedupe_cases.json'
import cases from './testdata/dedupe_cases.json'
import { normalizeName, similarNames } from './names.ts'
// The cases internal/ai/harness's tests run against Normalize and Similar.
+1 -1
View File
@@ -1,7 +1,7 @@
// The PWA's copy of the server's dinner-name rules (internal/ai/harness
// Normalize and Similar), so a screen can tell beforehand that the dinners
// API would refuse a name as a duplicate. The server still decides.
// internal/ai/harness/testdata/dedupe_cases.json is run against both.
// web/src/dinners/testdata/dedupe_cases.json is run against both.
import folds from './letterFolds.json'