fix(inventory): make prefix search deterministic and refuse ambiguous matches #119
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/81-find-inventory-prefix-ambiguity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #81
Summary
findInventoryByPrefixto check for exact name match first viafindInventoryByName..orderBy(asc(schema.inventory.itemName), asc(schema.inventory.id)).undefined) so callers do not guess or overwrite wrong inventory rows.queries.test.tscovering exact match precedence, deterministic single match resolution, ambiguous match refusal, and edge cases.Verification
direnv exec . pnpm verify:managementpasses (test: 441/441 passed across 20 files, lint: exit 0, typecheck: exit 0).VERDICT: approve
orderBy(asc(schema.inventory.itemName), asc(schema.inventory.id)).limit(2)and returnsundefinedon ambiguous multiple matches, preventing silent poisoning of item prices.queries.test.tsverify all branches.fix(inventory): make prefix search deterministic and refuse ambiguous matches (#81)to fix(inventory): make prefix search deterministic and refuse ambiguous matches