Repository navigation
Description
Per-unit tracker for findings raised against this canonical unit by a carrying repository's review, per pr-review-conduct Merge Gate item 3.
Findings
-
Bound the wait after
terminate()on aPopenchild, with akill()fallback. Raised by CodeRabbit on Resync the Instruction Set and Carried Skills With the Hub NxWitness#685, against the carriedCODESTYLE.md"Interrupts in Python" at line 132, carried at the hub'smain2d0f8901. In the reviewer's words: "The rule waits without a bound afterterminate(). A child that ignores SIGTERM can keep the script from printing its interrupt line or exiting with 143/130." It proposeswait(timeout=...), thenkill()and a second wait onsubprocess.TimeoutExpired. It notes that "Interrupts in Shell" has the same unboundedwait, which Bash cannot time out directly.- Not judged here. The carrier declined it under outcome 2, since the text is the hub's to change.
-
Install a SIGINT handler explicitly rather than relying on Python's default. Raised by CodeRabbit on Resync the Instruction Set and Skills Tree With the Hub PlexCleaner#1259, against the carried
CODESTYLE.md"Interrupts in Python" first bullet, carried at the hub'smain009d3e5e. Python raisesKeyboardInterrupton SIGINT only where the parent did not start it with SIGINT ignored. A non-interactive shell starts a background command that way, so a script following the rule ignores SIGINT and skips its cleanup and its exit 130. It proposes that the entry point install handlers for both signals withsignal.signal, each recording the signal and raisingKeyboardInterrupt.- Not judged here. The carrier declined it under outcome 2, since the text is the hub's to change.
-
The bounded-wait finding above was raised again by CodeRabbit on Resync the Instruction Set and Skills Tree With the Hub PlexCleaner#1259, against the same bullet carried at
009d3e5e, again naming the Shellwaitas well. -
State the
__enter__window in the cleanup bullet. Raised by CodeRabbit on Promote Develop: Hub Resync to 009d3e5e and the .NET SDK Line PlexCleaner#1261, against the carriedCODESTYLE.md"Interrupts in Python" bullet "What the script holds is released bywithblocks andfinallyclauses as the exception unwinds", carried at009d3e5e. AKeyboardInterruptraised inside__enter__, after a resource is acquired and before the method returns, skips__exit__, so a lock or temporary path can stay held. It proposes limiting the claim to after__enter__returns and naming the window as uncovered.- Not judged here. The carrier declined it under outcome 2, since the text is the hub's to change.
🤖 Generated with Claude Code
Activity
Resync the Instruction Set and Carried Skills With the Hub (#685)
ptr727 commentedon Nov 20, 2026
Decision triage, 2026-11-19. Which of the three CodeRabbit findings against
CODESTYLE.md"Interrupts in Python" should become rule text: bound the wait afterterminate(), install a SIGINT handler even where SIGINT was inherited as ignored, and state the__enter__window?Each finding was raised by a carrying repository and declined there under outcome 2, since the text is the hub's. None is judged yet. They are three separate sub-decisions, answered together here so they agree with each other and with the two Shell findings on #4218. The proposed test for all five: a gap a script closes cheaply becomes rule text, a gap no script can close is stated in one sentence where it changes what the sender of a signal does, and anything else is declined under
GOVERNANCE.md"Trust Boundaries and Hardening Effort".Finding 1: bound the wait after
terminate(), with akill()fallbackterminate(), thenwait(timeout=...), such as 10 seconds, thenkill()andwait()onsubprocess.TimeoutExpired. It is the documentedsubprocessidiom and costs three lines. Once Decide Whether the Python Interrupt Rule Routes SIGINT Through the SIGTERM Handler and Passes Over a Later Signal #4146 lands, a second Ctrl-C is passed over by the script, so a child that ignores SIGTERM can be escaped only by a SIGKILL to the script, which skips everyfinallyand leaves locks and temporary paths behind. The Shellwaitstays unbounded, since Bash has no timedwaitand a watchdog is another child to stop.Finding 2: install a SIGINT handler even where SIGINT was inherited as ignored
signal.getsignal(signal.SIGINT)is stilldefault_int_handler. Bash cannot override an inherited ignore at all, so this keeps both languages on one behaviour: a stop meant to reach such a script sends SIGTERM. Tracker:CODESTYLE.md > Shell#4218 finding 1 recommends stating that once, in the general "Interrupts" section.Finding 3: state the
__enter__window__enter__and its return. Everywithstatement in CPython has it, and no rule a script can follow closes it short of masking signals around each acquisition. The chance of a Ctrl-C landing inside it is very small, and stating it would change nothing a script author does.__enter__returns, and name the window as uncovered. This is accurate and costs one sentence, but it adds a caveat to a bullet that prescribes a mechanism rather than promising an outcome.Evidence:
2d0f8901and009d3e5e. The rule text is unchanged onmainanddevelopsince.mainordevelopyet..github/actions/prose-gate/prose_lint.py,catalog/snippets/hub_fetch_run.py,scripts/backlog_metrics.py, andscripts/secrets_sync.pyonmaineach install the SIGINT handler only where it is stilldefault_int_handler, under the comment "A SIGINT inherited as ignored, as a background child's is, stays ignored."catalog/snippets/hub_fetch_run.pyandscripts/secrets_sync.pyonmainuse the unboundedterminate()thenwait()that finding 1 targets.GOVERNANCE.md"Trust Boundaries and Hardening Effort": "Effort follows likelihood times consequence, for robustness as much as for trust."Effect on work in flight: No open pull request touches the section. The #4146 change edits the same two bullets, so findings 1 and 2 belong in that one pull request, which also regenerates
.agents/skills/python-codestyle/SKILL.mdthroughscripts/build_dist.py. Accepting finding 1 makeshub_fetch_run.pyandsecrets_sync.pyfollow-up work when each is next edited, per "A script takes this rule when it is created or next edited". Accepting finding 2 instead would make every script listed above follow-up work.ptr727 commentedon Nov 20, 2026
Maintainer's answer, 2026-11-19 (decision triage): option 1 on each finding. Finding 1 accepted for Python only:
terminate(), thenwait(timeout=...), thenkill()andwait()onTimeoutExpired. The Shellwaitstays unbounded. Finding 2 declined, and the rule text states that a SIGINT inherited as ignored stays ignored. Finding 3 declined under "Trust Boundaries and Hardening Effort". This is now work, and it belongs in the same pull request as #4146 and #4218, which edit the same bullets.ptr727 commentedon Nov 20, 2026
Backlog burndown claim (2026-11-19 attended run, round 1, group 2): branch
burndown/interrupt-signal-rules.Issues: #4146, #4100, #4218.
Predicted file set:
CODESTYLE.mdhost-setup/agent-safety/global_rules.pytests/test_global_rules.pyscripts/docker_lint.pytests/test_docker_lint.pyGenerated from those: the include regions in
.agents/skills/python-codestyle/SKILL.mdand.agents/skills/shell-codestyle/SKILL.md, and their.github/skillsand.claude-plugincopies and source digests.Route SIGINT and SIGTERM Through One Handler, Bound the Child Wait, a…