Repository navigation
docs: pass the data-api docs to the docs standard - #89
Conversation
W5 review: FAIL at 081740aFresh W5 reviewer. I did not write this PR. I pushed nothing. Blocking
Checked and confirmed
Notes (non-blocking)
Could not confirmThe behaviour of an empty-set aggregate ( |
W5 review: #89, round 2PASS+NOTES at head 4ce9f79 (base campaign/integration 6293a02). Fresh W5 reviewer. I did not write this PR. I pushed nothing. Goal (Antony, 2026-10-30): finish the AntelopeJS docs rewrite on Round-1 blocker 1 (index loss): fixed and true
My own tsc probe against
Round-1 blocker 2 (read-only rule): fixed and true
My own runtime decorator-order probe (compiled from
Every row matches the new text. Round-1 notes: all fixed
Notes (non-blocking)
Gates
gate-verdict: PASS+NOTES 4ce9f79 |
Why
Goal: finish the AntelopeJS docs rewrite. Every TypeScript example compiles against its repo's own source, hand-written version prose is gone, and the W1-W5 docs standard ships. This is the W4 pass for interface-data-api (outer-loop#35, decision 11 item 5). It brings
README.mdanddocs/to the Docs standard, in the shape of AntelopeJS/dmspackages/dms/docs, and turns standard mode on so CI keeps them there.Summary
package.json "antelopeJs": { "test": ..., "skills": [...], + "docs": { "standard": true } } README.md, docs/*.md (12 files) + frontmatter title, description, mode (body H1 moved into title) ~ sentence-case headings, no dashes, unslop + technical-writing applied ~ claims checked against src/ and its TSDoc - `as ValueProxy<string>` and `as const` in examples ~ the computed aggregate example compiles (it hid a type error behind `fragment`) + README badges and the joined list SVG marked illustrationNo page was split, merged, renamed or moved, and no section, table row or example was dropped. Each docs page lost only its body H1, which moved into
title. Fence counts are unchanged. The first11.computed.mdexample is now checked instead offragment(examples 15 to 16). No screenshots, so nodocs/captures.ts.Modes: introduction tutorial, every other page reference.
Current contract (interface-data-api#86, interface-api#68)
The
DataControllersignature is the real generic one (tableClass: C,def: P,base: Base extends ControllerClass,src/index.ts:54-62). A guard'sthisis aDataControllerInstance, anobjectwith no string index, so the guard narrows it before reading a controller field (src/internal/controller-types.ts:7).currentisRowFields, whose values areunknown(src/index.ts:132-137). No page mentionsproto.Claims corrected against the source
newanswers the created row with its_idand without write-only fields, not "an array of inserted IDs" (src/index.ts:315-316).Non-existent Database SchemaorUnregistered Database Table(src/index.ts:69-75).@RegisterDataControllerapplies each route's parameter decorators, registers a prefix route and the handler. A field needs an access mode from@Access,@Joinedor@Computed.limitdefault is the route'smaxPage, else 10, capped atmaxPageor 100 (src/components.ts:169-171,src/index.ts:233-237). AnysortDirectionother thandescsorts ascending. A non-sortable key answersField is not sortable..{code, fields}body, other errors text (src/components.ts:473-477,519-521).indexreads through the index but updates by primary key (src/index.ts:340-357). That is a bug, drafted as an issue (below)."false"included.filter_<field>is documented.WithOptionsmerges options of a route it already wrapped.noMandatorystill runs them.@Optionalclears@Mandatory.@Foreignhas a sixth parametertargetMeta?: DataAPIMeta.noForeignis a string ongetand a boolean onlist.eq:prefix.useIndexdefaults to the index only for a single-field index.localKey.@Computedreturns aValueProxy, aQueryor a constant.options.defaultis aFieldValue. The aggregate example now counts withfilterandeq, becausegetAllrejects a row key without a type claim (issue draft below).@antelopejs/mongodbchangelog.Heading slugs
{#id}anchors are not used.joined#joined-vs-foreignbecame#joined-compared-with-foreign, andcomputed#computed-vs-joinedbecame#computed-compared-with-joined. No link in this repo, in antelope-web or in the AntelopeJS code search points at either.Evidence
checkDocsin standard mode, Vale 3.26.0):files=12 examples=15 failures=163.files=12 examples=16 failures=0.VALE_BINset: exit 0.pnpm run checkson 081740a withGITHUB_BASE_REF=campaign/integration:Checks: 8 passed, 0 failed.nuxt devinsites/interfaceswithINTERFACES_DOCS_LOCAL=data-api=<clone>. Every page answers 200,pages=11 links=46 anchored=12 broken=0, no page renders{#, and the renamed heading ids render.AntelopeJS/tooling-configs/actions/docs@dab0aea28840981138795aca32381e7fa8ac8d1binstalled Vale (standard mode on) and printedDocs: 12 files, 61 local links, 1 compatibility tables, 16 checked examples, 0 API pages; 0 failures.The PR is not docs-only in thedocs-onlyjob's sense, because thepackage.jsonopt-in is part of it. The docs delta allows that file for this change.Round 2 (W5 r1 FAIL at 081740a)
11.computed.mdnow says, after the count example, that thefilter/eqsubquery checks every device per row and does not use thegroup_idindex, and thatgetAll(row.key("_id"), "group_id")would, but compiles only with a cast today.10.joined.mdand11.computed.mdnow state the real rule.@Joinedand@Computedset read-only access when they run, and an@Accesswritten above them runs later and replaces it (setMode,src/metadata.ts:231-240), so do not combine them. Only the non-indexed sort holds whatever the decorator order (setSortable,:289). The comparison tables say "Read-only, unless a later@Accessreplaces it".7.foreign-keys.md:schemais needed only with a string table name or when the class metadata names no schema (src/internal/table-reference.ts:33-47).3.routes.md:noPluckskips the database pluck, and the response still holds only the fields readable inlist. A pluck mode that no field declares answers 400 (src/index.ts:225-229). The README install line lists every peer interface (package.jsonpeerDependencies).pnpm run checksfailed twice on port 5010, which another agent'sajs project runheld. With the port free it givesChecks: 8 passed, 0 failed.VALE_BINset exits 0, the standard lever givesfailures=0, andpnpm run checkswithGITHUB_BASE_REF=campaign/integrationgivesChecks: 8 passed, 0 failed.actions/docs@dab0aeainstalled Vale and printedDocs: 12 files, 61 local links, 1 compatibility tables, 16 checked examples, 0 API pages; 0 failures.Merge danger
Door: two-way. Docs and one package.json key. A revert restores the old pages and turns standard mode off.
Blast radius: docs. From here on, every interface-data-api PR that touches README.md or
docs/must pass Vale and the standard checks in CI.Attention
interface-data-api-edit-index-updates-primary-key(Edit withindexwrites by primary key and answers 200 with the unchanged row) andinterface-database-getall-rejects-typed-row-key(getAll'sIndexKeysrejects aValueProxyrow key, so the repo's own tests use.cast<...>()).filterwitheqwhere the old text used thegroup_idindex throughgetAll. The count is the same. The page itself now says the filter does not use the index.Content-Typeof validator 400 answers, the 500 for a failing database operation, aggregates yieldingnullover an empty set, MongoDB's$lookuptranslation, andnullfor a missing foreign record on the list path.