Repository navigation
test(objectql): sweep the dataset type, judged in a tenant that declares its object - #19857
Conversation
…res its object The metadata-validation sweep printed `dataset: no fixture (skipped)`. Adding the fixture alone is refused `object-reference-unknown` on `datasets.sweep_account_metrics.object`, because the harness universe held a dataset but never the object it is over. Seed the object beside the dataset, both cloned from their own `valid` fixtures, and add the `dataset` fixture. The invalid leg now also asserts that the 422 is the schema's own refusal, naming the fixture's `invalidatedField`. The author-time gate throws the same envelope, so the envelope alone could not tell the two doors apart. The `skill` label moves from `description` (optional) to `tools`, the field the schema actually refuses. Claude-Session: https://claude.ai/code/session_01TEhopqrWQYBycZzyJHpAZr Co-authored-by: Claude <noreply@anthropic.com>
The seeds read `FIXTURES.object.valid` / `FIXTURES.dataset.valid`, so removing the `dataset` fixture crashed every row on the missing key instead of bringing its `no fixture (skipped)` note back. The two tenant documents are now named constants that both `makeProtocol` (as clones) and their own rows use. Claude-Session: https://claude.ai/code/session_01TEhopqrWQYBycZzyJHpAZr Co-authored-by: Claude <noreply@anthropic.com>
📓 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): |
|
Fixes #19586 · one row, not the pattern: measured, no other harness in
packages/objectql/srcpays an empty-universe cost today (census below), and no shared seed could serve them, because each harness's universe is whatever its own fixtures name.Clause-②: no
What changed
One file:
packages/objectql/src/metadata-validation-sweep.test.ts, test-only.datasetrow is filled. It used to printdataset yes - - no fixture (skipped). It now readsdataset yes ok ok: a valid dataset is accepted and an invalid one is rejected.makeProtocolalready seededsweep_account_metrics(added for thereportdoor in [rebuild of #19474] spec(lint): wire the inert runtime-create rules foraction/hook/report/skill/email_template/mapping— six types, one edit (ruling #203/4 group A+C) #19542). It now also registerssweep_accountthroughregistry.registerObject, which the gate reads throughlistItems('object'). Without it the dataset fixture is refusedobject-reference-unknown, the wall [rebuild of #19474] spec(lint): wire the inert runtime-create rules foraction/hook/report/skill/email_template/mapping— six types, one edit (ruling #203/4 group A+C) #19542's dev hit and reverted.SWEEP_ACCOUNTandSWEEP_ACCOUNT_METRICSare named constants.makeProtocolseeds clones of them, and theobject/datasetrows publish them as theirvaliddocuments, so the seeds cannot drift from the rows. They are deliberately not read out ofFIXTURES: that spelling made removing thedatasetfixture crash every row on the missing key, where the skip note should come back.INVALID_METADATA, 422,issues[]), so the old check could not tell them apart. A refusal now counts only when it has no gateruleand a schema issue names the fixture'sinvalidatedField. Gate issues always carryruleand a stack-rooted path (datasets.NAME.object).skillrow'sinvalidatedFieldis nowtools, notdescription. Measured: the schema's only issue on that payload is attools, anddescriptionis optional. This relabel is the one row the new assertion forced.reportcomment "the bound dataset is the fixture directly above" was false onmain: it landed in spec(lint): wire the six inert runtime-create doors — action / hook / report / skill / email_template / mapping #19517 while the fixture it named was reverted. It is true again.One row or the pattern: the census (at
afc3b6492)packages/objectql/srcreferenceObjectStackProtocolImplementation/saveMetaItem. 9 of them both callsaveMetaItemand carry an empty-universe mock (findresolving[],listItems: () => []).overlay-precedence,protocol-commit-history,protocol-destructive,protocol-lock-enforcement,protocol-meta-types-rich,protocol-meta,protocol-publish-package-drafts,protocol-registry-shadow) run 202/202 green with 0authoring advisorylines and 0*-unknown/*-unresolvedrule ids. Control: the same log carries 19 other[Protocol]warn lines from the samedist, so an advisory would have shown.approval-expression-no-empty-policyx4,flow-multi-write-unfilteredx3, both body-shape rules), and 0*-unknown/*-unresolvedids.packages/restharnesses belong todomain:cliand are listed, not edited. Five carry the same mock spelling and drivesaveMetaItem:meta-compound-save-force-parity,meta-compound-save-mode-parity,public-form-lookup-filter-lowering,public-form-lookup-picker,public-form-routes.stored-row. The two spec(lint): wire the six inert runtime-create doors — action / hook / report / skill / email_template / mapping #19517 already seeded arerest-server-meta-history-diff-org-scopeandrest-server-meta-read-org-scope.Evidence
All at
b244ec482dunless marked.afc3b6492:dataset yes - - no fixture (skipped).dataset yes fail ok valid: INVALID_METADATA: dataset/sweep_account_metrics failed author-time validation: 1 issue — datasets.sweep_account_metrics.object [object-reference-unknown].ok ok. The invalid dataset's issues are exactly[{"path":"measures","message":"Invalid input: expected array, received undefined","code":"invalid_type"}], from the schema, norule.datasetfixture, and the skip note comes back. Run throughscripts/ablation-replace.mjs --delete(WRAP mode, restore trap). Anchor 1 to 0, bloba9f40f14c53eto3ff6f86a0252. Row:dataset yes - - no fixture (skipped);object/reportstillok ok. Restored: blob equals HEADa9f40f14c53e,git diff HEADempty.dataset yes ok fail invalid: 422 is not the schema refusing \object`: [{"rule":"object-reference-unknown",...}]`, exit 1.dataset yes ok ok, exit 0, a false pass.git diff HEADempty.pnpm --filter @objectstack/objectql exec vitest run --project local --maxWorkers=2: 304 files / 5072 tests passed, exit 0.pnpm --filter @objectstack/objectql typecheck: exit 0.check:test-typecheckOK (40 files / 234 errors, all in its ledger). This file is intsconfig.test.json's program (--listFiles), has 0 error lines, and has no ledger entry.node scripts/pm/dispatch-gates.mjs --commands(no paths) derived 54 commands, and all 54 exit 0. Two first answered exit 3PREREQUISITE NOT MET(check:dual-build-cjs-loads,check:type-check-debt); both went green afterturbo run build --filter='./packages/*' --filter='./packages/*/*'(72/72). The dist sweeps were rerun at full population.--ran: 54 derived, 54 run, 0 NOT-MEASURED, 0 UNRUN, exit 0.node scripts/check-issue-citations.mjs: exit 0,no issue citations added ... (0 file(s) read). Test files are that gate's declared deferred surface, so this is not a clearance of the new citations. The two new targets were checked by hand: [finding] a runtime-createddatasetreaches ZERO author-time rules — the type declaresallowRuntimeCreate: truewhile nothing declares it inruntimeTypesandTYPE_TO_STACK_KEYhas no row #19143 answers 200 (closed, completed) and [finding] the objectql metadata sweep skipsdatasetfor want of a fixture, and adding one reds on a pre-existing empty-universe condition — the harness models a tenant with nothing in it #19586 answers 200.--no-inline-config --format json: 1 file, 0 errors, 0 warnings. The file's resolved config (--print-config) has noparserOptions.project/projectService, so linting is not type-aware and the edit cannot move a verdict on any untouched file. The repo-widepnpm lintis CI's.skip-changeset, measured:@objectstack/objectqlshipsfiles: [dist, README.md, CHANGELOG.md]. Five symbols unique to this diff (SWEEP_ACCOUNT_METRICS,invalidatedField,sweep_account_metrics,metadata-validation-sweep, the new note text) hit 0 files there, while the controlclass SchemaRegistryhits 2.Bounded in-place fix, declared
The generic invalid-leg assertion and the
skillrelabel go beyond the one row. All four conditions hold:skillwas a live instance of a row refused for a reason other than the one it names.Acceptance notes (not filed)
no fixture (skipped):book,datasource,doc,external_catalog,mapping,position,seed. Each is its own fixture, with its own universe to measure first. Triage graded this shape as a coverage gap, not a finding.FIXTURESentries are never executed, because their types are notallowRuntimeCreate:field,validation,approval,job,profile,role,agent. That is the failure mode this file's ownapinote describes ("looking like coverage while asserting nothing"). Dead code, noted only.Generated by Claude Code