Uh oh!
There was an error while loading. Please reload this page.
feat(pm): age-alarm for the domain-without-pm-state half-state (H13) + heal-backlog oldest-first discipline - #9842
Merged
Conversation
…eal-backlog oldest-first discipline - scripts/pm/check-half-states.mjs: new H13 detector — a card carrying domain:* with no pm-state label, aged past one sweep cycle (2h; the triage Routine fires hourly), is reported as a defect of the healing loop, not inventory. Louder line when the card's own title/body self-declares P0/data-integrity: the emergency-triage channel is the mandated move. Needs the sweep's only unscoped listing — the shape is invisible to every label-scoped page by construction (it was not detected at all before this change). Report-only, exit conventions unchanged; 22 new self-test cases. - dispatch-runbook.md: 半状态治愈积压排序 — sweep half-state disjuncts ②③ process oldest-first, P0-suspect first; 优先最新 applies to fresh intake only. Paid at the 223-line ceiling by deduplicating text restated from SKILL.md/os-dev (replay-identity triple restatement, claim-spelling restatement, principle restatements, self-referential section enumeration). - SKILL.md: sweep line now scopes 优先最新 to fresh intake; 状态变更不 过夜 gains the waiting-is-a-state clause (who is awaited, since when, never in session memory; a P0-suspect wait mandates the emergency channel). Net-zero lines, paid by pointing two restated details at their runbook homes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeA3nU1B5Q2pgxqxgUrexd
This was referenced Aug 19, 2026
os-warren
marked this pull request as ready for review
August 19, 2026 05:11
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 19, 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#9800
Implements all three mechanizable directions adopted at grading (maintainer verbatim, untranslated: 「项目经理等分诊,但是没有切换 label,导致挂了很久。」「我刚和他说了他才处理。」).
1.
scripts/pm/check-half-states.mjs— new H13 detectorDelta vs the card's framing (PM mechanism assumption falsified): the domain-without-pm-state shape was NOT one of the sweep's existing checks — no predicate covered it, and structurally no listing could even fetch it: every listing in the sweep is label-scoped (
pm:dispatched,pm:queue,pm:blocked,pm:seat,pm:on-hold,priority:p0), and this shape is defined by the absence of every pm-state label. The same property that hides these cards from seat candidate queries hid them from the sweep itself. So this PR adds both the detector AND the sweep's only unscoped listing (listAllOpenIssues, 10-page cap — a stated boundary, same convention as H8's merged window).h13DomainWithoutPmState(issue, nowMs)— flags an open card with adomain:*label, no pm-state label (PM_STATE_LABELS: pm:queue / pm:dispatched / pm:blocked / pm:on-hold / pm:epic / pm:seat / needs-user-decision / finding — each has a named reader;pm:blockingdeliberately excluded: it is a derived priority cache, not a state, and a card carrying only it is exactly as invisible to candidate queries), none of the sweep-exempt labels (tracking/status:parked/qa-run, mirroring the protocol's own exclusions), older thanDOMAIN_HALF_STATE_STALE_HOURS = 2.updated_at(no timeline fetch; every healing write bumps it); an unreadable timestamp flags rather than reads as fresh, same as H10/H11/H12.stripMarkdownCode, so quoting the token in backticks is not a self-declaration): prefixedP0-SUSPECT, prescribing the emergency-triage channel as the mandated move, never the hourly Routine.2.
references/dispatch-runbook.md— 半状态治愈积压排序New clause in the 紧急卡 fable 直接分诊 section: sweep half-state disjuncts ②③ process oldest-first, P0-suspect first; 优先最新 applies to fresh intake only, never to the healing backlog (starvation inversion: per-round cap + newest-first structurally starves the oldest half-states); self-declared P0/data-integrity routes through the emergency channel; the mechanical age alarm lives in the half-state patrol script (script header is the authority).
Ratchet payment (223/223 ceiling, zero headroom; net 0 lines): +5 lines of new clause paid by −5 lines of genuine dedup, not re-wrap — every deleted passage is restated elsewhere and now points at its single home: the preamble's self-referential enumeration of the file's own sections; the replay-dedup principle restatement (principle lives in SKILL.md; the identity triple stays here as the detail); the stall-reset principle restatement; the
Claim:spelling restatement (the claim protocol lives in SKILL.md); the draft-PR-early Definition-of-done restatement (lives in the os-dev definition; its "insurance, not an optimization" qualifier kept inline).3.
SKILL.md— two protocol edits, net 0 lines (681 before and after; ceiling 682)pm:blockingruling's verbatim quote (kept in the runbook's 全序 section) and the replay identity triple (kept in the runbook).Verification (all at
d41e862b0)node scripts/pm/check-half-states.mjs --self-test— "✓ check-half-states self-test: 162 cases pass." (exit 0, captured before any pipe).pm:blockingtoPM_STATE_LABELSturns exactly theH13: pm:blocking alone is NOT a statecase red (exit 1, 1 of 162); (b) flipping the threshold boundary to strict-less-than turns exactly theH13: exactly at the thresholdcase red (exit 1, 1 of 162). These are plain-node scripts with no build step, so no dist rebuild applies to the ablation.--probeexits 3: proxy-placeholder token 401 + shared-egress anonymous quota exhausted — a container class the script's own header documents), so the new unscoped listing is verified structurally (it mirrors the existing listing helpers verbatim) and through the predicate self-tests; the next Routine fire exercises it live.check:pm-skill-ratchet✓ (SKILL.md 681 lines, ceiling 682; runbook 223 lines, ceiling 223) ·check:pm-skill-id-lint✓ "9 file(s) clean" ·check:pm-half-states✓ ·check:pm-governed-mergesself-test ✓ 77 assertions ·check:partof-closing-keyword✓ 28 cases ·check:nul-bytes✓ 6278 files, no raw control bytes ·check:doc-authoring✓ 377 files clean ·check:skill-frame-sync✓ 4 copies agree ·check:cross-package-test-inputs✓ ·check:doc-formula-expressions✓ (lint package's dependency closure built first — the gate reads@objectstack/formula's built dist).node scripts/pm/dispatch-gates.mjsre-derived with no path arguments (the script computes the changed set from the merge-base itself): identical family list to dispatch time, no additional families.Governed surface (
.claude/**): this PR stays draft — a human merges it. Internal tooling and agent-instruction change only, nothing published:skip-changesetapplies.Generated by Claude Code