Skip to content

test(spec): pin SEARCH_AUTO_EXCLUDED_TYPES to every credential type in MASKED_ON_READ_FIELD_TYPES - #28123

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-dilqsl
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-dilqsl

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Fixes #27822

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:在 search-fields.test.ts 加一条断言:MASKED_ON_READ_FIELD_TYPES 里的每个凭据类型(今天是 secret、password)都必须在 SEARCH_AUTO_EXCLUDED_TYPES 里。只改测试,不改任何发布代码。
  • 为什么改:引擎、lint 判凭据类型读的是掩码表,而 REST 入口的 $searchFields 默认集读的是手写的排除集。以后有人往掩码表加新凭据类型却忘了排除集,REST 会放行引擎会扣下的字段;这条断言让那次修改当场变红。
  • 风险与回滚:零运行时风险,发布值不变;回滚即 revert 本 PR。
  • 先看:packages/spec/src/data/search-fields.test.ts 新增的 SEARCH_AUTO_EXCLUDED_TYPES covers every credential type 块。
  • 两分钟验证:pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/search-fields.test.ts,预期 33/33 通过。
  • 需要你做的:无,席位落地。

What changes

  • One new describe in packages/spec/src/data/search-fields.test.ts: for every own key of MASKED_ON_READ_FIELD_TYPES, assert SEARCH_AUTO_EXCLUDED_TYPES.has(key) (one it.each row per credential type, with a message naming the type), plus a CONTROL that the table is non-empty so the pin cannot pass vacuously.
  • Route: the pin, not the derivation. Deriving the set's credential members from the table would edit shipped source (search-fields.ts) and need a patch changeset; the triage record asks for a single assertion, and the pin closes the drift at the same edit.

Tests

  • Red first: injected a scratch key textarea into a local copy of MASKED_ON_READ_FIELD_TYPES (not committed; restored with git checkout HEAD --, hash matched the HEAD blob). search-fields.test.ts → × credential type textarea is auto-excluded, Tests 1 failed | 32 passed (33), exit 1.
  • Green at 799bb76f: search-fields.test.ts + masked-field-types.test.ts → Test Files 2 passed, Tests 43 passed.
  • pnpm --filter @objectstack/spec test && pnpm --filter @objectstack/spec typecheck under the verify lock → VERDICT command-exit 0; Test Files 755 passed | 1 skipped (756), Tests 22511 passed | 1 skipped | 1 todo.

Acceptance notes

  • skip-changeset: the diff is a test file only. @objectstack/spec's files[] ships dist and src/**/*.zod.ts; after a build the new test's describe string has 0 hits in dist/, while the positive control SEARCH_AUTO_EXCLUDED_TYPES hits dist/browser/data/index.js.
  • The REST ingress itself (assertSearchFieldsAreSearchable) is unchanged; it still reads SEARCH_AUTO_EXCLUDED_TYPES, which this pin now holds to the credential vocabulary.

Verification

Derived gates at 799bb76 (73 families)
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack → 73 commands; every line run with stdin from /dev/null, exit codes recorded before any pipe.
  • 72 exit 0. Three first answered exit 3 (PREREQUISITE NOT MET) and were re-run after their prerequisite: check-plugin-teardown-shape --self-test (after git fetch --unshallow), @objectstack/lint check:doc-formula-expressions and check:lean-entry-closure (after building the lint and objectql closures) → exit 0.
  • NOT MEASURED: pnpm check:dual-build-cjs-loads, reason: needs every workspace package built (89+ missing dist/); CI's Lint & Repo Gates runs it.
  • dispatch-gates.mjs --repo objectstack-ai/objectstack --ran → 73 derived famil(ies) accounted for — 72 run, 1 NOT-MEASURED.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibzWK3xztCU4oKFvCGo


Generated by Claude Code

The REST ingress resolves the auto-default $searchFields set with
SEARCH_AUTO_EXCLUDED_TYPES, which names its credential members by hand,
while the engine withhold and the lint check read MASKED_ON_READ_FIELD_TYPES.
Assert every own key of the mask table is auto-excluded, so a new masked
type cannot reach the REST door while the engine withholds it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzWK3xztCU4oKFvCGo
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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): node scripts/docs-audit/affected-docs.mjs --json 91a423ef6b94a86be8874f1ac6449b406a8971c8 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#1 · os-tesla · session_01L9qibwb6hBqszPTYJobitm

维护者速读

  • 改了什么: search-fields.test.ts 加一条断言:MASKED_ON_READ_FIELD_TYPES 里的每个凭据类型都必须在 SEARCH_AUTO_EXCLUDED_TYPES 里,另加一条对照断言防止掩码表被清空后误绿。只改测试。
  • 为什么改: REST 入口的 $searchFields 默认集读的是手写排除集,引擎读的是掩码表。以后加新凭据类型却漏改排除集时,这条断言当场变红。
  • 风险与回滚: 零运行时风险,没有发布内容变化;回滚即 revert。
  • 先看: packages/spec/src/data/search-fields.test.ts 新增的 describe 块。
  • 两分钟验证: pnpm --filter @objectstack/spec exec vitest run src/data/search-fields.test.ts。
  • 需要你做的: 无。不属于受管面,也不欠契约复审,由席位落地。
  • 席位意见: ACCEPT,可落地。

席位核对 · ACCEPT · domain:spec seat 1 (#6017) · 2026-10-30T13:43Z

Head 799bb76fe590e869bd4e01b89414693d7f9058be. Card #27822, claim 6523167534, triage 6512276907. The maintainer's p3 lift, verbatim: 「p3 也可以开发」.

  • Shape: draft to main, made by the relay (objectstack-fleet[bot]). The body has Fixes #27822 alone, with Clause-②: no and Metadata-protocol: none at line start. skip-changeset is right: the diff is one *.test.ts file, which does not ship.
  • Diff read by the seat: for every own key of MASKED_ON_READ_FIELD_TYPES, it asserts SEARCH_AUTO_EXCLUDED_TYPES.has(key), with a control that the table is not empty. This is the card's pin route. The derivation alternative was not taken, so no published value moves. The dev proved it red first, with an injected key failing 1 of 33.
  • Contract review: not owed. The diff touches no contract face: test files are outside packages/spec/src/** non-test, the claim says no, and nothing narrows.
  • Gates: check-runs on this head are 39 success, 15 skipped, 0 red. That includes Lint & Repo Gates (124086487197) and TypeScript Type Check (124092698346). mergeable_state is clean. check-governed-merges --branch: NOT governed, +29/−0.
  • Out of scope: none. Skills-docs: not owed.
  • Landing: pr_ready + automerge_enable in this act.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 30, 2026 13:45
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 146115a Oct 30, 2026
55 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-dilqsl branch October 30, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protocol:data size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

1 participant