Repository navigation
docs(qa): name the strict:false door for the os lint arm of cli.validate-v18-authoring-verdicts - #33929
Merged
Conversation
…ate-v18-authoring-verdicts
The default strict defineStack parse defaults an omitted master_detail
required to false before os lint loads the stack, so the rule cannot see
the omission there. steps[2] and acceptance[3] now plant the arm on
defineStack(..., { strict: false }), driven live at 895783a.
Claude-Session: https://claude.ai/code/session_01ADHkmSRCsvCKhGiYG2hMQY
Co-authored-by: Claude <noreply@anthropic.com>
…erdicts at its PR Claude-Session: https://claude.ai/code/session_01ADHkmSRCsvCKhGiYG2hMQY Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z 席位核对 · ACCEPT · head
|
This was referenced Nov 15, 2026
This was referenced Nov 15, 2026
scbdzhwl
pushed a commit
to scbdzhwl/objectstack-analysis
that referenced
this pull request
Nov 16, 2026
…cipe in platform-core and cli (objectstack-ai#34004) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9B6gStEwzhNnXcvLnqyJAFR)_ Fixes objectstack-ai#33965 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:平台测试清单里 19 个条目和 1 个测试数据配方的文字(platform-core 10 个、cli 9 个,外加 cli-18-prerelease-db 配方),每个条目 revision +1 并加一行 history。 - 为什么改:18.5.0 发版测试时跑手按原文走不通或读错的地方(锚卡 objectstack-ai#33761 账本批次 C),比如种子行数已从 138 变成 141、`os dev` 不再打印所有权拒绝而是自动升级、恢复脚本已会重新标日期,不改下一轮跑手会重复踩坑。 - 风险与回滚:只动 docs/qa 下两个 JSON 文本,不动产品代码;回滚就是 revert 本 PR。 - 先看:cli.json 的 organization-ownership-ceremony acceptance[5].verify(判据从「计数相等」改为「旧行按 id 都在」,改动最实质)、cli.json 的 cli-18-prerelease-db 配方 knownGaps[4]、platform-core.json 的 activation-ledger-package-key-upgrade fixtures。 - 两分钟验证:`pnpm check:platform-checklist`,预期最后一行 `check-platform-checklist: OK — 16 areas, 429 items`。 - 需要你做的:无,席位落地。 ## What changes Batch C of the v18.5.0 close-out ledger (comment 6896511848 on objectstack-ai#33761): the item-text re-point rows for `platform-core.json` and `cli.json`, with the `cli-18-prerelease-db` recipe. The card's 28 rows cover 19 items and the recipe; a row repeated across rounds is one edit. Each row was re-read at `origin/main` `0ac112fc` (PRs objectstack-ai#33931 and objectstack-ai#33929 in, and neither of their items touched) and the edit starts from the residue measured there, not the parked wording. No acceptance `clause` was weakened; three were corrected or extended (rows 4, 36, 199). Every edited item has `revision` +1 and one `history` row with ref `#PENDING-33965`, replaced by this PR's number in a second commit. The recipe carries no revision of its own, so its change is recorded in `cli.organization-ownership-ceremony`'s history, the item that scores on it (as revision 6 did). The area files were edited as text spans by a script and never re-serialised. | Ledger row(s) | Item | Clause edited | What changed, and the reading behind it | |:--|:--|:--|:--| | 1, 183 | platform-core.seed-integrity | steps[1], steps[4] | Baseline 138 rows / invoice_line=7 → 141 / 10. Measured at `0ac112fc` by importing `ShowcaseSeedData` and summing each records array: 20 datasets, 141 rows, `showcase_invoice_line=10`; every other count unchanged. steps[4]'s banner example follows | | 4, 185 | platform-core.v18-boot-refusals | acceptance[1].clause, .verify | The `--dev` spelling is printed by a standalone `os serve --dev` only. Under `os dev`, the refused `serve --dev` child sends the refusal to its parent over IPC and exits without printing it (`serve.ts` `announceOrganizationOwnershipRequired`), and `os dev` copies the DB and runs the ceremony itself (`dev.ts` `upgradeRefusedDevelopmentDatabase`, ADR-0131 D10). The pinned spelling is unchanged | | 5 | cli-18-prerelease-db (recipe) | knownGaps[4], sequence[0].expect | "the restore does not re-date shards" is false: `cli-prerelease-fixture.ts` `restore` runs `dumpAsOf` → `fixture-as-of.ts` `shardRenamesAsOf`, renaming each rotation shard to the day before the run and printing a `re-dated shard` line per shard. QA run objectstack-ai#33784 read `sys_activity__r20261114`, 66 rows, after the refused boot | | 6, 186 (and 5's consequence) | cli.organization-ownership-ceremony | acceptance[5].verify | (1) "count after equals count before, less what moved" left no room for the rows this release's own second boot adds (invoice_line 5→10, sys_seed_landed_key 0→141, …); the oracle is now that every pre-existing id survives unless the report moved or deleted it, and a count may grow. (2) The sys_activity dropped-shard carve-out is retired, since the restore now re-dates the shard (row 5) | | 8 | platform-core.builtin-apps-nav-render | steps[3] | "open a user from Users" lands on a side panel (`?recordId=`); the step names the record URL `/_console/apps/setup/sys_user/record/ID`, where the `sys_user_detail` page carries the Preferences and Linked Accounts tabs | | 36 | cli.migrate-duplicates-inventory | fixtures.requires[1], steps[1], acceptance[3].clause | (1) A NULL-organization row cannot be seeded: a table this release creates holds its tenant column NOT NULL (ADR-0131 D1, `sql-driver-column-creation.ts` `tenantColumn`); the duplicate is held by two organizations, which is the report's own question. (2) acceptance[3] said three pre-flight entries; `runtimeIndexProbes` lists seven from six migrations at `0ac112fc`, now named, with "read the count off the list" | | 37 | cli.migrate-plan-apply-json | steps[8] | meta's dry run is `os migrate meta --from PREV --json`: `--from` is required without `--stored`, and a bare `--json` exits 1 `missing_from_major` (`meta.ts`) | | 42 | cli.meta-package-flags-and-explain | steps[0] | The ViewItem body carries `viewKind: 'list'` and a `config`. Probed against the built `ViewItemSchema` at `0ac112fc`: without `viewKind` → "Invalid discriminator value. Expected 'list' \| 'form'"; the example body parses | | 44, 194 | cli.dev-automigrate-policy | fixtures.knownGaps (new [2]) | The schemaMode half of acceptance[3] cannot be staged: a non-managed datasource is refused DDL at `assertSchemaMutable` before `reconcileAndWarnDrift` runs, so no boot reaches `autoOn` with another schemaMode; that half is read from source, as both rounds did | | 47 | cli.lint-severity-exit-contract | fixtures.requires[0] | A camelCase object or field name is refused by `ObjectSchema` at load (probed: name pattern; "Invalid key in record" for a field key), so the error finding is the missing label; the i18n fold needs a second declared locale, since coverage is judged only against the stack's locales | | 48, 199 | cli.doctor-deprecation-scan | steps[5], acceptance[3].clause | `os codemod --help` prints "Command codemod not found." (`@oclif/core` help module); the clause names the full scan boundary: `src/` only, names ending `.ts` minus `.test.ts`, so `.tsx` is skipped while `.spec.ts` and `.d.ts` are read, comments included (`scanDeprecatedPatterns`, `walkDir`) | | 89 | cli.address-grammar-reserved-names | fixtures.requires[0] | Every hand-written scratch app declares `sharingModel`; without it the error-severity `security-owd-unset` finding stops validate/build before the namespace verdict | | 90, 216 | cli.scaffold-console-first-paint | acceptance[3].verify | "a blank scaffold ships no app" is stale: the blank template ships `src/apps/main.app.ts` (app Main, a Notes entry), so the nav half is drivable; the action half stays a stated limit (`src/actions/index.ts` exports nothing) | | 106, 218 | platform-core.activation-ledger-package-key-upgrade | fixtures.requires[0], requires[1] | Route (b) puts sys_metadata_activation's indexes back to 18.3.0's: drop the package-less index AND this release's `uniq_sys_metadata_activation_metadata_type_package_id_name`, recreate `uniq_sys_metadata_activation_metadata_type_name` on (metadata_type, name). Dropping the package-less index alone leaves no `replace_unique_index` to plan. requires[1] drops the recreated index too; the two-holder name names the `composeStacks` scratch app the runs used | | 108 | platform-core.docs-portal-render | steps[3] | With one book, `AppDocsIndex` renders no listing and navigates into that book's reader (`AppDocsIndex.tsx`, `cards.length === 1`); the listing is read off the reader's book sidebar | | 110 | platform-core.marketplace-console-honesty | fixtures.requires[2] | install-local's ledger follows `OS_HOME` (`OS_HOME/installed-packages`) and falls back to the working directory only without it (`local-manifest-source.ts` `resolveInstalledPackagesDir`); the text said OS_HOME does not redirect it. The scratch-copy rule stands | | 122 | platform-core.protocol-18-handshake-and-stored-replay | steps[2], acceptance[3].verify | A `--artifact COPY` boots alone (`artifact-precedence.ts` `cwdConfigJoinsBoot`), so the showcase copy loses its code plugins and aborts after the conversion warns; the clause is read from those warns, and a serving boot needs an app with no code-plugin connector (`examples/app-todo`) | | 123 | platform-core.stored-reference-package-backfill-upgrade | fixtures.requires[0] | The activation-ledger index plant is removed from this item's route (b): no row here is a ledger row and no clause reads that table. Route (a) not driven is run scope, not item text | | 124, 125 | platform-core.notification-center | source[4], fixtures.requires[0] | `{"ids":[]}` is valid (`MarkNotificationsReadRequestSchema` takes any string array) and answers 200 readCount 0; a body without `ids` is the 400. The stock-seed-only fixture cannot drive acceptance[4] (one topic, nothing left for mark-all-read), so acceptance[4] needs the digest flood | | 214 | platform-core.keyboard-shortcut-surface | steps[2] | The typed search term persists as `uf__search` across reloads in one browser context; clear it or use a fresh context per probe set | Every row of the card was edited; none was already right at the base, and none moved to another carrier. Forced test changes: none. ## Tests No code changed. `pnpm check:platform-checklist` and the 16 gate families `node scripts/pm/dispatch-gates.mjs --commands` derives for this diff were run on the merged head; each exited 0, and `--ran` reconciles 16 derived, 16 run, 0 NOT-MEASURED. The commands and exit codes are in the os-dev-report comment on objectstack-ai#33965. ## Acceptance notes - `cli.lint-severity-exit-contract` acceptance[2] lists lint's `--json` keys without `strict`, `failing` and `conversions`, which the payload now carries (QA run objectstack-ai#33829). That residue was in the QA record but not on this card's ledger rows, so it is not edited here. - `packages/cli/src/commands/migrate/duplicates.ts`'s docblock still calls the pre-flight "four fixed platform indexes" (seven at this base). It is code, outside this card's file surface. - Structural proof: the span editor parsed each area file before and after, applied the declared edits to the parsed `origin/main` document, and asserted the result equals the edited file's parse. Every non-edited item is value-equal; each edited item changes only the fields in the table plus `revision` and one appended `history` row. ## Verification - `pnpm check:platform-checklist` → `check-platform-checklist: OK — 16 areas, 429 items (421 active, 3 planned)`. --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmSRMKC6zBNQF7KazbL)_ <!-- signed: domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z --> --------- Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl
pushed a commit
to scbdzhwl/objectstack-analysis
that referenced
this pull request
Nov 16, 2026
…ss-security, api-backend, approvals, ai, attachments-storage, dashboards) (objectstack-ai#34016) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9TTF1z3CcGg2atxzEGqXsh6)_ Fixes objectstack-ai#33967 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:平台测试清单 7 个 area 文件里 27 个条目的步骤/夹具/核对文字(批次 E 的 26 个条目,加 objectstack-ai#33968 交回的 1 个 SSO 条目),每条 revision +1 并加一行 history。 - 为什么改:18.5.0 发版测试时跑手按原文走不通或读错的地方(锚卡 objectstack-ai#33761 账本批次 E),不改的话下一轮跑手会重复踩坑。 - 风险与回滚:只动 docs/qa 下 7 个 JSON 文本,不动产品代码;回滚就是 revert 本 PR。 - 先看:api-backend.json 的 automation-namespace-address(flow 改为按命名空间一个持有者后整段改写)、identity-auth.json 的 SSO 三条(本地 IdP 何时才需要 OS_TRUSTED_ORIGINS)、dashboards.json 的 cube-query(缺席分支没有现成入口)。 - 两分钟验证:`pnpm check:platform-checklist`,预期最后一行 `check-platform-checklist: OK — 16 areas, 429 items`。 - 需要你做的:无,席位落地。 ## What changes Batch E of the v18.5.0 close-out ledger (comment 6896511848 on objectstack-ai#33761): the item-text re-point rows for `identity-auth.json`, `access-security.json`, `api-backend.json`, `approvals.json`, `ai.json`, `attachments-storage.json` and `dashboards.json`, 31 rows over 26 items, plus the two out-of-scope lines the runner-kit card objectstack-ai#33968 handed back (report 6897030673). Every row was re-read at `origin/main` (the branch starts at `bc6b7ffd`; no area file changed between the ledger's `895783a1` and it except by the carriers objectstack-ai#33936, objectstack-ai#33929, objectstack-ai#33931 and objectstack-ai#33981, none of which touches these items) and each edit starts from the residue measured there. Every edited item has `revision` +1 and one `history` row. The area files were edited as text spans by a script and never re-serialised. One clause (acceptance `clause`) changed wording without changing what it requires: `identity-auth.workspace-org-switch` acceptance[3] now says "a role-neutral /meta read"; every other edit is steps, fixtures, verify, negative or automated text. | Ledger row(s) | Item | Clause edited | What changed | |:--|:--|:--|:--| | 2, 184 | api-backend.query-contract-matrix | acceptance[8].verify | States the count: 30 rows, the 22 `op:*` variants (both spellings each) and the 8 `param:*` rows, as `variants` lists them. Rows 2 and 184 are one edit | | 3 | access-security.rls-both-sides | acceptance[4].verify | QA read `showcase_invoice` adopted too and `showcase_invoice_line` no longer adopted; the verify now says to read the adopted set from the report lines, not from a list. `summary.holes` must still be 0 | | 19 | api-backend.action-activation-door-contract | automated.ref | The 4-segment 404 is `ROUTE_NOT_FOUND` (the pin's assertion, `action-activation-door-live.dogfood.test.ts`), not byte-identical to an unmounted path, which answers `ENDPOINT_NOT_FOUND` (`plugin-hono-server` `adapter.ts`). The test file's own header comment says the same stale thing; it is code and is not edited here | | 20 | api-backend.client-sdk-namespace-address | fixtures.knownGaps[0] | The bare `/actions` 409 with candidates is reachable live with the family's two-package action fixture (`api-backend.actions-namespace-address`); the gap now says this item's fixture does not stage it and names the one that does | | 21 | api-backend.actions-namespace-address | fixtures.requires[0] | qa_b's stack is `defineStack(…, { strict: false })`: the strict parse refuses a standalone action whose `objectName` is not in its own stack ("Action 'escalate' references object 'qa_a_ticket' which is not defined in objects.", `packages/spec/src/stack.zod.ts`) | | 23 | ai.mcp-namespace-faces | fixtures.requires[0], automated.ref | Adds a third scratch package qa_c whose standalone `escalate` on `qa_a_ticket` derives qa_a's face `qa_a_ticket-escalate` (OBJECT-ACTION, `face-name.ts` `deriveAiFaceName`), so negative[2] is drivable live; a namespace named after the object is refused at install (ADR-0150 D6) | | 24 | access-security.permission-set-address-in-execution-context | fixtures.requires[2] | The qa_a_ticket record is owned by M (`owner_id`); on a private scratch object an admin-owned row reads 0 rows for M | | 25 | access-security.record-view-read-audit | steps[0] | The audit read uses the JSON filter form `$filter={"action":"read"}` (or the AST); OData text answers 400 `INVALID_FILTER` (the normalizer parses `$filter` as JSON, `protocol-data-crud.ts`) | | 27 | attachments-storage.orphan-tombstone-reap | steps[1] | A restart sweeps at the first tick only when `sys_lifecycle_state` row `lifecycle` `last_swept_at` is older than one interval (1 h) (`lifecycle-service.ts` `runFirstScheduledSweep`, objectstack-ai#29918); the step ages it before each restart | | 28 | attachments-storage.upload-session-abort | steps[3] | The sweep leg names the same watermark rule | | 29 | dashboards.analytics-exposure-gate-and-measure-aggregate | steps[1] | The filter key is `where`; `filters` is refused 400 naming `where` | | 30 | identity-auth.idp-group-permission-set-mapping | fixtures.requires[1] | Leave `OS_SSO_DOMAIN_VERIFICATION` unset (opt-in, ADR-0135 D6); with it true SSO sign-in is refused "Provider domain has not been verified" | | 32 | identity-auth.auth-gate-held-session-raw-host-families | fixtures.requires[1] | Warns that saving `mfa_required=everyone` with grace 0 also holds the admin who saved it | | 45 | api-backend.route-ledger-live-parity | title, fixtures.requires[1], steps[3] | SEVENTEEN ledgers, not sixteen: `packages/services/service-storage/src/attachment-removal-route-ledger.ts` (one row, `DELETE /api/v1/attachments/:id`). steps[3] samples it with an unknown id, which the own-row door answers 404 `RECORD_NOT_FOUND` (`own-row-delete-routes.ts`), never with a real id | | 46 | access-security.share-link-capability-tokens | steps[6] | The record-gone leg deletes the brief as the admin; the minter persona gets 403 | | 58, 193 | api-backend.automation-namespace-address | fixtures.knownGaps[0], negative[3] | Since objectstack-ai#31696 flow (and connector) is one holder per namespace (`NAMESPACE_SCOPED_BARE_NAME_TYPES`, read at the base), so a second namespace's holder installs; each namespaced address serves its own holder, and only the bare path, `_env` and a third namespace answer 409 naming both (QA run objectstack-ai#33910). The disabled-holder cases still rest on the runtime unit pins, named. Rows 58 and 193 are one edit | | 66 | dashboards.cube-query | steps[0] | `analytics` is on `PLATFORM_ALWAYS_ON_CAPABILITIES`, mounted on every served boot unless `--preset minimal` (`capability-composition.ts` `resolveServedCapabilities`), so the absent-slot arm has no stock door; a run without a minimal-preset boot records it skipped with that reason. Whether the showcase boots under `--preset minimal` was not measured | | 67 | access-security.security-catalog-one-holder-and-boot-report | acceptance[1].verify, fixtures.requires[1] | A permission set holds one name per namespace (`security-catalog-namespace.ts`, ADR-0150 D2/D9), so the conflicting manifest declares no namespace or the holder's; with its own namespace the 422 names only the position | | 68 | approvals.record-page-decisions | steps[9] | Click the name text in the New approver option row (the row also carries a mailto link and a copy button) | | 69 | approvals.request-page-reply-and-reader-visibility | acceptance[2].verify | The external member for the 403 leg is mintable on a stock boot: `invite-member` with role `external`, sign-up with `invitationId`, `accept-invitation` (both routes in `auth-route-ledger.ts`), replacing "record that leg not exercised" | | 71 | dashboards.global-filters-rescope | fixtures.requires[2] | The scratch package body is `{id, name, version: '0.1.0', type: 'app'}` (`label` is refused by the strict manifest); a scratch dashboard gives its account widgets a `filterBindings` before the first save, else 422 `dashboard-filter-field-unknown` | | 92, 94 | identity-auth.auth-method-matrix | fixtures.requires[0], steps[3] | The generic OIDC variant has no env switch: read it on `identity-auth.linked-accounts-social`'s scratch-copy OIDC boot (row 92). The PROD leg is `objectstack serve` with `OS_DATABASE_URL`, `OS_AUTH_SECRET` and `OS_SECRET_KEY` (row 94) | | 95, 96 | identity-auth.console-two-factor-prompt-phone-doors | acceptance[3].verify, fixtures.requires[2] | The rendered wrong-password text has no period; the period-ended literal is `ui/packages/auth/src/createAuthClient.ts`'s no-token fallback (row 95). Read the code from the log line's `body:` field; a six-digit grep catches the `dev-sms-EPOCHMS-N` messageId digits (`sms-service.ts`) (row 96) | | 97, 98 | identity-auth.linked-accounts-social | fixtures.requires[1], steps[5] | The IdP test identity carries the caller's email (else `error=email_does_not_match`) (row 97). The data door serves no aggregate route at the base (no `/aggregate` route in the REST or runtime source): GET answers 404 `RECORD_NOT_FOUND`, POST 405; the stale "bare aggregate 400" is dropped (row 98) | | 104 | identity-auth.sso-enforced-first-paint | fixtures.requires[1] | Not a bespoke-env item: a stock showcase with `OS_SSO_ENABLED`, `OS_AUTH_SSO_ONLY` and a runtime-registered provider satisfies it | | 105 | identity-auth.workspace-org-switch | acceptance[3].clause, acceptance[3].verify | Names a role-neutral `/meta` read (`/meta/object/showcase_task`); `/meta/app` filters apps by the caller's per-org grade. The clause still requires deployment-level metadata | | found while doing objectstack-ai#33967, source objectstack-ai#33968 report 6897030673 (line 1) | identity-auth.sso-provider-groups-claim, plus the same wording in identity-auth.idp-group-permission-set-mapping fixtures.requires[1] and identity-auth.auth-method-matrix fixtures.requires[2] | fixtures.requires[0] | A dev boot (`os dev`) already trusts `http://localhost:*` (`packages/cli/src/commands/serve.ts` adds it when the boot is a dev boot; `@better-auth/sso`'s `validateOIDCEndpointUrl` skips a trusted origin), so `OS_TRUSTED_ORIGINS` is needed only on a production boot or another private origin. PR objectstack-ai#33997 (`qa-fixture.mjs oidc-stub`) is not merged at the base, so no item cites the script | | found while doing objectstack-ai#33967, source objectstack-ai#33968 report 6897030673 (line 2) | api-backend.actions-namespace-address, api-backend.automation-namespace-address | negative[2]; fixtures.knownGaps[0] | Where the item removes an installed package (actions negative[2]) or names why one cannot be removed (automation knownGaps[0]), it names `DELETE /api/v1/marketplace/install-local/MANIFEST_ID`; `DELETE /api/v1/packages/ID` answers 422 `WRITABLE_PACKAGE_REQUIRED`. `api-backend.client-sdk-namespace-address` has no removal step, so nothing is added there | No row was already right at the base, and none moved to another carrier. Forced test changes: none. ## Tests No code changed. `pnpm check:platform-checklist` and the gate families `node scripts/pm/dispatch-gates.mjs --commands` derives for this diff were run on the final head; the commands, exit codes and the `--ran` reconciliation are in the os-dev-report comment on objectstack-ai#33967. ## Acceptance notes - Structural proof: the span editor asserted, per area file, that the new document equals the old one plus the declared operations (value-equal), that every other item is value-equal, and that the text outside the edited items is byte-identical. - Not on this card's rows, noted only: `access-security.permission-set-address-in-execution-context` fixtures.knownGaps[0] still says two packages each shipping `qa_a_reader` is not reachable through install, but a permission set has been one name per namespace since ADR-0150 D2/D9 (`security-catalog-namespace.ts`), so two namespaces can now each hold it; and the header comment of `packages/qa/dogfood/test/action-activation-door-live.dogfood.test.ts` (line 19) still says "byte-identical to an unmounted path" while its own assertion reads `ROUTE_NOT_FOUND`. - QA readings the edits rest on and that were not re-driven live here: rows 3, 32, 46, 68, 69, 92, 94, 95, 97, 104 and 105 (each names its QA run); the source half of each was re-read at the base. ## Verification - `pnpm check:platform-checklist` → `check-platform-checklist: OK — 16 areas, 429 items (421 active, 3 planned)`. --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmRzWLM3UvUUerHXiy9)_ <!-- signed: domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z --> --------- Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl
pushed a commit
to scbdzhwl/objectstack-analysis
that referenced
this pull request
Nov 16, 2026
… default defineStack door (objectstack-ai#34020) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9CZHtkC74Ydb9at95QTnivt)_ Fixes objectstack-ai#33940 Clause-②: yes Metadata-protocol: none ## 维护者速读 - 改了什么:默认(strict)`defineStack` 解析时,如果作者在 `controlled_by_parent` 对象的 `master_detail` 上没写 `required`,spec 会在解析后的字段上悄悄记一笔“作者省略了”;`os lint` 的 `relationship/master-detail-required` 读这笔记录,在默认写法下也报 error。 - 为什么改:裁决 A(objectstack-ai#30905,记录 6687830530)放行可选主字段,同时承诺 `os lint` 对省略写法报错;但默认 strict 解析先把省略填成 false,lint 永远看不到,迁移说明那句话在最常见的写法下是假的。 - 风险与回滚:解析结果不变(仍是 `required: false`,可选主字段),栈照常加载,`os validate` / `os build` 不变;只是 `os lint` 在这一种写法上多报一条 error。回滚即 revert 本 PR。 - 先看:`packages/spec/src/data/master-detail-required-omission.ts`(记录与读取),`packages/spec/src/stack.zod.ts` 中 `recordMasterDetailRequiredOmissions` 的调用,`packages/lint/src/data-model-rules.ts` 中 `optionalMaster` 那一行。 - 两分钟验证:在示例应用副本的默认 `defineStack({ … })` 里加一个 cbp 对象,唯一的 master_detail 不写 required,跑 `os lint --json`:应 exit 1,报 relationship/master-detail-required 在 `.required`;改成 `required: false` 后应 exit 0。 - 需要你做的:无,席位落地。 ## What changes - **`@objectstack/spec`** — new module `src/data/master-detail-required-omission.ts`. After a strict `defineStack` parse succeeds, `recordMasterDetailRequiredOmissions(normalized.objects, data.objects)` stamps a non-enumerable, non-writable `Symbol.for('objectstack.field.masterDetailRequiredOmitted')` on each parsed `master_detail` field of a `controlled_by_parent` object whose authored definition writes no `required`. The one published reader is `masterDetailRequiredOmitted(field)` (`@objectstack/spec/data`); the stamp is internal (not re-exported), mirroring `stack-provenance.ts`. The parsed value is untouched (`required: false`), so the ruled reading (option A: the omission is admitted as the optional master) holds at every runtime reader, and nothing refuses the stack. - **`@objectstack/lint`** — `cbpMasterReferenceFinding` (R2) treats a sole `master_detail` as the optional master only when `required === false` AND the field does not carry the record. On the default door the omitted spelling now gets the same finding, path and fix it already got on `{ strict: false }` and on a raw config. - **Why on the field, not the stack:** `loadConfig` (`packages/cli/src/utils/config.ts`) spreads the default export into a new object, which drops a stack-level symbol (that is why it reads `stackConversionsOf` before the spread). The `objects` array and each field reach `lintDataModel` by reference, so a field-level record needs no `packages/cli` change and no second load of the user's module. Measured: `composeStacks` (error / override / merge) keeps the record on the composed field too. - Regenerated: `packages/spec/api-surface/data.json`, `packages/spec/export-origins/data.json` (one added export each). - **Fix of text this change made false:** `docs/qa/platform-checklist/areas/cli.json`, item `cli.validate-v18-authoring-verdicts`. Revision 4 (PR objectstack-ai#33929, merged into main while this card was in flight) moved the item's `os lint` arm to `{ strict: false }` and said the default strict door gives `os lint` exit 0 with no finding. That is no longer true, so revision 6 (stacked on main's revision 5, PR objectstack-ai#34068, which only adds `--reporter=tree` to acceptance[0].verify) moves steps[2] and acceptance[3] back to the default door, states that the default door reports only `relationship/master-detail-required` (not `security-controlled-by-parent-no-relation`, because the parsed field is the optional master the runtime derives access from) and keeps `{ strict: false }` as the second door. No other clause changed. - Docblocks touched: `data-model-rules.ts` (R2 header), `controlled-by-parent-master.ts` (module header). The semantic entry `cbp-optional-master-admitted` is unchanged: its sentence "`os lint` reports the omission at `error`" is now true on the default door, which was the seat's call (fix the reach, not the prose). ## Why The maintainer ruling on objectstack-ai#30905 (record 6687830530), option 「A 放行为可选主字段(推荐)」, keeps the omitted `required` readable as the optional master at the parse and pairs it with the lint: "`os lint` errors on the omitted spelling". The published entry repeats that promise. On the ordinary authoring door it did not hold (measured on objectstack-ai#33842 / PR objectstack-ai#33929). ## Tests New, no existing assertion edited (no forced test edits): - `packages/spec/src/data/master-detail-required-omission.test.ts` (7 cases): strict `defineStack` records an omitted `required` on the sole master and on a second `master_detail` beside a required one; nothing for explicit `false` / `true`, for another sharing model, for a lookup, for `{ strict: false }`, or for a bare `ObjectSchema.safeParse`; the record is invisible to `Object.keys`, `JSON.stringify` and `FieldSchema`, and a copy drops it. - `packages/lint/src/data-model-rules.master-detail-required.test.ts`, new top-level `describe` (4 cases) over stacks a real `defineStack` built: omitted → one error at `.required` with both spellings; CONTROLS explicit `false` and `true` → clean; `{ strict: false }` → the same finding as before; a copied field → clean (the pre-record reading). Ablations (each committed first, mutated through `scripts/ablation-replace.mjs`, rebuilt, `ablation-dist-preflight` hit, then restored with blob == HEAD and rebuilt with the marker absent from dist): - A1, lint stops reading the record: lint unit `the sole master_detail without required` turns red (1 failed / 33 passed); the CLI on the default door reads `os lint` exit 0, passed true, 0 R2 findings (the defect). - A2, `defineStack` stops stamping: spec unit 3 failed / 4 passed (src), lint unit 1 failed / 33 passed (spec dist), CLI default door `os lint` exit 0 with 0 R2 findings. ## Acceptance notes - `Clause-②: yes` differs from the claim's expected `no`: the diff adds one public export, `masterDetailRequiredOmitted` on `@objectstack/spec/data`, and the spec lane charter counts any widening of the public surface as Clause ②. No parse accept set moves, so `Metadata-protocol: none` and patch changesets. - On the default door only R2 fires; `security-controlled-by-parent-no-relation` does not, because the stack the runtime loads really does derive the optional master from the parsed `false`. On `{ strict: false }` both fire, as before. - Not reached by design: the save door and a bare `ObjectSchema.safeParse` record nothing (neither runs `os lint`); `ObjectSchema.create()` still forces an omitted `required` to `true`. - The record lives in `packages/spec` as a declared producer record beside the provenance mark, not as business logic: it states what the author wrote and nothing reads it at runtime. - `pnpm --filter @objectstack/spec check:generated` exits 1 at Node's default heap in this container: its `check:test-typecheck` leg's `tsc` dies without diagnostics. At `NODE_OPTIONS=--max-old-space-size=6144` (the heap `lint.yml` sets for the ledger re-measure) it exits 0 with all 14 artifacts current, and `check:test-typecheck` alone reads OK (52 files / 240 errors / 131 pinned signatures held). ## Verification Verification head: `7e6f3db1` (main `ea6de745` merged in via `scripts/pm/os-regen-merge.sh`). That merge had one conflict, `docs/qa/platform-checklist/areas/cli.json` item `cli.validate-v18-authoring-verdicts`: PR objectstack-ai#34068 had meanwhile taken revision 5 on the same item. Resolution: main's revision 5 row and its acceptance[0] edit are kept as written; this PR's row is renumbered to revision 6 and the item's `revision` set to 6. Apart from those two numbers the PR's diff is byte-identical to the one verified at `6e1439cc` (per-file hunks of `git diff e71ecc1 d468bb8` and `git diff ea6de74 7e6f3db` match in 10 of 11 files; cli.json differs only in `"revision": 5` → `6` on the item and the row). Re-read at `7e6f3db1` after `pnpm install --frozen-lockfile`, `rm -rf packages/runtime/.objectstack` and a full `./packages/**` rebuild under the verify lock: `check:generated` exit 0 at heap 6144 (all 14 artifacts current), spec test 844 files / 26973 tests passed, lint test 212 files / 9030 tests passed, `check:platform-checklist` exit 0 (16 areas, 433 items). The readings below were verified at `6e1439cc` (main `b4ce310b` merged in via `scripts/pm/os-regen-merge.sh`; no conflict, the regen chain found nothing to rewrite). Re-read at `6e1439cc` after `pnpm install --frozen-lockfile`, `rm -rf packages/runtime/.objectstack` and a full `./packages/**` rebuild under the verify lock: `check:generated` exit 0 (all 14 artifacts current), spec test 843 files / 26968 tests passed, lint test 212 files / 9030 tests passed, the four end-to-end readings below unchanged, and the 96 derived gates all exit 0 at heap 6144 (`--ran`: 96 run, 0 NOT-MEASURED). CI on `6e1439cc`: every check-run completed, all required contexts success. The readings below were first taken at `eb7616fe` (main `0ac112fc` merged in), with the same results. <details> <summary>End to end: the objectstack-ai#33929 reproduction and its controls (scratch copy of examples/app-todo, CLI from the tree)</summary> ``` === sole master_detail, required omitted, default strict defineStack os lint --json exit 1 passed false error relationship/master-detail-required at objects[2].fields.hdr.required os validate --json exit 0 os build exit 0 === required: false, default door os lint --json exit 0 passed true os validate --json exit 0 os build exit 0 === required: true, default door os lint --json exit 0 passed true os validate --json exit 0 os build exit 0 === required omitted, defineStack(..., { strict: false }) os lint --json exit 1 passed false error relationship/master-detail-required at objects[2].fields.hdr.required error security-controlled-by-parent-no-relation at objects[2].sharingModel os validate --json exit 0 os build exit 0 ``` Base reading (objectstack-ai#33929, at 895783a): the first case gave `os lint --json` exit 0 with no finding. The shipped examples app-crm and app-todo lint with no R2 finding (their cbp masters are built by `ObjectSchema.create()`, which writes `required: true`); app-showcase's config could not load here (its connector-slack dist is not in the CLI closure), and its two cbp masters are `ObjectSchema.create()` with `required: true` in source. </details> <details> <summary>Package tests and typecheck (under the verify lock)</summary> ``` pnpm --filter @objectstack/spec test Test Files 843 passed (843) Tests 26968 passed | 1 todo pnpm --filter @objectstack/lint test Test Files 212 passed (212) Tests 9030 passed pnpm --filter @objectstack/spec typecheck VERDICT command-exit 0 pnpm --filter @objectstack/lint typecheck VERDICT command-exit 0 pnpm --filter @objectstack/cli exec vitest run --project unit Test Files 422 passed (422) Tests 6002 passed ``` The cli integration layer is declared to CI (no spawn entry or integration file touched). </details> <details> <summary>Derived gates (dispatch-gates --commands at eb7616f, re-run at 6e1439c)</summary> 96 derived families, 96 run, reconciled with `--ran`: "96 run, 0 NOT-MEASURED (a DERIVED zero)". 95 exited 0 at the default heap; `check:generated` exited 1 there (the out-of-memory `tsc` above) and 0 at the CI heap of 6144, which is the line reconciled. `check:platform-checklist` exit 0 (16 areas, 429 items). `check:dev-prereqs` (local-only family): NOT MEASURED, 34 `ui/` packages unbuilt in this container. </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic (the record is a producer stamp beside the provenance mark; nothing reads it at runtime). - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` is CI's. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. <!-- signed: domain:spec#2 · os-steve · session_01ADHkmSUpRcnYp68V8zPYaB --> --------- Co-authored-by: Claude <noreply@anthropic.com>
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 Steve · project thread
Fixes #33842
Clause-②: no
Metadata-protocol: none
维护者速读
cli.validate-v18-authoring-verdicts一项,把os lint那一臂的种植位置改到defineStack(…, { strict: false }),并把条款写明这一点。defineStack在 CLI 读到 stack 之前就把省略的required填成了 false,os lint看不到省略,条款在默认门上永远测不出来(QA 两次复现)。docs/qa/platform-checklist/areas/cli.json中该项的 steps[2]、acceptance[3] 与 history rev 4。defineStack({...})改成defineStack({...}, { strict: false }),种一个只有一个省略 required 的 master_detail 的 cbp 对象,跑os lint --json,应 exit 1 并报 relationship/master-detail-required。What changes
docs/qa/platform-checklist/areas/cli.json, itemcli.validate-v18-authoring-verdictsonly (revision 3 → 4), option A of the card (checklist only):defineStack({ … }, { strict: false })and says why the two other doors do not carry it: the default strictdefineStackparse has already defaulted the omittedrequiredtofalse(ruling A of controlled_by_parent admits an optional master (1/3): spec, lint and the read owner branch: a null-master detail row is readable by its owner only #30905) before any CLI verb loads the stack, and a raw-object default export reaches the rule inos lintbut is refused byos validate/os build.security-controlled-by-parent-no-relationat error, and that a run on the default strict door (lint exit 0, no finding) is not this clause's arm. Theos validate/os buildexit-0 half is unchanged.No other clause, step,
automated.reforsourceentry changed. No product package touched.Tests
No test file changed (checklist JSON only). The readings were driven live; the derived gate families for the diff were run locally (see Verification).
Acceptance notes
defineStack(…, { strict: false })or a raw object config. Measured: only the first carries the whole clause. A raw-object default export getsos lintexit 1 with the rule, butos validateexit 1 andos buildexit 2 (the export was not built bydefineStack), which contradicts the clause's other half, so steps[2] names onlystrict: falseand says why the raw export is not the door.packages/spec/src/migrations/entries/semantic/18.cbp-optional-master-admitted.tssays that through a raw parse ("an object written directly indefineStack") an omittedrequiredreads as the optional master and "os lintreports the omission aterror". On an ordinary strictdefineStackappos lintdoes not report it (reading A below). This is the spec: an omittedrequiredon the sole master_detail of a controlled_by_parent object reads as a required master through ObjectSchema.create() but as an optional master through defineStack and a raw parse #31470 reach line not holding on the default door.Verification
Readings at base
895783a1(origin/main), scratch copy ofexamples/app-todo, CLI from the tree (packages/cli/bin/run.js, closure built under the verify lock:VERDICT command-exit 0). Planted:todo_qa_hdr(sharingModel private) andtodo_qa_line(sharingModel controlled_by_parent, one fieldhdr: { type: 'master_detail', label: 'Hdr', reference: 'todo_qa_hdr' }, norequired), both plain object literals.A. default strict defineStack: os lint reads 0
B. defineStack(…, { strict: false }): os lint reads the rule at error
C. raw-object default export (not the door)
Gate reconciliation (
dispatch-gates.mjs --commands/--ran) is run after the final commit and reported on the card.Generated by Claude Code