Repository navigation
test(spec): pin SEARCH_AUTO_EXCLUDED_TYPES to every credential type in MASKED_ON_READ_FIELD_TYPES - #28123
Merged
Conversation
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
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
|
domain:spec#1 · os-tesla · session_01L9qibwb6hBqszPTYJobitm 维护者速读
席位核对 · ACCEPT ·
|
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 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里。只改测试,不改任何发布代码。$searchFields默认集读的是手写的排除集。以后有人往掩码表加新凭据类型却忘了排除集,REST 会放行引擎会扣下的字段;这条断言让那次修改当场变红。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
describeinpackages/spec/src/data/search-fields.test.ts: for every own key ofMASKED_ON_READ_FIELD_TYPES, assertSEARCH_AUTO_EXCLUDED_TYPES.has(key)(oneit.eachrow per credential type, with a message naming the type), plus a CONTROL that the table is non-empty so the pin cannot pass vacuously.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
textareainto a local copy ofMASKED_ON_READ_FIELD_TYPES(not committed; restored withgit 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.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 typecheckunder 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'sfiles[]shipsdistandsrc/**/*.zod.ts; after a build the new test's describe string has 0 hits indist/, while the positive controlSEARCH_AUTO_EXCLUDED_TYPEShitsdist/browser/data/index.js.assertSearchFieldsAreSearchable) is unchanged; it still readsSEARCH_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.check-plugin-teardown-shape --self-test(aftergit fetch --unshallow),@objectstack/lint check:doc-formula-expressionsandcheck:lean-entry-closure(after building the lint and objectql closures) → exit 0.pnpm check:dual-build-cjs-loads, reason: needs every workspace package built (89+ missingdist/); CI'sLint & Repo Gatesruns 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