Repository navigation
Commit b2971aa
docs(adr-0104): a write references only a file its writer may read (#25971)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DM7SePpQnQZ7NUSKUCvUrek)_
Follow-up to #25692, which #25951 fixed (merge commit `3761710927`).
This PR changes no code.
## 维护者速读
**改了什么**:给 ADR-0104 D3
补一条修订,记明记录写入时的「认领」和「复制认领」只对写入者能读的文件发生,判断用的就是下载接口那一套规则。具体有三处:Status
加一条修订记录;在 2026-07-27 增补的最坏情况表下加注;末尾新增 2026-10-26
增补。按你在设计审阅后的选择(先改措辞再批),增补又补了三处准确性说明:保留的 ID 通过这条记录对任何读者都不可用,后续由 #26043
改成明确报错;流程和钩子按各自的 runAs 身份判断,只有系统身份免检;「分不清无权和不存在」只在保存这一步成立。
**为什么改**:#25951 已经把这条规则写进代码。但 ADR
里「独占加复制认领,最坏只是多存一份字节」这一行,隐含了一个前提:复制的人本来就能读原文件。代码之前没有检查这个前提,所以决策记录不完整。把前提写进
ADR,以后改这块的人搜 copy-on-claim 就能读到这条规则。
**风险与代价(含回滚)**:只改文档,不动代码和数据。回滚就是 revert 这个 PR,对运行时没有影响。
**席位意见**:建议批准。增补只把 #25951
已经落地的规则写进决策记录,没有新增或放宽任何行为,措辞只写机制,符合本卡的披露要求。逐句核对增补与合入代码是否一致,交给契约复审(`CONTRACT_REVIEW_TIER`)记录,记录会贴在本
PR 上,批准前请先看它的结论(措辞修改后的 head 会重新复审)。有一个相邻的问题由席位在线下另行转告维护者,不写在这里。
**你要做的**:审阅并批准这个 PR。它改的是受管面 `docs/adr/**`,需要你本人批准才能落地。
## What changes
- **Status**: an **Amended** bullet (2026-10-26, #25692, PR #25951,
merge commit `3761710927`).
- **2026-07-27 ownership addendum**: a note under the worst-case table.
The exclusive row's worst case holds only when claim and copy-on-claim
run for a file the writer may read.
- **New addendum (2026-10-26), "a write references only a file its
writer may read"**:
- the rule, and the one judgement its two callers share;
- the quiet answer, after the #25682 precedent;
- a write's own copy;
- the outage envelope;
- the exemption for writes with no caller;
- what it qualifies, and why it stays inside ADR-0104.
Per the card's disclosure rule, the text states the mechanism only.
## Gates
Run on head `13d9a1ad` (`3d14f9ae` plus one wording commit), whose base
is main `3761710927`.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derives 20 gates. All 20 exit 0, and `--ran`
reconciles them: 20 derived, 20 run, 0 NOT-MEASURED.
- `pnpm check:pm-governed-prose`: exit 0.
- `check:commit-card-trailers --range origin/main..HEAD`: the 1 commit
passes.
- No changeset: the diff publishes nothing from any released package
(`skip-changeset`).
## Acceptance notes
- Tier H (`docs/adr/**`): this lands only on an approval by a governed
approver.
---
_Generated by [Claude
Code](https://claude.ai/code/session_016DTRymn12to8YSGMcTzS7h)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent d12b0c1 commit b2971aa
1 file changed
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
600 | 606 | | |
601 | 607 | | |
602 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
603 | 615 | | |
604 | 616 | | |
605 | 617 | | |
| |||
1428 | 1440 | | |
1429 | 1441 | | |
1430 | 1442 | | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
0 commit comments