Uh oh!
There was an error while loading. Please reload this page.
fix(pm): scope pm:* label queries to open cards, re-judge the closed-residue census - #13752
Merged
Merged
Conversation
…residue census Reader-side audit ruled by the maintainer on 2026-08-31 (第 6 场总监席决裁批 #13): closed cards carrying pm:* state are archive, not state. No bulk strip, no backfill, no reaper — the residue is made harmless by open-scoped readers. - Extract `pmLabelListingPath`, the one place `state=open` is asserted on a pm:*-label listing, and pin it (every residue label, encoding, page). - Collapse the H39 census render from a per-lane table with page-cap and control alarms to ONE informational line, italic in markdown, no alarm glyphs, no finding row. Instrument caveats (#4690) survive as a qualifier. - Re-judge the H39 self-test pins that pinned the removed render branches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EnE7G31tqbxN1rqpQmzurT
…st label's Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EnE7G31tqbxN1rqpQmzurT
huangyiirene
marked this pull request as ready for review
August 31, 2026 10:13
huangyiirene
enabled auto-merge
August 31, 2026 10:13
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#13605
Reader-side audit of every
pm:*-label issue query, plus the census-leg re-judgment,under the maintainer ruling of 2026-08-31 (第 6 场总监席决裁批 #13), verbatim and
untranslated:
「13605 已关卡 为什么要清理。普查时不应该只看open的卡片吗,其他同意」
No bulk strip, no backfill, no reaper. The ~3,000 closed cards carrying
pm:*stay asthey are; what makes them harmless is that every reader selecting by a
pm:*labelscopes itself to open cards.
Item ① — the reader audit
Population: call sites in
scripts/pm/**, and the patrol paths those scripts drive,that query issues by
pm:*labels. Enumerated by reading every API call site in thetree, not by sampling.
Result: 2 sites in population. Both were already open-scoped or deliberately closed-scoped —
zero sites were missing an open-state filter. The audit's value is therefore a pin, not a
repair: the scoping that the whole ruling rests on was an incidental detail of one inline
template, and nothing would have gone red if a later edit had widened it.
pm:*howlistIssues()—check-half-states.mjsGET /issueswithstate=openpluslabels=LABEL, one page-loop per state label (7 labels)state=openpresentpmLabelListingPath(), now the single place the scoping is asserted, with the ruling cited in its docblock and 11 self-test pins behind itcensusClosedPmResidue()—check-half-states.mjsGET /issueswithstate=closedpluslabels=LABEL, fully paginated, one pass per residue labelstate=closedby designOut of population — measured, not assumed
Closed-card readers that do not select by a
pm:*label (they read residue locallyfrom rows fetched for another reason):
listRecentlyClosedIssues()(drives H22)GET /issueswithstate=closed, deliberately unfiltered — it is the instrument controlIssue/PR queries that never touch a
pm:*label:listAllOpenIssues()(alreadyopen-scoped),
listOpenPrs(),listRecentlyMergedPrs(), the per-card comment fetch, PRdetail, PR files, the
Blocked-by:target read, the repo probe, the commit window and theissue-event window — all by number or unfiltered.
Scripts that query no issues at all by
pm:*label, so they are out of populationentirely — this is the "measure, don't assume" half the dispatch asked for:
ci-failure.mjs— check-runs, annotations, action runs/jobs, one PR by number.check-governed-merges.mjs— one PR by number.check-governed-queue-guard.mjs— one PR's reviews and head.check-label-desc-cap.mjs— its twopm:strings are self-test fixture text inside agh label createline; it makes no API call.dispatch-gates.mjs— no API calls; its onlypm:grep hit ispnpm:inside avariable name, not a label.
ensure-pm-labels.sh— creates and reconciles label objects; never queries issues.bare-root-worklist.mjs,check-dispatch-gates.mjs,check-governed-prose.mjs,check-skill-id-lint.mjs,check-skill-line-ratchet.mjs,git-history.mjs,release-rehearsal-clone.mjs,os-verify-lock.sh,os-regen-merge.sh— no API calls..github/workflows/half-state-patrol.yml, the only patrol path these scripts drive —its sole API write is an anchor-issue update; it runs no label query.
Item ② — the census leg, re-judged
renderClosedResidueCensuswent from a block (bold heading, a row per label, a nested rowper lane, a page-cap alarm, a control-failure alarm, a contradictory-pair roster, and two
closing warnings) to one informational line, italic in markdown — the styling the
healthy rate premise already uses, deliberately not the bold heading a finding block wears.
What was kept and why:
cost lands on the patrol workflow's own runner token (15,000/h core), not on the shared
agent pool the 2026-08-16 ruling protects.
#4690instrument caveats survive, demoted to a parenthesis. A page cap is stillnot a count and an empty control still means "not read" — that is about the instrument,
and the ruling was about the board.
censusIsCountableis untouched. The two caveatsare now mutually exclusive on the line, and a pin refuses the naive fallback that would
let a capped census also blame the control.
findover
rows— the first row carrying anoldest— androwsis sorted by size, so itreported the oldest closure of the largest label while reading as the population's
floor. Now a global minimum, with a pin whose fixture puts the real floor on the smaller
label.
Why H22 was left alone — stated because it is the one judgment call here
H22 also reports
pm:*residue on closed cards, and as finding rows. It is deliberatelynot changed, and the PM should confirm this reading:
different shape.
window, is the only mechanism that observes that convention; deleting it would silently
retire a rule the ruling explicitly retained.
produced now, while the paired write is still a live duty someone remembers.
If the PM reads 「普查时不应该只看open的卡片吗」 as reaching H22 too, that is a one-line
change to
h22ClosedCardPmResidueand belongs on its own card rather than smuggled in here.Verification
Authored by Claude Code session
session_01EnE7G31tqbxN1rqpQmzurT(durable attributioncopy — a body edit rewrites the footer below).
node scripts/pm/check-half-states.mjs --self-test— before:✓ check-half-states self-test: 1791 cases pass.(exit 0). After:✓ check-half-states self-test: 1826 cases pass.(exit 0). 35 new pins.counting the injected and the original spelling, each restored and the restore proved by
git hash-objectequality against the HEAD blob:pmLabelListingPath— 8 pins red, exit 1.find— 2 pins red, exit 1.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(exit 0; it reads the merge-base change set itself). 17 derivedplus 2 convention-triggered for a gate-script edit. 16 green; three are not readings and
say so themselves:
check-partof-closing-keywordexits 2 NOT WIRED without a PR body in theenvironment (its
pnpm check:partof-closing-keywordspelling is green, and this body waschecked against it separately),
check-test-completenessexits 3 and instructs the localfamily runner to record NOT MEASURED, and the live
check-half-statessweep exits 3PREREQUISITE NOT MET because this container's session gate refuses repo-scoped reads.
pnpm lint(repo-wideeslint . --no-inline-config, no narrowing) — exit 0, 103s.node scripts/check-nul-bytes.mjs— OK, 7,574 text files, no raw control bytes.54f5b104— the gate families above,pnpm lintand theself-test all ran on that tree, which is this PR head.
No changeset: the diff is
scripts/pm/**only, which publishes from no package — theskip-changesetclosed list. The label is applied on this PR.Refs: #13526 and PR #13601 (the census leg being re-judged) · #13597.
Generated by Claude Code