Skip to content

fix(pm): the leading-sigil near-miss regex refuses a long symbol run in linear time, so the live half-state sweep no longer hangs on a drawn rule - #33053

Merged
os-zhuang merged 4 commits into
mainfrom
claude/project-thread-146du3
Nov 13, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/project-thread-146du3

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Fixes #32991

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:半状态巡查脚本里一条识别「符号开头的认领/释放行」的正则,换成等价但不会回溯爆炸的写法;工作流 timeout-minutes 15 → 25,并在注释里写明依据与 ⛔ 不得为挂起而加大上限。
  • 为什么改:超时不是看板变大,而是 An app package's dashboard tile on a sibling module's dataset answers 409 on main; os validate accepts it (HotCRM CRM Overview regresses against 18.3.0) #32929 上一条评论画了四行 40 个「─」的分隔线,旧正则在这种行上要尝试约 2 的 40 次方种切分,CPU 卡死,巡查被 15 分钟上限取消。另外实测 10-30 至 11-09 的 43 次绿跑里最慢 14m02s,离 15 分钟只差 58 秒,所以上限一并放到 25(约最慢一次的 1.78 倍)。
  • 风险与回滚:新旧正则在 31 万多条字符串上匹配结果完全一致;自测新增 28 字符计时钉(<250 ms),旧写法下按名变红而不是挂住。回滚即还原本 PR。
  • 先看:scripts/pm/check-half-states.mjs 的 leading-sigil 一行正则与 BATTERY68 三条 half-state-patrol: the "Live half-state sweep" PR job now runs past its 15-minute cap #32991 用例;.github/workflows/half-state-patrol.yml 的上限注释。
  • 两分钟验证:node scripts/pm/check-half-states.mjs --self-test,应见 5256 cases pass,含三条 half-state-patrol: the "Live half-state sweep" PR job now runs past its 15-minute cap #32991 用例。
  • 需要你做的:本 PR 改动了持有密钥/写令牌的工作流(Tier H)。契约复审在现 head 已 PASS(评论 6848055804,Head-sha 0b448a73ae6c6f63d66fb558237923cefc682c44),请以 os-zhuang 批准;批准后席位落地。
  • 席位意见:同意落地。本 PR 不走派发时的 A/B 任一分支(根因是正则 ReDoS,不是看板增长),上限 25 也由席位确认,两项作为接受的偏差记在 ACCEPT 里。本 head 的 Live half-state sweep(run 43390711926)绿,job 13m22s。复审余两个 nit,不再移 head。

What changes

OWNERSHIP_MARKER_NEAR_MISS_FORMS' leading-sigil member spelled its sigil run as a repeated group that starts with a sigil and may also swallow the next one: (?:S[S, marks]*[ \t]*)+. On a line that is a long symbol run with no Claim/Release after it, V8 tries every way to split the run before it refuses. The same language is now spelled unrolled, S C*(?:[ \t]+S C*)*[ \t]* (S = So/Sm/Sk/Sc, C = S plus Mn/Me/Cf), so each blank run must be followed by a new sigil and there is one way to split any line. A docblock paragraph states why the nested spelling is refused.

