Repository navigation
test(plugin-security): pin that the registered security service serves reopenAudienceBindingSuggestion - #27546
Merged
objectstack-fleet[bot] merged 2 commits intoOct 29, 2026
Conversation
…s reopenAudienceBindingSuggestion The optional member is wired on the registered object, but nothing pinned it: dropping the wiring left every suite green while both reopen routes answered 501. The new pin boots the plugin like the members pin, asserts the member is served, and asserts it delegates to the module function with the caller context and id. It sits beside the members pin with its own reason, not in MUST_SERVE_OPTIONAL: reopen's absence refuses rather than admits. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXcN9HaZYSEUdJWEjw
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:server#1 · os-sales · session_01L6bhgXcN9HaZYSEUdJWEjw 维护者速读(席位终稿)
席位意见:接受。消融两条腿(删接线、换成桩)都转红,还原后与 HEAD 一致。 席位核对 — ACCEPT · domain:server#1 · head a34ad92 · 2026-10-29T12:44Z
|
objectstack-fleet
Bot
deleted the
claude/issue-27362-reopen-served-pin
branch
October 29, 2026 13:06
This was referenced Oct 29, 2026
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 Sales · project thread
Fixes #27362
Clause-②: no
Metadata-protocol: none
Skills-docs: none — test-only diff; no published skill, doc or authorable surface moves.
维护者速读
security服务确实提供可选方法reopenAudienceBindingSuggestion,并且它调用的是真正的模块函数而不是桩。skip-changeset);回滚即删除该测试文件。packages/plugins/plugin-security/src/registered-security-service-reopen.pin.test.ts(唯一改动文件,看文件头说明的理由与断言)。pnpm --filter @objectstack/plugin-security exec vitest run src/registered-security-service-reopen.pin.test.ts,预期 1 个测试通过。What changes
One new test file beside the members pin:
packages/plugins/plugin-security/src/registered-security-service-reopen.pin.test.ts.It boots the real
SecurityPluginthe same wayregistered-security-service-members.pin.test.tsdoes and takes the object it registers assecurity. Then it asserts two things:reopenAudienceBindingSuggestionis a function on the registered object.reopenAudienceBindingSuggestionmodule function, with the suggestion deps (which carryql), the caller context and the id. The test returns that function's answer unchanged. The module function is replaced with a spy through a partialvi.mock, so the test proves the call is delegated and not answered by a stub.Per triage 6486679343, the test sits beside the members pin with its own reason and is not in
MUST_SERVE_OPTIONAL. That list holds optional members whose absence consumers read as a fallback that admits. Reopen's absence refuses (501, every dismissal stands), so it does not belong there. The file header gives the reason.No source change. The member's wiring in
security-plugin-security-service.tsis untouched.Tests
a34ad920b1:Test Files 2 passed (2),Tests 5 passed (5).pnpm --filter @objectstack/plugin-security test:Test Files 237 passed (237),Tests 5112 passed | 45 skipped (5157).pnpm --filter @objectstack/plugin-security typecheck: exit 0. This includescheck:test-typecheckovertsconfig.test.json, which compiles the new file:0 file(s) / 0 error(s).Negative-pin ablation (through scripts/ablation-replace.mjs; restored, blob equal to HEAD)
The test imports
./security-plugin.jsrelatively, so it runs againstsrc/and nodist/rebuild applies.A: delete the two wiring lines (
reopenAudienceBindingSuggestion: (callerContext: any, id: string) =>and the delegation line under it)B: keep the member and replace the delegation with a stub (
Promise.resolve({ suggestion: { id, status: 'pending' } }))After restore the pin is green again:
Tests 1 passed (1).Acceptance notes
skip-changeset: the diff publishes nothing.files[]isdist,README.mdandCHANGELOG.md, and the tsup entry issrc/index.ts. Measured afterpnpm build: the new test's names occur in 0dist/files, and the positive controlreopenAudienceBindingSuggestionoccurs in 4.Verification
Local subset on head
a34ad920b1(merge oforigin/mainf57eddcf0c). Exit codes were captured before any pipe.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 52 commands. 50 exited 0.PREREQUISITE NOT MET, they need the whole workspace built):pnpm check:dual-build-cjs-loadsandpnpm check:i18n. Both are NOT MEASURED locally and are left to CI'sLint & Repo Gates. A single test file undersrc/is outside what either one reads.--ranreconcile:52 derived famil(ies) accounted for — 50 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3), exit 0.origin/mainmoved after the merge, and the changed files arescripts/pm/*andscripts/gen-sdui-reference.mjsfamilies. They are not this diff's.npx eslint --no-inline-configon the new file: exit 0.pnpm --filter @objectstack/plugin-security typecheck: exit 0.pnpm --filter @objectstack/plugin-security test: exit 0, 237/237 files.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgXcN9HaZYSEUdJWEjw