Repository navigation
test(dogfood): pin the undeclared-key refusal on the suite's SQL driver arms (#15953 slice 7) - #23976
Conversation
Claude-Session: https://claude.ai/code/session_018t6a5rvqPRvEDMCVVW9kYT Co-authored-by: Claude <noreply@anthropic.com>
…er arms A key the object does not declare, written by the caller or stamped by a before-hook, is refused by the engine as one envelope (INVALID_FIELD / 400) on driver-sql (better-sqlite3 :memory:) and driver-sqlite-wasm (:memory:), and the table read past the engine holds nothing the refused write carried. Controls: a declared key round-trips, and the same hook stores the same key on an object that declares it. Claude-Session: https://claude.ai/code/session_018t6a5rvqPRvEDMCVVW9kYT Co-authored-by: Claude <noreply@anthropic.com>
…-undeclared-key-conformance
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
席位核对ACCEPT · #15953 slice 7 (row 10's driver conformance) ·
Out of scope, noted, not filed (承接者:无): Landing: once every check on the head is green or an expected skip, this seat flips the PR ready and arms auto-merge through the relay, then follows it to Generated by Claude Code |
Part of #15953
Clause-②: no
What this is
Slice 7 of the card: row 10 of the classification table (comment
6115219467), the per-driver half, as the slice-7 claim (6217542057) scopes it. It is one new test file,packages/qa/dogfood/test/undeclared-key-conformance.test.ts, besideread-coercion-conformance.test.tsand in its style.On every SQL driver arm the dogfood conformance files run, it pins that a key the object does not declare is refused by the ENGINE as one envelope, whether the caller wrote it or a before-hook stamped it. The table, read straight past the engine through knex, holds nothing the refused write carried. This is the platform's own pin for what hotcrm's
test/undeclared-key-probe.test.tsasserted, so objectstack-ai/hotcrm#1583 can retire that file.@objectstack/dogfoodisprivate: true, so there is no changeset. The seat appliesskip-changeset.os verifyon hotcrm's metadata".The arms
driver-sqlon better-sqlite3:memory:. This arm is the table's "memory", read as the claim rules: the driver-memory arm left the conformance files in driver-memory 测试面替代:项目内测试后端迁到 sqlite:memory:(#5499 重启条件 · memory 半边,维护者 2026-08-06 立项) #5704, and this is the armread-coercion-conformance.test.tsruns. It is also the table's "sqlite".driver-sqlite-wasm:memory:. Covered by measurement. The suite already runs this arm (date-bucket-parity-conformance.test.ts,group-key-read-shape-parity.test.ts), and here it boots underObjectQLand syncs its schema.What each arm answers today, measured before anything was pinned
The setup is
ObjectQLover each real driver with a system context.probe_quotedeclarestax_rateandprobe_quote_linedoes not (hotcrm's declared/undeclared pair). The reading was taken on the built engine and drivers at base161aee104, and the pinned file re-ran green at the final head.tax_rateontoprobe_quote_lineError,codeINVALID_FIELD,status400,fieldtax_rate,objectprobe_quote_linebeforeInserthook stamps itbeforeUpdatehook, by idbeforeUpdatehook, by predicate (multi: true)probe_quote, which declares the key77No arm departs from one envelope, so there was no defect to stop at. The objectql pins (
engine-post-hook-undeclared-field.test.ts,engine-undeclared-key-caller-path.test.ts) prove the door against driver doubles only, and say so. This file is the half on the shipped drivers.The cases (six per arm, twelve in all)
findOneand the knex read.INVALID_FIELD/ 400, naming the field and the object. The table is empty.codeandstatusas above, and the same envelope, field for field, as the caller path's answer on that arm. The table is empty.The envelope is projected from the engine's own error (
code,status,field,object) and never rebuilt in the test. The hook path is compared with the caller path's measured answer. No message text is pinned.Ablation (one, on the fixture)
probe_quote_linewrites a DECLARED key instead.const LINE_HOOK_WRITES = { [KEY]: 7 };becomes{ unit_price: 7 }, throughscripts/ablation-replace.mjs: anchor x1 to x0, replacement x0 to x1, blob878a1b97a7ccto8c606255f1ce. A trap in the ablation script restores on exit.4 failed | 8 passed, read4 failed | 8 passed. Both hook-path cases failed on both arms, each with "expected the engine to refuse, and it answered". The controls and the caller path stayed green.878a1b97a7cc, equal to HEAD's;git diff HEADandgit status --porcelainare both empty.Tests and gates, at
04185a291pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=2 --reporter=verbose test/undeclared-key-conformance.test.ts test/read-coercion-conformance.test.ts: 2 files, 14 passed.pnpm --filter @objectstack/dogfood typecheck: exit 0, after a build of the whole@objectstack/dogfood^...closure.tsc --listFilesincludes the new file.pnpm exec eslint --no-inline-config packages/qa/dogfood/test/undeclared-key-conformance.test.ts: exit 0 with 0 messages, and the file was linted, not ignored. The repo-wide lint is CI'sLint & Repo Gates.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(no paths): 53 derived, 53 run, all exit 0.--ranreconciles 53 / 53 / 0 NOT-MEASURED / 0 UNRUN.check:dual-build-cjs-loadsfirst exited 3 (PREREQUISITE NOT MET: 8 packages outside the dogfood closure had nodist/). It exited 0 after those were built.test:repo(Test Core).Acceptance notes
bootStack({ databaseDriver: 'memory' })can still boot driver-memory in this suite; the analytics isolation pins use it as a two-driver equivalence arm. This slice follows the claim's reading of "memory". Noted, not filed; carrier: none.origin/mainmoved after the merge. This branch merged6d1660dc3, andorigin/mainthen moved to68ffa5dc1. That is one commit (PR refactor(rest): move registerSearchEndpoints into search-routes.ts (#23050 slice 9) #23959), touching other dogfood files (authz-conformance.test.tsand its census) andpackages/rest. Neither reads this file or anything it imports, so the branch was not re-merged.packages/verify.Generated by Claude Code