Skip to content

[T-14 項目7] 補一輪獨立審查,並修掉 #387 自己帶進來的那句假話 - #424

Open
pkyosx wants to merge 1 commit into
mainfrom
t-14/item7-doc-corrections
Open

[T-14 項目7] 補一輪獨立審查,並修掉 #387 自己帶進來的那句假話#424
pkyosx wants to merge 1 commit into
mainfrom
t-14/item7-doc-corrections

Conversation

@pkyosx

@pkyosx pkyosx commented Sep 4, 2026

Copy link
Copy Markdown
Owner

這個 PR 為什麼存在

#387(T-14 項目 7)從頭到尾沒有留下獨立審查的紀錄 —— pulls/387/reviews 是空的,步驟筆記也沒寫審查者是誰。它已經合併並上站了,所以這一輪是事後補審,由非實作者做。

結論:行為面 approve。文件面有一句必修,而且那句是 #387 自己加的。

審查者實測到什麼(不是讀碼推的)

  • 窮舉矩陣不是真空:從兩個方向各種一顆 mutant,兩次都紅並指名不變量。另外補的第三顆(掏空 stampRestartIntent)也紅。三顆都用自備份還原、shasum 前後相同、git status --porcelain 空。
  • 陰性對照成立重新聚焦 → 強制停止 在乾淨的碼上仍然是「不起來」(desired="offline" restart_after_stop=false)—— 沒有被修成「什麼都會起來」。
  • 九格對照的第 6 格(連按兩個重啟類動作)現在量過了:6 個重啟動詞兩兩配對、裸的與接在強制停止後各一輪,12 條全部 desired="online"
  • 呼叫點自己數過stampRestartIntent 六處(正職三+外包三)、clearRestartIntent 五處(三個下線動詞+活化+解僱)。沒有漏。

這個 PR 改什麼

  1. 🔴 spec/lifecycle.md §4.3 的必修。原句說「a 重啟 verb on a member merely AT REST (no stop in flight)」只會存下來回 held_down。真正的 gate 是 aStopWasEverAskedForstopping_since > 0),而收斂完成的下線不會清掉那個錨點 ⇒ 上週被停掉、早就安靜下來的成員不屬於這一格,對它按改機器會 200 並把它帶起來。已實測重現。[T-14 項目7] 把「要不要起來」從 desired_state 拆出來(新欄位 restart_after_stop + migration 00066) #387 在程式註解裡修對了,卻把互相矛盾的那句寫進 spec。
  2. docs/design/state-model.md 的 durable-intent 清單補上 restart_after_stop[T-14 項目7] 把「要不要起來」從 desired_state 拆出來(新欄位 restart_after_stop + migration 00066) #387 動過這個檔但沒補;清單是別人 grep 欄位名時會看的那一份。
  3. 矩陣測試的 66 reach-the-queue 標籤過寬。實測 66 條裡只有 60 條真的設了 restart_after_stop,另外 6 條是 下線→活化→{重啟動詞},被中途的活化整個取消、從沒碰到佇列。數字保留(66 就是那個 bucket 的大小),修的是標籤

沒改的

行為、schema、任何斷言、任何數字常數。純散文與註解。

驗證

go build ./... rc=0;矩陣測試本機綠。雲端 CI 以本 PR 的 checks 為準。

照實講沒做到的

  • 審查者的三顆 mutant 是在他自己的 clone 上跑的,我沒有複驗他的 shasum
  • 加速停止 在矩陣裡是刻意排除的(它的換手那條違反 ⇔ 神諭),所以「結尾是加速停止-on-換手」的序列至今沒有被窮舉涵蓋。這個洞在檔案裡本來就寫明了,這個 PR 沒有補它。
  • 棘輪(下線強度只往上加)只有單一支測試在守TestRestartIntentDoesNotSoftenTheWinddownLadder)—— 矩陣對它是瞎的,因為神諭只看最終 desired_state。這是審查者指出的單點失效,本 PR 沒有處理。

The first independent review of #387 (there was none before — `pulls/387/reviews`
is empty) measured three claims. The behaviour is sound; the docs are not.

1. `spec/lifecycle.md` §4.3 says a 重啟 verb on a member "merely AT REST (no stop
   in flight)" only saves and answers `held_down`. The gate is
   `aStopWasEverAskedFor` — `stopping_since > 0` — and NOTHING clears that anchor
   when a stop converges. So a member stopped last week and long since quiet is
   NOT at rest by that gate: 改機器 on it answers 200 and brings it back up.
   Reproduced: stop a live member, disconnect, tick 10×, row reads
   desired="offline" stopping_since>0; press 改機器 → 200, desired="online",
   reason "held_down: the stop the owner asked for has landed".
   The PR fixed this in the code comment (`member_ownerop_winddown.go:535`) and
   shipped the contradicting sentence in the spec.

2. `docs/design/state-model.md` never adds `restart_after_stop` to the durable-
   intent inventory, though the PR touched the file. The new banner above it
   explains the split, but the inventory is the list a reader greps for a column
   name, and the new column was not in it.

3. The matrix test's "66 reach-the-queue" label overclaims. Measured: 60 of the
   66 end with `restart_after_stop` set; the other 6 are 下線→活化→{重啟 verb},
   cancelled outright by the mid-sequence 活化 and never touching the queue.

[how] three corrections, no behaviour change

- lifecycle.md: state the real gate and say explicitly that a converged stop is
  not this case.
- state-model.md: add `restart_after_stop` to the intent list.
- the test: keep the number (66 IS the bucket's size) and correct the label,
  naming the six and warning not to quote 66 as queued restarts.

Comment/prose only; no schema, no behaviour, no assertion changed.
`go build ./...` rc=0 and the matrix test is green locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant