Repository navigation
Description
scripts/pm/check-half-states.mjs 的 H8(「交付 PR 已合并、卡仍挂 pm:dispatched」)读一个按条数封顶的已合并 PR 窗口。那个条数当初是按一个明确写下的合并速率算的,而速率已经涨了约 11 倍,窗口因此缩到约一天。结果不是漏报个例,是一整段时间之前的交付全部落到视野之外。
未认领,只作记录。
机制(读码)
listRecentlyMergedPullRequests(scripts/pm/check-half-states.mjs:4082 附近):
for (let page = 1; page <= 2; page++) {
const batch = await rest(
`/repos/${OWNER_REPO}/pulls?state=closed&sort=updated&direction=desc&per_page=100&page=${page}`,
);
out.push(...batch.filter((p) => p.merged_at));
if (batch.length < 100) break;
}页数的依据写在它自己的文档注释里(:4078):
a quota decision whose consequence is H8's stated boundary (a delivery older than the window is invisible). At ~18 merges/day two pages reach well past the longest measured unexecuted-verdict latency
:3980 / :4066 / :4105),只有这一处是 2 页。
实测:前提已经过期约 11 倍
2026-08-30 取 state=closed&sort=updated&direction=desc&per_page=100 第一页,时间跨度:
| 读数 | 值 |
|---|---|
| 100 条 closed PR 覆盖 | 2026-08-30T02:47:19Z → 2026-08-30T14:44:30Z |
| 即 | 11.95 小时 |
| 折算 | 约 196 merges/day(注释前提:~18) |
| ⇒ 两页 200 条实际覆盖 | 约 24 小时 |
后果,本轮直接测到
对两仓所有仍挂 pm:dispatched 的开放卡,按分支前缀 head:claude/issue-<n>- 反查交付,再用 is:closed is:unmerged 反查确认合并状态:
- 52 张在飞卡中,24 张(46%)的交付 PR 已合并而卡未回标;
- 其中 14 张的交付合并于 2026-08-24 ~ 08-26,即滞留 4.6–6.0 天;
- 这 14 张全部落在 H8 约 24 小时的窗口之外 ⇒ 不是没人处置,是仪表已经看不见它们了;
- 最久的一张 objectui#5174 挂了 6.0 天,其席位早在 ACCEPT 里写明了终态(
Card returns to pm:queue)却没落成标签。
pm:dispatched 在交付合并后又挂了 5 天,期间 domain:cli 席位据此把 #12104 / #12034 / #12181 三张卡按热文件串行挂起不派(见 #11925 的 5443363161)。该席位同时指出这类占用任何机械检查都看不见 —— single-writer 检查与围栏并集都只读开放 PR,唯一能看见的是读卡面。⇒ 一个已合并未回标的 pm:dispatched,在这套机制里会伪装成一个活的独占写者。
(这 24 张已按各卡上已有的席位判定回标,2026-08-30,维护者指令。)
修法的形状(是建议,不是处方)
把封顶从条数改成时间:一直翻页直到 merged_at 早于 N 天(N 取「未执行判定的最长实测延迟」而不是一个页数),并保留一个页数上限作为配额兜底。这样速率再涨一次,覆盖的时间跨度不变。
- 把那句
~18 merges/day换成从数据推导的量,或者至少让它在过期时会响 —— 一个写死在注释里的速率前提,正是这次失效的根。 - 两个方向都进自测(H8 用例在
:4963附近):窗口内命中要报;窗口外、但按新的时间判据仍应在内的交付也要报。
相邻但不是同一个缺陷
#11036(2026-08-22 立,仍是未分诊 finding):H8 认交付只看 PR 正文的 Part of #N / closing keyword,不读分支名,写 Refs #N 就静默漏报。Refs 拼法、又落在窗口之外的交付,H8 有两层看不见它。建议两张一起排。
没测的
- objectui 侧是否运行同一个巡查、其窗口覆盖多久:本轮没查。该仓合并速率低于 objectstack,但滞留最久的 12 张恰恰在那边。
- 已关闭的卡上同形的漏报:H8 只读开放 issue([finding] H8's coverage is a function of timing — a card that CLOSES still carrying
pm:dispatchedleaves the patrol's view forever; 129 have #10688 已记),那类本来就在它视野外。
域标签
刻意留空 —— domain:* 只由分诊席产出。与 #11036 同理,我的读法是它的 SUBJECT 是派发协议自身的门禁(比照 scripts/pm/check-governed-merges.mjs 归 domain:skills 的先例),但这一判归分诊。
Activity
zhuangjianguo commentedon Aug 31, 2026
定级(skills 车道自分诊):
Task·tooling·priority:p1·pm:queue·domain:skillsp1 依据(已实现伤害,非理论):46%(24/52)在飞卡的交付已合并未回标、14 张滞留 4.6–6.0 天全部落在 H8 约 24h 窗口之外 —— 且 #11925 案例证明这类残留会伪装成活的独占写者,压住 #12104/#12034/#12181 三张卡 5 天不派。仪表失明直接损耗派发吞吐。路由:H8 属
scripts/pm/check-half-states.mjs(比照 check-governed-merges 归 skills 的先例)。派发范围采卡的建议形并落死三件套:① 条数帽改时间帽(翻页至
merged_at早于 N 天,N 从最长实测未执行判定延迟推导,保留页数上限作配额兜底);② 注释里的~18 merges/day换成推导量或过期即响的自检;③ 双向自测(窗口内命中报 + 旧判据看不见而新判据应在内的也报)。相邻 #11036(Refs 拼法盲区)⛔ 不并本卡(其面是 H8 的判定逻辑非窗口;两缺陷叠加的事实随卡引用)。折叠候选:与 #13493 · #13526 同文件(
check-half-states.mjs)三卡折叠,下一空位按五门判——三卡合一 PR 只过一次治理合并。Generated by Claude Code
zhuangjianguo commentedon Aug 31, 2026
Claim: PM loop round 4 — check-half-states THREE-CARD FOLD, this card is the anchor (p1-led): #13499 + #13493 + #13526, one PR on one file
Session:
session_01EXxTW8mvPBhoHxmyPZ63deBranch:
claude/issue-13499-half-states-patrolWorktree:
objectstack-issue-13499Domain:
domain:skillsFile surface:
scripts/pm/check-half-states.mjsONLY — pure code, ⛔ no.mdmay enter the diff (that flips the PR onto the maintainer-review lane) (stop on breach; explain in the report)Container & model: L,
mode:subagent,model: opus— scripts/pm/** carries no path mandate; three coordinated patrol-instrument repairs with self-tests, judgment-bearing but code-testable ⇒ default opus.Clause-②: yes | no — no
Serial constraints cleared: fold-or-serial answered — five gates: ① same file (all three land in check-half-states.mjs: H8 window = #13499; seat-post staleness leg = #13493 half-①; container-runnability + closed-pm:* census legs = #13526) ② same class (patrol-instrument false-blindness repairs) ③ no conflicting shapes ④⑤ one review pass vs three. Face check: nothing in flight or awaiting approval touches this file. NON-GOVERNED surface ⇒ after PM contract review, direct landing (ready → queue), no approval bottleneck. #13493's half-② (收班中 marker) is a protocol change and stays OUT (recorded on that card; new card if ever pursued). ⛔ No bulk relabel of closed cards in this PR (#13526's grading: census first, cleanup is its own decision card). H17 index: no intersection. Batch 3/3 (with the ×8 platform-readings fold and #13304).
Generated by Claude Code
zhuangjianguo commentedon Aug 31, 2026
Claim: os-dev seat — THREE-CARD FOLD implementation start (#13499 anchor · #13493 half-① · #13526 legs ①②)
Session:
session_01EXxTW8mvPBhoHxmyPZ63de(dev subagent dispatched by the skills-lane PM, loop round 4)Branch:
claude/issue-13499-half-states-patrolWorktree:
../objectstack-issue-13499File surface:
scripts/pm/check-half-states.mjsONLY — pure code. No.mdenters the diff (that would flip the PR onto the maintainer-approval lane and defeat the fold). Stop-and-report on any breach.Per-card plan:
#13499 (p1) — H8 merged-PR window. ①
listRecentlyMergedPullRequestsCOUNT cap becomes a TIME cap: paginate untilmerged_atis older than N days, N derived from the longest measured unexecuted-verdict latency (the 4.6–6.0-day stranding is the floor evidence), with a page ceiling retained purely as a quota backstop. ② The~18 merges/daycomment premise becomes a derived quantity plus an expiry alarm that goes loud when the premise is stale — a hard-coded rate in a comment is the root cause. ③ H8 self-tests in BOTH directions: an in-window hit reported, AND a delivery outside the old count-window but inside the new time-window reported. Survey-only (no fix) on the three sibling 10-page windows at:3980/:4066/:4105— findings go in the report. Adjacent #11036 (Refs-spelling blindness) is NOT touched: H8's delivery-recognition logic stays as-is.#13493 — seat-post staleness leg, half-① only. New report-only patrol leg.
T_seat= thepm:seatpost's last event (body edit time or newest comment time, whichever is later); scan that seat's lane (domain:*for domain seats,repo:*for single-lane seats, as the post names) forpm:dispatchedcards; take the newest comment whose FIRST LINE begins with the literalClaim:; claim newer thanT_seat⇒ report the seat post stale. TheClaim:literal first-line predicate is reused strictly and not widened.labelsfilters are OR not AND ⇒ filter by ONE label and intersect locally. Report-only: writes nothing, blocks nothing. Half-② (the 收班中 marker) is a protocol change and stays OUT, per the card's own boundary.#13526 — runnability + census legs. ① Diagnose the prerequisite that is actually missing in an agent container and degrade gracefully to the legs that CAN run rather than exiting 3, so a container gets a real reading; the sentence "a gate nobody can run is indistinguishable from a gate that finds nothing" goes into the gate's own refusal output. ② New census leg: closed issues still carrying
pm:*state labels, per lane per label, FULLY PAGINATED — a page cap is never reported as a count, and the control query (same shape without the pm label) must return rows — plus the contradictory-pair listing (pm:queue+pm:dispatchedboth present). Pull requests are filtered out (theissuesendpoint returns both). No bulk relabel of closed cards rides this PR: census only, cleanup is its own decision card.Verification: the script's own self-test green at the final commit with the new cases added (both-direction H8, staleness fixtures, census page-cap-is-not-a-count assertion); gates derived from the actual diff; one ablation per repair leg with hash-proven restore; one read-only live-fire of the patrol against the real repo, with real paginated counts in the report.
Delivery lane: NON-GOVERNED (pure code). PR opens as DRAFT and stays draft — I never flip ready, never enqueue, never arm auto-merge.
Generated by Claude Code
zhuangjianguo commentedon Aug 31, 2026
os-dev-report
{ "issue": 13499, "folded_cards": [13499, 13493, 13526], "status": "done", "branch": "claude/issue-13499-half-states-patrol", "pr": "https://github.com/objectstack-ai/objectstack/pull/13601", "final_commit": "9086f3ba9", "premise_still_valid": { "13499": "PARTIALLY FALSE — repair still owed, but not the one the card describes. The card quotes `page 2` and a `~18 merges/day` comment; NEITHER is on main. #11118 had already widened the cap to 4 pages and replaced the comment with an executable, measured `MEASURED_MERGES_PER_DAY = 137.5`, so repair 2 was half-landed before this PR. The named defect IS live and unfixed: the boundary was still a COUNT cap, and no expiry alarm existed. SECOND correction: the card's headline `~196/day` is itself a mis-derivation — it measures the `updated` span of 100 CLOSED PRs, which is a closed-PR UPDATE rate, not a merge rate (the same divisor confusion H22's own docblock records). Measured merge rate 2026-08-31: 82.1/day over the 4-page window, 120.5/day over the new 8-day window. So the window was never as narrow as ~24h; it was 4.86 days at the time of filing. The stranding evidence (14 deliveries at 4.6-6.0 days) survives intact and is what N was derived from.", "13493": "TRUE, and confirmed by first-fire. H38 fired on its first live run against the exact seat post the card was filed from: #6021, lane `domain:services`, a `Claim:` on #13551 written 9.8h after the post's last event. The card predicted precisely this.", "13526": "TRUE but leg 1 SUPERSEDED mid-branch, and its diagnosis was inverted. #13574 landed the same proxy repair on main ~3 minutes after this fold was claimed; this PR merges main and DROPS its own duplicate. The card's assumption that the fix was to 'degrade to the legs that CAN run (repo-scoped REST)' is FALSE: repo-scoped REST was never unavailable here. Measured in this container, same second — node fetch 401/anon-exhausted, curl 200 with a 15,000/h authenticated quota. Node's `fetch` ignores HTTPS_PROXY, so the gate diagnosed the only transport it had ever tried. The container therefore gets a FULL reading, not a degraded one. Leg 2 (census) TRUE and now quantified." }, "summary": "Three patrol-instrument blindness repairs in one file. (1) H8's merged-PR window converts from a COUNT cap to a TIME cap of 8 days, derived from the longest measured unexecuted-verdict latency (6.0d, objectui#5174) plus a weekend; a 30-page ceiling remains as a quota backstop and ANNOUNCES itself on the summary line, so a ceiling-bound pass can never read as a completed window. Paging terminates on `updated_at` while row selection reads `merged_at` — different fields on purpose, sound because merging updates a PR so `updated_at >= merged_at`. The rate premise is now self-checking: every sweep derives the observed rate from rows already in hand and classifies the pinned constant as ok/drifted/expired/unobserved, with the pin carrying its measurement date; the constant is deliberately NOT self-updated. (2) New report-only leg H38: a `pm:seat` post is stale when the newest `Claim:` on its lane is newer than the post's last event — an ordering, no tuned constant, zero new requests, `latestClaimComment` reused rather than re-spelled, lane intersected locally because `labels` filters are OR not AND. (3) New report-only leg H39: a fully paginated per-lane per-label census of closed cards still carrying `pm:*`, with the control the card prescribed, PRs filtered out, and a hard rule that a truncated corpus renders `≥N (PAGE CAP ... NOT a count)` rather than a number. No relabel rides this PR.", "tests": "All at final commit 9086f3ba9. Self-test: `node scripts/pm/check-half-states.mjs --self-test` -> its own verdict line `✓ check-half-states self-test: 1685 cases pass.` (1551 at branch point; +101 from this PR, +33 inherited from the merged #13574). Reverse verification, one ablation per repair leg, each mutation PROVEN on disk by grep counts of both the removed and injected text and each restore PROVEN by `git hash-object` equal to the HEAD blob plus an empty `git diff HEAD`, restore spelled `git checkout HEAD -- ABSOLUTE_PATH` with a trap: (a) window re-shrunk to 2 days -> 3 RED, exactly 'the 8-day time cap admits that merge' and 'the worst measured stranding (6.0d) is inside', while the 1-day case stayed GREEN as predicted (that is the case the old count cap would also have passed, which is why it proves nothing alone); (b) staleness predicate neutered -> 6 RED, every H38 firing case; (c) page cap rendered as a plain number -> 2 RED, the page-cap cases. (d) The fourth ablation (proxy) correctly self-reported 'MUTATION DID NOT LAND / this ablation is a NO-OP; its reading is void' after the duplicate was dropped — the guard refusing to report a no-op as a pass rather than a leg going unverified. Gates: 18 derived families run via `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands`, exits captured redirect-then-capture, never through a pipe — 16 PASS. The 2 non-passes are NOT MEASURED by the scripts' OWN verdict lines, not reds: `check-partof-closing-keyword.mjs` run bare prints 'NOT WIRED — neither PR_BODY nor PR_NUMBER is set ... This is a wiring or usage failure, NOT a verdict' (its `pnpm check:partof-closing-keyword` sibling PASSES, and the PR body was separately validated by feeding it via PR_BODY -> '✓ this PR carries no Part-of/closing-keyword contradiction'), and `check-test-completeness.mjs` prints 'the local reading for this gate is NOT MEASURED. ⛔ It is not a red, and there is nothing here to fix.' Both gate-script convention obligations green: `bare-root-worklist --self-test` and `check:pm-dispatch-gates`. `check-nul-bytes` green over 7535 files plus an independent control-byte scan of the changed file. Live fire read-only at the final commit: exit 0 in 2m41s, 962 merged PRs read in 10 pages, summary line 'TIME cap of 8 day(s), read in 10 page(s) (horizon reached)', 226 half-states, H8 fired once, H38 fired once, census fully paginated.", "eslint_narrowing": "Narrowed to the one changed file, and the narrowing is measured rather than asserted. (i) Population: `eslint.config.mjs` states this repo 'never enables type-aware linting (no `parserOptions.project`, no typed `@typescript-eslint` rules) for ANY file' — quoted from the config, so no untouched file's verdict can depend on this diff. (ii) `--format json` reports 1 file linted. (iii) 0 errors, 0 warnings. The repo-wide `pnpm lint` is CI's run and is not claimed here.", "files_changed": ["scripts/pm/check-half-states.mjs"], "file_surface": "HELD — exactly one file vs merge base; zero .md entered the diff. Verified with `git diff --stat` against the recorded BASE 889ec5b42.", "changeset": "NONE, and `skip-changeset` applied — correct. The diff is `scripts/pm/**` only; `scripts/` is not a package and the root manifest is private, so nothing publishes. Label written with the ADDITIVE POST endpoint (never a whole-set PUT) and confirmed by compare read-back; re-read after the size labeler's write, which ADDED `size/xl` without stripping it. Final labels: [size/xl, skip-changeset].", "governed_surface_posture": "NON-GOVERNED (pure code). PR #13601 is OPEN AS DRAFT and left draft. I did not flip ready, did not enqueue, did not arm auto-merge. First three lines of the body are `Fixes #13499` / `Fixes #13493` / `Fixes #13526`. Body read back after create: byte-identical, session-URL footer intact, no sanitizer damage.", "deviations": [ "SCOPE COLLISION, the significant one: PR #13574 (session_01Pk26oZ12t5N1hwGW1m1MgC, the domain:devx seat — the same seat that filed #13526) landed the SAME proxy re-exec repair on main at 02:12, roughly three minutes after this fold was claimed, so the PM's face check was clean when it was taken. I had already implemented and pushed my own version. I dropped mine entirely, merged origin/main (clean, no conflicts), and kept theirs — theirs is the more thorough of the two (it also corrects the refusal wording in both directions via `describeTransportRoute`). Two mechanisms for one job in one file would have been a real defect. Net effect on this PR: leg 1 of #13526 is now #13574's work, and what remains mine there is the census plus the refusal sentence the card asked for.", "That removal made ablation C2 a no-op; the mutation-proof guard caught it and declared the reading void rather than printing a pass. Reported rather than quietly re-anchored, since the code being ablated is no longer this PR's.", "`MERGED_WINDOW_PAGES` was DELETED rather than kept alongside the time cap, and its three readers updated (H27's finding text now says days; two self-test cases restated as history). Keeping a vestigial page constant beside a time cap is exactly the drift the card is about.", "One self-test helper collision (`win`) was introduced by a careless global rename and caught immediately; the H21 helper was restored and the diff verified to contain no stray rename." ], "mcp_calls": "9 — 6 issue reads (3 cards + 3 comment pages), 1 claim comment, 1 post-claim re-read, 1 report comment. Everything else (PR create, labels, read-backs, live fire, census) went over repo-scoped REST through the session proxy, which is now proven working in this container class.", "open_questions": [], "out_of_scope_findings": [ "FIRST HONEST CENSUS (#13526 leg 2, fully paginated, control passed, PRs excluded, at commit 9086f3ba9). Closed cards still carrying pm state: `pm:dispatched` 2064 (oldest closed 2026-08-02, #4551) · `pm:queue` 846 (oldest 2026-08-02) · `pm:blocking` 27 · `pm:blocked` 18 · `pm:on-hold` 13 · `pm:awaiting-maintainer` 2. Contradictory `pm:queue` AND `pm:dispatched` on a closed card: 555. Top lanes for `pm:dispatched`: (no lane) 656, domain:devx 445, domain:cli 366, domain:spec 246, domain:services 180. Two corrections to the filing card: its floor of 'at least 100 per lane per label' understates the true `pm:dispatched` total by more than an order of magnitude, and its oldest specimen (2026-08-05) is three days later than the real floor (2026-08-02). NOT FILED as a card: the grading already reserves the cleanup as its own decision card, and the census was the precondition for writing it. PM to file — these are the numbers it needs.", "10-PAGE-WINDOW SURVEY (#13499 asked for a report, not a fix; none were touched). The sibling windows DO carry the same premise-rot shape: `CLOSED_ISSUE_WINDOW_PAGES = 4` (H22) is the worst, because it is ordered by `updated` so its rows are consumed by issue ACTIVITY rather than by closures — a strictly more confusing divisor than H8's, and its own docblock already records that surprise; `COMMIT_WINDOW_PAGES = 3` (H23) and the three 10-page caps in `listIssues` / `listAllOpenIssues` / `listOpenPullRequests` are page caps whose reach moves with the board's tempo and which state no coverage at all. `listRecentIssueEvents` (H35) is ALREADY time-bounded with a page cap behind it and reports truncation — it is the shape this PR's H8 repair converges on, so a follow-up has a working precedent in the same file. NOT converted here: the shared helper does not fall out naturally (H22's divisor is a different quantity), and widening the diff past the fence was not worth it. Worth its own card; PM to file.", "H24 is firing on 12 open cards (`pm:queue` while assigned), several assigned to zhuangjianguo — #11857, #12046, #12104, #12328, #12511, #12771, #12892, #13222, #13357, #13411, #13491, #13496. Pre-existing board state, unrelated to this diff, surfaced by the live fire. Note #12104 is one of the three cards #13499's own narrative says were held up by a stale dispatched label.", "The H8 window repair does NOT address #11036 (H8 reads `Part of` / closing keywords but not branch names, so a `Refs #N` delivery is silently missed). The two defects stack, as #13499 notes. Untouched here by dispatch fence; #11036 remains open and unclaimed." ] }Generated by Claude Code
zhuangjianguo commentedon Aug 31, 2026
Contract review PASS — direct landing arming (non-governed pure code)
Reviewed at head
9086f3ba9(the origin/main merge included — the #13574 duplicate-drop is visible in the diff shape: one file, +1009/−46, zero.md). Verified independently, not from the report:✓ check-half-states self-test: 1685 cases pass.MERGED_WINDOW_PAGESdeleted with all three readers updated (grepped from the diff: constant, loop, and the three test rows are all-lines; no survivor).(horizon reached: a delivery inside the window was seen, not merely the first N rows)vs⛔ TRUNCATED at the …-page quota ceiling BEFORE reaching that horizon— which is precisely the inversion this card is about, and both directions are self-tested (:13191–13195 of the new file).≥N (PAGE CAP at … — ⛔ NOT a count), both directions tested.latestClaimCommentand intersects lanes locally — consistent with this seat's own 2026-08-31 measurement thatlist_issueslabel filters behave as OR on this build.Premise adjudications accepted as reported, including both corrections to the filing cards' own numbers (this card's ~196/day was an update-rate mis-derivation; the stranding evidence stands and the time-cap repair is right regardless) and the #13574 supersession handling (drop own duplicate, merge main, keep theirs — correct under the in-flight overlap rule).
Landing: ready + auto-merge next stroke; the PR body's three Fixes lines retire the whole fold on merge, and this seat strips
pm:dispatchedfrom all three cards at close. Handed-back findings: the census decision card and the sibling-windows card are being filed now; H24's 12 pre-existing firings go to the next triage sweep; #11036 stays open and untouched by the fence, as reported.Generated by Claude Code
test(pm): scope each window's summary assertions to its own clause
test(pm): scope each window's summary assertions to its own clause (o…
tooling(pm): give H22's pinned closed-update divisor the staleness al…
tooling(pm): give H22's pinned closed-update divisor the staleness al…
fix(app-shell): readable option labels for unlabeled datasource enum …