BATTERY68 gains three cases. A 28-sigil pin must be refused in under 250 ms. Only if it passed are the long shapes (the 40-─ rule on #32929, 40 backticks, 40 sigils under a bullet, 4,000 ═) evaluated, and they must name nothing in under a second; otherwise that case reports NOT RUN and goes red by name, so the gate cannot hang. A control checks that a 40-sigil run in front of Release: is still named leading-sigil.

.github/workflows/half-state-patrol.yml: timeout-minutes: 15 → 25, with an eight-line comment giving the measured job durations and a ⛔ against raising the cap to turn a hang green (a hang shows as the sweep step running past twice its usual time with no check-half-states exited line).

Why

The card read the cancellations as board growth. Measurement says otherwise, so this is neither arm of the dispatch fork (cap raise or smaller read). The seat accepted that as a recorded deviation, and separately chose to raise the cap because the slowest green run already sat 58 s under the old one.

  • A local live sweep made 25 requests in 11 s, then none, at ~96% CPU. Three debugger pauses all stopped in ownershipMarkerNearMissCensus at form.re.exec(line).
  • An app package's dashboard tile on a sibling module's dataset answers 409 on main; os validate accepts it (HotCRM CRM Overview regresses against 18.3.0) #32929 comment 6840027098 carries four lines of 40 ─ (U+2500, So). The nested spelling's cost doubles per sigil; at 40 it is far past any cap, so a cap raise alone could not fix it.
  • Every one of the file's 73 exported regexes was run on 28-char runs of 21 hostile characters with 4 line prefixes. Only leading-sigil was slow. After the fix, none was.
  • Job durations, all 43 green runs 2026-10-30 → 2026-11-09: slowest 14m02s (run 41076277250); the census step 4m01s–5m55s in the 42 ordinary runs.

Tests

  • node scripts/pm/check-half-states.mjs --self-test: exit 0, 5256 cases pass, including the three half-state-patrol: the "Live half-state sweep" PR job now runs past its 15-minute cap #32991 cases.
  • Ablation: only the old regex put back, --self-test exits 1 after about 4 s with two of 5,256 cases failing by name (the pin and the NOT RUN long-shape case).
  • Equivalence, old vs new regex, comparing the matched prefix (or no match): 13,630 string-literal lines from the file itself, 17 hand cases, and 300,000 seeded random strings over a hostile alphabet. 313,647 compared, 0 differences.
  • Live half-state sweep on this PR: run 43390711926 green on head 0b448a7, job 13m22s, sweep step 6m22s.

Acceptance notes

  • Changeset: none. scripts/pm/** and .github/workflows/** are unpublished, so this carries the skip-changeset label.
  • Governed path: .github/workflows/half-state-patrol.yml is Tier H by content (the workflow holds a secret or a write token). scripts/pm/check-half-states.mjs is outside the reduced-read arm the claim allowed; the seat accepted that as a deviation.
  • Known limits (not held against this PR): sibling boards pinned to an older sha keep the hang until they re-pin; a long leading blank run still costs quadratic time (predates this PR, candidate card).

Verification

Check-runs on head 0b448a7: 37 success, 12 skipped, 0 failing

Lint · repo & tooling gates ran the self-test: 5,256 cases, about 1.3 s. Live half-state sweep run 43390711926: success. Change set: 2 paths, +40/−2. Main merged once (c54a23d) before opening; K = 12 at handover.


Generated by Claude Code

…in linear time, so the live half-state sweep no longer hangs on a drawn rule

The `leading-sigil` member of OWNERSHIP_MARKER_NEAR_MISS_FORMS spelled its
sigil run as a repeated group that starts with a sigil and may swallow the
next one, `(?:S[S…]*[ \t]*)+`. On a line that is a long symbol run with no
word after it, V8 tries every split of the run before refusing: 24 chars
took 37 ms, 28 chars about 3 s, doubling per char. A comment on #32929
carries four rules drawn as 40 `─` each, and the census pinned a CPU on the
first of them, so the live sweep was cancelled at the job's 15-minute cap.

The same language is now spelled unrolled, `S C*(?:[ \t]+S C*)*[ \t]*`,
and BATTERY68 times the measured line plus three longer runs.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxu6hocBQwdu8NE3UW
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 13, 2026
…sured after the near-miss regex fix

With the regex hang fixed, this job's own pull_request run 43379300629
finished green in 13m30s against the 15-minute cap, which leaves under two
minutes of headroom. A week earlier (run 42173539847, 2026-11-06) the same
job took 6m28s. The sweep step went from 4m27s to 6m42s and the citation
census from 41s to 5m26s. 25 minutes is about 1.85x the measured 13m30s,
and the inline comment says why a hang must not be answered with a cap.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxu6hocBQwdu8NE3UW
@github-actions github-actions Bot added the ci/cd label Nov 13, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-tesla · session_01L9qibvXzthnUYrxzphgFgW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d5ea36dddae0929b542736fca08bb02d31e8d446
Local-runs: none
Scope: .github/workflows/half-state-patrol.yml + scripts/pm/check-half-states.mjs

No must-fix. Two should-fix findings (④ S1 and S2), each owing a fix and a delta record at the head that carries it. Landing this head as it stands would put S1's sentence into a governed file.

What was read: card #32991 with its three comments (triage 6842267388, claim 6845472477, os-dev-report 6846241762); PR #33053's body, file list and net diff against main; the 49 check-runs on the head; and, because ④ asks whether the runs the workflow comment cites support it, this workflow's run history (step timings of 20 runs, and the census line in six job logs).

Check-runs read 2026-11-13T07:44Z: 37 success, 12 skipped, none failing, none in progress. Live half-state sweep run 43383893029 is green on this head: job 13m21s, sweep step 6m28s ending in check-half-states exited 0, census 5m31s.

① Derived judgments

Notation: S is the sigil class (So, Sm, Sk, Sc), C is S plus Mn, Me, Cf, and B is [ \t]. The diff changes only the middle of leading-sigil.re, from (?:S C* B*)+ to S C* (?:B+ S C*)* B*.

  1. Same language: right. New is inside old, because each S C* B+ and the final S C* B* is one old group. Old is inside new, because two old groups with no blank between them merge into one S C* (S is a subset of C), which leaves groups separated by at least one blank. The rest of the regex is untouched, and neither spelling has a lookaround, a backreference or an atomic group, so a line matches one exactly when it matches the other.
  2. Same matched prefix: right. The census prints hit[0]. A colon (: or :) is in none of S, C, B, the decoration class, the quote and list prefixes or the word, so only the final [::] can consume one, and every match ends at the line's first colon. hit[0] is byte-identical under both spellings. There are no capture groups.
  3. Refusal cost on a symbol run with no word after it: right. The nested spelling has 2^(n-1) ways to cut a run of n sigils and tries them all. The unrolled one has one parse per run, because a group boundary now needs a blank.
  4. Census output: right. It is unchanged for every line the old spelling finished on. A thread that carries a drawn rule is now judged, where before it hung the sweep.
  5. Self-test: right, with S2. BATTERY68 gains two cases (5,255 in all; the battery registers 215 against a pin of 184, so no pin moves). The first is a wall-clock assertion. Both printed as passing on this head in Lint · repo & tooling gates.
  6. Cap 15 → 25: right in number, wrong in one sentence of its stated reason (S1). patrol is the workflow's only job, so the cap covers both the pull_request proof and the workflow_dispatch patrol that writes the anchor. A healthy run is unaffected. A run that hangs now holds the runner and the half-state-patrol concurrency group for up to 25 minutes, 10 more than before. All of the 40 most recent runs are pull_request runs, so the writing patrol has no recent measurement under either cap.
  7. Nothing else in the job moves: right. The workflow diff is one hunk, +9 −1: eight comment lines and the number. on:, the paths filter, permissions, concurrency, every step, the token inputs and the if: guards are byte-identical to main.

② Semver level

Nothing publishes. The two paths are .github/workflows/half-state-patrol.yml and scripts/pm/check-half-states.mjs. The root package is private, scripts/ is in no workspace glob, and the diff adds no .changeset file. The PR carries skip-changeset, Check Changeset concluded skipped, and that label is the correct one here.

The declaration Clause-②: no is confirmed, on the PR body and on the claim. The form accepts exactly the lines it accepted before (① 1), and a job cap is no public surface. Metadata-protocol: none is also correct.

One channel sits outside semver. The workflow's header has sibling boards call the patrol action pinned to a sha of this repository, so a sibling on an older pin keeps the nested spelling until it re-pins (③).

③ Boundary flags

Dev flags (os-dev-report 6846241762, written at head 4b2b106, one commit before this head):

  • Deviation: the fix is outside the cap-or-smaller-read fork. Correct on the merits. The three cancelled runs (43341371697, 43345004879, 43365472889) each died inside the sweep step after 14m40s to 14m42s, where that step takes 3m35s to 6m42s when healthy, and the third's log has no line between the step's start and the cancel. A cost of 2^39 is out of reach of any cap, and a smaller read would only have skipped the line. At this head the PR also takes the cap arm, so the tree is the fix plus the cap, no longer "neither arm".
  • Deviation: scripts/pm/check-half-states.mjs touched. That is where the defect lives, and the claim's file surface named the file conditionally. The card carries no acceptance in the seat's own words: its three comments are the triage, the claim and the dev's report, and the "06:10Z" acceptance exists only in the dev's account. Escalated to the seat: write the acceptance at ACCEPT.
  • Deviation: worked in the thread's checkout, not a worktree. No effect on the tree. Nothing to review.
  • Deviation: the seat records the run on the PR body. The body is now stale against this head, and the seat owes the PATCH before any landing step. It says the workflow is untouched and timeout-minutes: 15 stays (the 维护者速读 says the same), that no .github/workflows/** path is touched, that the change set is one path at +21/-1, and that the gates were run at head 4b2b106. The PR's one governed change is the thing its body denies.
  • Open question: raise the cap in this PR? The tree answers B (commit d5ea36d, three minutes after the report). No answer is recorded on the card. B is inside the claim's own order ("a measured cap"), so it needs no new ruling, and the number holds (④). Option C, trimming the census or sweep cost, is still open and is the seat's card decision.
  • Out of scope: "the citation census grew from 41s to 5m26s". Refuted. Do not file it as written. The 41 s comes from run 42173539847, another PR's run, whose census step printed 48257 unresolvable sites. Every other sampled run prints 100 and spends 4m15s to 5m55s on the census, including 4m41s to 4m51s in three runs earlier that same day. What the runs do show is a steady cost of roughly 40% to 50% of the job; whether that earns a card is option C. Why that one run printed 48257 was not looked into here.
  • security_findings: none. Understated. The defect was a ReDoS on text any commenter controls: one line of 40 =, ~, ─ or backticks on a swept thread was enough. Severity is low, because the patrol is report-only, and this PR closes the exponential class.

Reviewer flags:

  • Siblings pinned to an older sha keep the hang (②). The inputs do not say whether any sibling has adopted the action. Escalated to the seat.
  • A polynomial residue predates this PR and is unchanged by it. ^[ \t]*>?[ \t]* puts two blank loops side by side in six of the eight forms and in MARKER_LIST_ITEM_PREFIX, and both markers open with ^\s*>?\s*. Refusing a line that opens with n blanks costs on the order of n² steps per regex (derived by reading, not measured). It takes tens of thousands of leading blanks on one line to matter, so ordinary comments are no risk to the cap. The dev's fuzz used 28-character inputs, which can show an exponential shape and cannot show this one. Escalated as a candidate card. Not held against this PR.
  • The docblock's account of An app package's dashboard tile on a sibling module's dataset answers 409 on main; os validate accepts it (HotCRM CRM Overview regresses against 18.3.0) #32929 comment 6840027098 (four rules of 40 ─) is outside this review's input set and was not checked. The verdict does not rest on it.
  • The PR's author login is objectstack-fleet[bot], so no off-relay author note is owed.

④ Design judgment

.github/workflows/half-state-patrol.yml (the hits file)

  • The cap holds. 17 other green runs sampled from 2026-10-30 to 2026-11-09 took 9m21s to 14m02s as jobs, and the two on this PR took 13m27s and 13m21s. 25 minutes is 1.78 times the slowest of them (run 41076277250, 14m02s).
  • The ⛔ holds as a rule, and it matches the card's order to fix by measurement.
  • S1, should-fix: the comment's growth sentence is not supported by the runs it cites. "On a job that took 6m28s (run 42173539847, 2026-11-06)" and "the citation census from 41s to 5m26s over that week" both rest on that one run. It is the outlier of the series and is not comparable (③: 48257 sites against 100). Three other runs that same day took 10m15s to 10m44s. Run 41076277250 took 14m02s on 2026-10-30, 58 seconds under the old cap, two weeks before the regex ever hung. The sweep step's 6m42s is 11 seconds above its earlier maximum in the sample (6m31s, run 41505557551). So the job did not double in a week. It has ranged from 9m21s to 14m02s since 2026-10-30, and 15 never had real headroom. The fix is to state that range and drop the outlier; the number 25 does not change. The dev's out-of-scope finding shows the wrong reading already travelling.
  • Nit. The ⛔ names a signal a runner does not show ("requests stopping while the CPU stays pinned"). A cancelled run's log shows only the step's start and the cancel. What a seat can read off a run is the sweep step running past twice its usual time with no check-half-states exited line.

scripts/pm/check-half-states.mjs (the implementing file)

  • The rewrite agrees with the contract (① 1 to 3) and removes the exponential shape for every input, not only the 40-─ line. Shapes traced by hand through the new spelling:
    • a symbol run of any length, alone or followed by a word with no colon: linear, because C* gives back one character at a time and each give-back fails in constant time;
    • a run of backticks, which are both sigils (Sk) and decoration: at most four tries per position;
    • alternating sigils and blank runs: each group must open on a blank and end on a non-blank, so the groups have one parse and unwinding is linear;
    • sigils with Mn, Me or Cf marks, joined emoji, and a mark straight after a blank: one C* loop, or an immediate refusal;
    • > and +, which are both prefixes and sigils (Sm): at most four prefix readings, a constant factor;
    • a long blank run after a sigil or after the word: linear;
    • a long blank run at the start of the line: quadratic. This is the residue named in ③, and it is identical under the old spelling.
  • No sibling has the same shape, as far as a text scan reaches. A scan of the head's copy for a repeated group whose body ends in a quantifier finds five other regex lines (2670, 3395, 4591, 10655, 15469). In each, the group opens on a literal the rest of the group cannot consume.
  • S2, should-fix: the timing pin cannot go red on the defect it names. It hangs. The harness evaluates every case's arguments before it prints anything. Under the nested spelling the fixture's first line costs 2^39 cuts, which is hours by the dev's own figure of about 3 s at 28 characters, and the 4,000-═ line never returns. So the under-1000 ms assertion is never reached and no case name is printed. The regression shows up as pnpm check:pm-half-states cancelled at its lint cap with no output, which is this card's own symptom moved into the lint gate. The dev's ablation shows exactly that: exit 124 under timeout 120. The regression still cannot land green, so this is not a must-fix. The fix is small: time a run the nested spelling finishes in seconds (28 to 30 characters by the dev's table), assert on it, and evaluate the long shapes only when it passed.
  • The bound is safe on a slow runner. The fixture is about 4,200 characters of linear work over about a dozen regex passes per line, milliseconds at most against 1000 ms, and it passed on this head's runner.
  • Nit. At 4,000 characters a quadratic spelling also finishes well under 1000 ms, so the case pins "not exponential", which is less than its "linear time" wording. Its comment's "took minutes on that line" was never measured to completion.
  • The docblock's ⛔ paragraph is accurate where the inputs reach: the same lines read, 2^n cuts, and three cancelled runs in a row with nothing printed.

Implemented-by: claude/project-thread-146du3
Reviewed-by: session_01L9qibvXzthnUYrxzphgFgW

VERDICT: PASS

…f hanging, and the cap comment states the measured run range

The contract review's two should-fixes on PR #33053:

- The workflow comment read growth off run 42173539847, an outlier whose
  census printed 48,257 sites where every other run printed 100. It now
  gives the measured range instead: green jobs took 9m21s to 14m02s from
  2026-10-30 to 2026-11-09 (the slowest, run 41076277250, ran 58s under
  the old cap) and 13m21s to 13m27s on this PR, so 25 is about 1.78x the
  slowest run. The hang signal it names is one a runner shows: the sweep
  step running past twice its usual time with no `check-half-states
  exited` line.
- BATTERY68 now pins a 28-sigil run (about 3 s under the nested spelling,
  well under 1 ms unrolled) against a 250 ms bound, and runs the long
  shapes only after that pin passed. With the old regex put back, the
  self-test exits 1 in 4 s, naming both #32991 cases, where before it hung.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxu6hocBQwdu8NE3UW
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-tesla · session_01L9qibvXzthnUYrxzphgFgW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 0b448a73ae6c6f63d66fb558237923cefc682c44
Local-runs: probe — one in-memory node timing of the leading-sigil literal as spelled on main and on this head, both read as text; the 250 ms pin rests on what the nested spelling costs on 28 sigils, and no check-run executes that spelling. This record's own key lines were also read back once through the readers in main's record-recognisers.mjs, which runs nothing from the PR
Scope: .github/workflows/half-state-patrol.yml + scripts/pm/check-half-states.mjs

S1 is closed and S2 is closed. No must-fix and no should-fix on this head. Two new nits came in with the fixes (④), and both trace back to numbers the earlier record passed on (comment 6847199396 on the PR, head d5ea36d). Nits alone end the round.

This record judges the hunks that moved between d5ea36d and this head, one commit. What was read: that diff; the card's two newer comments (os-dev-report round 2, 6846904766, and round 3, 6847866554); the PR body; the 49 check-runs on this head; and the job timings of all 43 runs of this workflow from 2026-10-30 to 2026-11-09, because the rewritten comment states their range.

Check-runs read 2026-11-13T08:32Z: 37 success, 12 skipped, none failing, none in progress. Live half-state sweep run 43390711926 is green on this head: job 13m22s, sweep step 6m22s, census 5m37s. Lint · repo & tooling gates printed all three #32991 cases as passing, 5,256 cases in all, with the whole self-test done in about 1.3 s.

① Derived judgments

  1. Workflow: comment text only. Right. timeout-minutes: 25 and every other line of the job are as they were on d5ea36d. Against main the file is still one hunk, +9 −1: eight comment lines and the number.
  2. Sweeper regex: unchanged. The leading-sigil literal is byte-identical to d5ea36d, so the earlier record's judgments on language, matched prefix and cost stand on this head as written.
  3. Self-test: two timing cases where there was one. Right. A 28-sigil pin is evaluated first, and the four long shapes are evaluated only if it passed. BATTERY68 registers 216 cases against a pin of 184. Under the nested spelling the pin now fails and both timing cases go red by name (④), where on d5ea36d the suite hung with nothing printed.
  4. Docblock: one sentence rewritten to match. Right, apart from the figure in nit 2.

② Semver level

Unchanged. Nothing publishes: the same two paths, no .changeset file, skip-changeset still on the PR, Check Changeset skipped. The declaration Clause-②: no and Metadata-protocol: none both still hold; no hunk in this delta touches what the form accepts.

③ Boundary flags

Carried from the earlier record:

New in this delta: the dev's round-3 ablation (old regex restored, --self-test exits 1 after 4 s with two of 5,256 cases failed) was not re-run here. The probe timed the literal alone, and its result agrees with that outcome (④).

④ Design judgment

Hunk 1: the cap comment in .github/workflows/half-state-patrol.yml (the hits file)

  • S1: closed. The growth sentence and its outlier baseline are gone. The cap now rests on the slowest run, and that end is exact: of all 43 green runs from 2026-10-30 to 2026-11-09, the slowest job is run 41076277250 at 14m02s, 58 seconds under the old cap, and 25 minutes is 1.78 times that. The two runs it names on this PR took 13m21s and 13m27s, and the third, on this head, took 13m22s.
  • The earlier nit on the ⛔ signal: closed. The comment now names what a runner shows. The action prints check-half-states exited once the sweep returns (action.yml line 339), and the cancelled run 43365472889 has no such line after 14m42s in a step whose healthy range is 3m29s to 6m42s.
  • Nit 1, new: the lower end of the range is wrong by 26 seconds, and the source is the earlier record. "Green runs of this job took 9m21s to 14m02s" holds for 41 of the 43 runs. Run 41314321415, an ordinary run, took 8m55s, and run 42173539847, the outlier, took 6m24s. The earlier record gave a 17-run sample's range as the range, and the dev copied it. Nothing rests on that end: the cap, the "58s" and the "1.78x" all come from the slowest run. Accepting it as a deviation is reasonable; the exact wording would be "8m55s to 14m02s, apart from run 42173539847".

Hunk 2: BATTERY68 and the docblock sentence in scripts/pm/check-half-states.mjs (the implementing file)

  • S2: closed. The pin goes red on the defect it names. Probe, on a 2.1 GHz Xeon with Node 22.23.4, each literal warmed first:
    • nested spelling on the pin line (28 ─ then !): 932 ms and 905 ms, no match, against a bound of 250 ms. The cost doubles per sigil from 25 (112, 223, 463 ms).
    • unrolled spelling on the same line: 0.7 µs on average over 2,000 runs, 20 µs at worst. The four long shapes together: 0.15 ms, no match on any.
  • The gating is sound. The long shapes are evaluated on one path only: the pin named nothing and finished under 250 ms. On any other path the second case reports NOT RUN: the 28-sigil pin above failed, which is not its expected value, so both cases go red by name and nothing that can hang is evaluated.
  • Safe on a slow runner. The unrolled spelling's slowest run in the probe was 20 µs against the 250 ms bound, and a slower machine only makes the nested spelling fail by more. Both cases passed on this head's runner.
  • The earlier nit on wording: closed. The case names now claim "under 250 ms" and "not exponential", which is what the bounds can show, and "took minutes" is gone.
  • Nit 2, new: "about 3 s" is not reproduced, so the pin's margin is 3.7 times, not 12. The figure is in the test comment, the case name and the docblock. The probe measured 0.9 s. The comment's own pair disagrees with its 2^(n-1) rule as well: 37 ms at 24 sigils puts 28 at about 0.6 s. The consequence is on fast hardware only. A machine about four times quicker on one thread than the probe box would let the nested spelling under 250 ms, the long shapes would then run, and the hang would return on that machine. Nothing read here puts a hosted runner in that class (the whole suite takes 1.3 s on one), so the gate is expected to hold; that is an inference, not a measurement. The earlier record suggested "28 to 30 characters" on the strength of the dev's figure without measuring it; 30 sigils would cost the nested spelling about 3.7 s here and widen the margin to about 15 times. Accept as a deviation or take the one-token change in a follow-up; either way the figure should carry its machine or go.
  • Limit of the pin, stated for the record. It covers a run of sigils. A different exponential shape, in another form or on another input, would pass the pin and hang in the long shapes as before. No finding.

Implemented-by: claude/project-thread-146du3
Reviewed-by: session_01L9qibvXzthnUYrxzphgFgW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-tesla · session_01L9qibvXzthnUYrxzphgFgW

席位核对 · ACCEPT · 2026-11-13T08:34Z

Head-sha: 0b448a73ae6c6f63d66fb558237923cefc682c44

  1. Shape. Draft PR to main, Fixes #32991, 2 files, +40/−2 ≤ 3000. GOVERNED via .github/workflows/half-state-patrol.yml, Tier H by content (ruling 6722205630 letter C: the workflow holds a secret or a write token), so it needs a human approval. No changeset (skip-changeset; nothing publishes). Clause-②: no, Metadata-protocol: none. Files: scripts/pm/check-half-states.mjs and the workflow, against claim 6845472477 (see 5).
  2. Premise. Holds, and is narrower than the card's: the cancellations come from a ReDoS in the leading-sigil near-miss form on An app package's dashboard tile on a sibling module's dataset answers 409 on main; os validate accepts it (HotCRM CRM Overview regresses against 18.3.0) #32929 comment 6840027098 (four 40-─ rules), not board growth.
  3. Review. Contract review at CONTRACT_REVIEW_TIER by an isolated sub-agent. Round 1 (6847199396, head d5ea36d) raised two should-fix: S1 was the cap comment's outlier baseline and ⛔ signal, and S2 was a timing pin that hung instead of going red. Delta r3 on this head (6848055804): PASS, both closed, 0 must-fix, 0 should-fix, 2 nits. Prose I read against the diff: the eight-line workflow comment, the docblock paragraph, the three case names.
  4. Gates. Check-runs on this head: 37 success, 12 skipped (by event or opt-in), 0 failure. Mergeable clean. Live half-state sweep run 43390711926 green: job 13m22s, sweep step 6m22s. Self-test 5,256 cases in Lint · repo & tooling gates. K = 12 < 15, so no merge of main before the handover.
  5. Accepted deviations, in the seat's own words.
    • D1, the fix is neither arm of the dispatch fork. The seat ruled at 06:10Z: fix the regex (root cause) instead of option A (cap only) or B (smaller read). check-half-states.mjs is touched outside the reduced-read arm's surface for that reason.
    • D2, the cap goes to 25. The seat ruled at 06:47Z to raise it anyway. Of all 43 green runs from 10-30 to 11-09, the slowest took 14m02s (run 41076277250), 58 s under 15. 25 is about 1.78 times that. The comment carries the ⛔ against raising it to make a hang go green.
    • N1: the comment's lower bound "9m21s" holds for 41 of the 43 runs. The exact figure is 8m55s (run 41314321415), apart from outlier 42173539847 at 6m24s. Nothing rests on the lower end.
    • N2: "about 3 s" for the nested spelling at 28 sigils was measured at 0.9 s on the reviewer's box, so the pin's margin is about 3.7 times, not 12. On a runner roughly four times faster per thread than that box, the gate would let the long shapes run and hang. Nothing read puts a hosted runner in that class (the whole suite runs in 1.3 s). Taking it to 30 sigils in a follow-up would make the margin about 15 times.
  6. Out of scope / landing.
    • Sibling boards pinned to an older sha keep the hang until they re-pin. The fix reaches them through their normal re-pin.
    • The quadratic cost of a long leading blank run predates this PR. It is a candidate card for triage, together with N2's 30-sigil change.
    • Tier H: the PR stays draft, gets pm:awaiting-merge, and review is requested from os-zhuang. After an authorized approval the seat lands it (K-count first). On MERGED: confirm half-state-patrol: the "Live half-state sweep" PR job now runs past its 15-minute cap #32991 closed, remove pm:dispatched.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 13, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 13, 2026 09:01
@os-zhuang
os-zhuang requested a review from hotlong as a code owner November 13, 2026 09:01
@os-zhuang
os-zhuang enabled auto-merge November 13, 2026 09:01
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit d60a0de Nov 13, 2026
59 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-146du3 branch November 13, 2026 09:19
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

half-state-patrol: the "Live half-state sweep" PR job now runs past its 15-minute cap

3 participants