Repository navigation
test(dogfood): pin five more records-forms checklist items at the REST door (slice 3) - #26865
Merged
Merged
Conversation
…T door (slice 3) Items field-type-matrix, field-unique-enforcement, import-wizard-encoding-and-hints, master-detail-atomic-save and object-hook-lifecycle. Six new dogfood pins score the api and log clauses the 18.2.0 sweep left PARTIAL: the field zoo's server refusals and the summary carriers, the unique refusal envelope on the SQL family, an import that reads back, the atomic cross-object batch with its server roll-up, and the hook lifecycle on the showcase hooks and on scratch hooks with the server log read back. Each item's automated.ref names its pins, revision +1, one history row. Claude-Session: https://claude.ai/code/session_01JQwxbZ3oTCkvGGTMNd5XYU Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 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): |
Contributor
Author
维护者速读
席位核对ACCEPT ·
Generated by Claude Code |
8 tasks done
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.
Requested by Warren · project thread
Refs #26573 (slice 3, items:
field-type-matrix,field-unique-enforcement,import-wizard-encoding-and-hints,master-detail-atomic-save,object-hook-lifecycle)Clause-②: no
Metadata-protocol: none
维护者速读
automated.ref指向新钉测,revision 各加 1,history 引本卡。field-unique-rest-refusal.dogfood.test.ts(实测:global 单列索引时面向用户的error用 API 键名 gsku,developerMessage 用标签,见 Acceptance notes);object-hook-lifecycle-*.dogfood.test.ts(日志经 stdout/stderr 截取读回)。pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=2 test/field-type-matrix-server-refusals.dogfood.test.ts test/field-unique-rest-refusal.dogfood.test.ts test/import-lands-readable-rows.dogfood.test.ts test/master-detail-batch-atomic.dogfood.test.ts test/object-hook-lifecycle-showcase.dogfood.test.ts test/object-hook-lifecycle-scratch.dogfood.test.ts,预期 6 个文件 23 个用例全绿;node scripts/check-platform-checklist.mjs预期 OK。What changes
Six new dogfood files drive the REST doors of a booted stack (the showcase as shipped, or a scratch app where the item prescribes one), and two read the server log off stdout/stderr for the item's
logoracles:field-type-matrix(6 → 7)field-type-matrix-server-refusals.dogfood.test.ts: zoo refusals (invalid_option, required, reference_not_found on f_lookup / f_master_detail / f_tree) with the row count read back; invoice totals vs their lines; EXP-2001's two roll-upsfield-unique-enforcement(10 → 11, kind unit → dogfood)field-unique-rest-refusal.dogfood.test.ts: the item's scratch object on the SQL familyimport-wizard-encoding-and-hints(7 → 8)import-lands-readable-rows.dogfood.test.ts:POST /data/showcase_contact/import, created count vs a filtered GET, CJK values byte-identicalmaster-detail-atomic-save(8 → 9)master-detail-batch-atomic.dogfood.test.ts: the cross-objectPOST /batchwith{$ref: 0}children, server amount and total roll-up across add/delete, the whole-batch abortobject-hook-lifecycle(10 → 11)object-hook-lifecycle-showcase.dogfood.test.ts(the seeded hooks: stamp, trim, transition audit, over-budget warn) +object-hook-lifecycle-scratch.dogfood.test.ts(abort, async log, fail-closed condition, priority order)Each item's
automated.refkeeps the pins it already named (as evidence of their own layer where they sit below the oracle) and adds the new ones with what they score. One history row per item, citing #26573. No clause text, fixture, step orknownGapsline was edited (the claim's file surface).Skipped, by the slice-3 order:
record-discussion-mentions: waits on qa(checklist): records-forms — provisioning recipes for a walled two-organization mention leg, a packaged action specimen, and the app-crm import specs #26625.form-dirty-guard: next in card order, but its only api clause (acceptance[1]) reads the row after a browser exit (discard or save through the guard), so every clause needs a browser.related-list-server-pagination,v18-semantic-defaults,view-type-gallery.v18-semantic-defaultshas browser clauses only (a1–a3 dom/screenshot, a0 the spec pins).field-type-matrixacceptance[1];import-wizard-encoding-and-hintsthe wizard's decode/preview (negative[0]);master-detail-atomic-saveacceptance[0], [4], negative[1] and acceptance[5]'s live recompute.field-unique-enforcementacceptance[4]–[5] and negative[3] stay the driver pins', as the item says.Why
The 18.2.0 release-candidate Tier 1 run scored these clauses PARTIAL (pins below the oracle layer: driver-level, in-process engine, or objectui unit) or unpinned. The triage ruling allows ~5-item slices and no new CI lane; the new files fall under the dogfood package's existing
isolatedvitest project and run where the dogfood legs run today.Tests
Measured answers the pins now hold (all first read live, then pinned exactly):
f_select→400 VALIDATION_FAILED[[f_select, invalid_option]]; noname→[[name, required]]; a fabricated id in each relational field →[[<field>, reference_not_found]]; row count unchanged each time.unique: true(tenant-scoped, composite index) →409 {error: 'A record with this value already exists', code: UNIQUE_VIOLATION, developerMessage: "Duplicate record refused on 'Unique Item': a unique constraint already holds these values. No record was written.", object};unique: 'global'(single column) →error: 'A record with this gsku already exists',field: 'gsku', and the developerMessage names'Global SKU'. No[driver-, noUNIQUE constraint failed, no bound value.updateManystamping one sku on two rows →200 {success: false, total: 2, succeeded: 0, failed: 2}, resultsROLLED_BACKthenUNIQUE_VIOLATION; both rows re-read unchanged.{total: 3, ok: 3, errors: 0, created: 3}; the filtered GET finds those 3, values identical.200; a client-sentamount: 1stores as2 × 29.99; total tracks the line sum after create, add and delete. A line with no product →400 VALIDATION_FAILED [[product, required]], and neither the invoice nor the valid sibling exists.task completed: <title>once per transition andproject over budget: <name> (1100 / 1000)on the spent-only PATCH. Scratch: abort →400with the hook's sentence; async throw → PATCH kept plus[hook] handler failed (onError=log; suppressing)naming the hook;int(record.name) > 0on a non-numeric name →400 VALIDATION_ERROR"Hook 'ohl_unevaluable_guard' could not evaluate its condition … operation aborted", no source echoed, no[REST] Unhandled error; priority 10 logs before 90 although declared after it.Runs
3c2187f4(the restarted branch) underos-verify-lock.sh, then the six files:Tests 21 passed | 2 failed (23), both in the unique file. The global index'serrornames the field (A record with this gsku already exists), and the atomicupdateManyanswers200with a per-row refusal report, not a 4xx. Both re-pinned to the measured bodies. Then the six files →Test Files 6 passed (6),Tests 23 passed (23), plus the dogfood typecheck, VERDICT command-exit 0.ea357b54(after mergingorigin/maine9e344a9, which brought an objectql engine refactor and metadata-protocol changes): the closure rebuilt (Tasks: 67 successful, 67 total), then the six files →Test Files 6 passed (6),Tests 23 passed (23), thenpnpm typecheckinpackages/qa/dogfood, one locked command, VERDICT command-exit 0.No ablation was run: this diff adds tests and changes no behaviour they pin. Each refusal assertion has a same-door admitted control beside it, and the two ordering/transition log pins are built so the wrong semantics would fail them (the priority hooks are declared in the opposite order; a bare state condition would log a second audit line).
Acceptance notes
field-unique-enforcementacceptance[0] says the user-facingerror"stays generic". On the tenant-scoped (composite) index it does; on the single-column global index the wireerrornames the field by its API key (A record with this gsku already exists) whiledeveloperMessagenames it by its label ('Global SKU'). The pin holds both bodies as measured. That is the opposite split from the engine envelope's own rule (labels in the user-facing message, API names for diagnostics, objectql: a unique refusal's user-facing sentence names the object by its API name ("Duplicate record refused on 'crm_account': …"), which a screen-flow user and a record-save user both read verbatim #24951), so it is noted here as a possible finding, not filed and not changed: product code is outside this card.field-unique-enforcementacceptance[3]: REST has no predicate-update door. The REST door that stamps one value onto two rows in one request isPOST /data/:object/updateManywithoptions.atomic, so the pin drives that, and the engine's predicateupdateManystays the memory driver pin's (named in the ref).master-detail-atomic-saveacceptance[1]: the product pick's auto-fill is client-side (the grid copiesdescription/unit_pricefrom the chosen product). The pin sends the catalog values and asserts they persist; the copy itself stays a browser leg.import-wizard-encoding-and-hintsacceptance[3]: the console decodes the file and posts JSON rows to/data/:object/import; the pin sends the decoded strings, so it scores the server half only.Verification
node scripts/check-platform-checklist.mjs→ exit 0,OK — 16 areas, 329 items (324 active, 1 planned), on the commite945fc15and on the final head.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack→ 55 commands one945fc15, each run and reconciled with--ran:55 derived famil(ies) accounted for — 55 run, 0 NOT-MEASURED, all exit 0.Dogfood Regression Gatedoes not run on pull_request, so the local runs above are this PR's evidence for the new pins.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (CI-owned run)main, one pull request.@objectstack/dogfoodis private;docs/qa/**ships in no package), soskip-changeset; both declaration lines are filled in above.packages/specnot touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code