Skip to content

fix(plugin-sharing): an email-audience share link's refusal does the same work whatever email and password are presented - #23506

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-23474-email-refusal-cost
Oct 14, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-23474-email-refusal-cost

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #23474

Clause-②: no

Summary

An email-audience share link's refusal now does the same work whatever email and password are presented, as its answer bytes already did after PR #23471 (#23372). A reachability measurement on both resolve mounts found the difference observable before this change and within noise after it; the full readings are held by the owning seat under this lane's disclosure rule.

The change

packages/plugins/plugin-sharing/src/share-link-service.ts, resolveToken: for a live row whose audience is email, the audience verdict and the password verdict are combined at the end, so the refusal path is the same whatever the caller presents. The legacy-hash upgrade stays on the fully-passed path only. This is the landing point the card named, the gate both resolve mounts share, so no other package changes.

Scope

  • Answer bytes unchanged. The refusal and the served response are byte-for-byte what PR fix(plugin-sharing, runtime): an email-audience share link answers every caller it does not open for with one refusal #23471 pinned. The refusal-order table (packages/runtime/src/domains/share-links-refusal-order.test.ts) passes untouched, 60 of 60.
  • Scoped to the email audience. The signed_in early return is kept. It reveals only whether the caller is signed in, which the caller already knows, so it says nothing about a server-side secret. No reason to widen the change was measured.
  • Not a goal: hiding whether a token exists. An unknown token stays a fast miss, and tokens are unguessable.

Tests

Local verification at 0088cf19:

  • New pin packages/plugins/plugin-sharing/src/share-link-service.email-refusal-cost.pin.test.ts. On an email+password link it counts the refusal's work per request, for an off-list and an allowlisted email, once with a wrong password and once with none: the counts must be equal. Timing is flaky in CI, the counts are not. A control checks that an allowlisted email with the correct password still serves the record.
    • The pin was red on the pre-fix resolveToken (2 of 3 failed, the control passed) and is green after the fix.
    • Ablation at 0088cf19, run through scripts/ablation-replace.mjs: putting the pre-fix ordering back turns both pair tests red on unequal work counts; the file is then restored, its blob equals HEAD and git diff HEAD is empty.
  • @objectstack/plugin-sharing: test 46 files / 1061 tests passed; typecheck exit 0, and the new pin is in the test-layer program.
  • @objectstack/runtime: share-links-refusal-order.test.ts 60 / 60, against a rebuilt plugin-sharing dist.
  • Gates: the 65 families dispatch-gates.mjs --commands derives at 0088cf19, every one exit 0; --ran reconciliation: 65 derived, 65 run, 0 NOT-MEASURED. The full farm is CI's.

The branch is based at 87315102. The four commits main has gained since touch none of the paths here.


Generated by Claude Code

…same work whatever email and password are presented

The refusal of an email-audience share link no longer does a different amount
of work depending on the caller's input, as its answer bytes already did not.
Pinned by counting the refusal's work per request for an off-list and an
allowlisted email. Answer bytes unchanged.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LxHPTb1LxL7a6WkQbALKnD
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 9 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 111b5821ce386b88729402861f06bc8a68e4be00 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 41602f6338bfd03374790b3565b909b3fa5b9ee5 — the merge of head 0088cf196f3144a3f1b89b53f015a62d7e10498b into base 111b5821ce386b88729402861f06bc8a68e4be00, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 41602f6338bfd03374790b3565b909b3fa5b9ee5 && git checkout 41602f6338bfd03374790b3565b909b3fa5b9ee5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 111b5821ce386b88729402861f06bc8a68e4be00 0088cf196f3144a3f1b89b53f015a62d7e10498b && git checkout -B drift-repro 111b5821ce386b88729402861f06bc8a68e4be00 && git merge --no-ff 0088cf196f3144a3f1b89b53f015a62d7e10498b

node scripts/docs-audit/affected-docs.mjs --json 111b5821ce386b88729402861f06bc8a68e4be00

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 14, 2026 15:20
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 14, 2026 15:20
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 38589026391 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Build Core — 失败步骤: Upload build artifacts(日志不可读,点进 job 看)

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • ⚠️ 本次没有可用的聚合签名(日志里没有能解析出测试文件名的 FAIL 行)—— 这不是「没有同签名的其他 PR」,是这一轮没测到。跨 PR 聚合本次不可用,请手工比对其他 PR 的同类评论。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 6 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Queue kick: infrastructure, re-queued once · domain:services seat 1 · session_01LxHPTb1LxL7a6WkQbALKnD · 2026-10-14T15:51Z

Machine input: merge-queue-triage 6172399177 on PR #23506, queue run 38589026391, classification failure, no aggregatable test-file signature, this PR's first queue failure.

  • Signature: job Build Core, step Upload build artifacts, first error Failed to CreateArtifact: Unable to make request: ETIMEDOUT. The step had already prepared 1767 files when the artifact service request timed out.
  • Initial judgement: a GitHub artifact-service timeout, ⛔ not this PR's code.
  • The three facts:
    1. The failing step is an artifact upload after the build. No test or source file is involved, so it is disjoint from this diff (share-link-service.ts and a pin test).
    2. Build Core was green on the 8 queue runs before this one and on the 2 latest main pushes. In this same queue run all six Test Core shards passed on the merged tree.
    3. The first error is a timeout (ETIMEDOUT), not an assertion.
  • Action: one re-queue (automerge_enable through the relay) on head 0088cf19, unchanged. ⛔ A second failure is treated as real and is not re-queued.

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

2 participants