Skip to content

Commit d99d1e3

Browse files
committed
docs: a record is only an authority while what it names still exists
§9.7-9.8. Two more corrections to the design's refusal rule, both from CI. The compatibility sources are records of a past state, and nothing revisits them when the payload underneath is replaced -- so 'exact match, never fall back' correctly refused a record naming a glibc that had been upgraded away, and the artifact took the host loader. §9.6 said 'no choice is not a guess'; §9.7 says 'a fossil is not an authority'. Both narrow where refusing applies: it belongs to genuine ambiguity, nothing else. §9.8 records the musl guard the sysroot branch was missing.
1 parent a6348e0 commit d99d1e3

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

‎.agents/docs/2026-08-08-payload-version-and-contract-drift-design.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,43 @@ Windows job 直接挂;而且它在能编译的地方语义也错 —— 名叫 `
337337

338338
验证方式:把 gcc 的 `specs` 挪开**并且**把 gcc 自身的 `PT_INTERP` 改指宿主 loader,即三条
339339
兼容来源全部失效,binding 仍解析得出,产物仍拿 payload loader。
340+
341+
### 9.7 兼容来源是**记录**,不是权威
342+
343+
§9.6 补上单例回落后 CI 依然红,日志直说了原因:
344+
345+
```
346+
probe: runtime 'glibc@2.39' is not installed in this home
347+
```
348+
349+
那台机器上只有一个 glibc payload:**2.44**;而兼容记录烙的是 **2.39**。
350+
351+
三条兼容来源(`specs`、`.cfg`、`PT_INTERP`)都是**过去某个时刻的记录** —— 装机时写的、
352+
fixup 时写的 —— 而 payload 被替换(升级、回收)时**没有任何东西回头去改它们**。§3.2 的
353+
「精确匹配、绝不回落」于是如实地拒绝了 2.39,结果是没有 payloadPaths、没有
354+
`--dynamic-linker`、产物拿宿主 loader。
355+
356+
**判据要补一句:一条记录只有在它指的东西还在,才算数。**
357+
358+
现在每条记录都对「实际安装了哪些 payload」核对一遍:
359+
360+
- 记录指的 payload **还在** ⇒ 采信(即使装了多个,它就是产物会加载的那个)
361+
- 记录指的 payload **不在了** ⇒ 跳过,继续往下(单例回落往往能答)
362+
- 什么都答不上来 ⇒ 沉默
363+
364+
这条与 §9.6 是同一件事的两面:**§9.6 说「没得选就不算猜」,§9.7 说「化石不算权威」。**
365+
两条都是在收窄「拒绝」的适用范围 —— 拒绝该留给**真正有歧义**的情况。
366+
367+
### 9.8 musl 目标不碰 glibc payload
368+
369+
`sysroot_mode` 里补 loader / lib 目录时漏了 musl 护栏。musl 的 sysroot 是自包含的,而
370+
同时被探测到的 glibc payload 属于**宿主**工具链 —— 把它放进链接路径后,ld 会把 glibc 的
371+
静态 `libc.a` 拉进一次 musl 链接:
372+
373+
```
374+
undefined reference to `_DYNAMIC' (dl-reloc-static-pie.o)
375+
hidden symbol `_DYNAMIC' isn't defined
376+
```
377+
378+
同一函数里紧接着的 header 分支**本来就有** `is_musl_target` 判断 —— 那句话对库和 loader
379+
一样成立,只是当时没写上。由 e2e 103 抓到,同样是全量跑扫出来的。

0 commit comments

Comments
 (0)