Skip to content

Tracker: CODESTYLE.md > Shell #4474

Done

Description

@ptr727

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 trap's child wait and escalate to SIGKILL, as the Python rule does. Raised by CodeRabbit on Resync the Instruction Set and Skills Tree to the Hub PlexCleaner#1294, against the carried "Interrupts in Shell" bullet on the INT and TERM traps, carried at the hub's main 5c06f173. The bullet sends SIGTERM to each child and then runs a bare wait. A child that ignores or traps SIGTERM keeps the trap waiting, so it never prints the line, clears itself, or re-sends the signal, and the script hangs on Ctrl-C. "Interrupts in Python" bounds the same step with wait(timeout=...) followed by kill() and wait(), so the two language sections disagree on this point.

Activity

  1. added
    pre-existing
    prose
    on Nov 26, 2026
  2. ptr727 commented on Nov 26, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-25): this group merged into develop as #4477 and its branch and worktree were cleaned up, so the claim holds no files.

    Backlog burndown claim (away run 2026-11-25, round 3, group D3): branch burndown/tracker-agents-shell-fixes, issues #4473 and #4474, the findings each tracker lists.

    Predicted files:

    The generated include in .agents/skills/shell-codestyle/SKILL.md and the generated copies under .github/skills/ and .claude-plugin/ are written by scripts/build_dist.py and are not counted.

    Any other group needing one of these files waits for this branch to merge.

  3. ptr727 commented on Nov 26, 2026

    @ptr727
    OwnerAuthor

    Finding against develop's "Interrupts in Shell", seen while applying it downstream (ptr727/PlexCleaner#1307).

    The bounded wait escalates to SIGKILL on the tracked child once the bound passes. Where that child is a docker run CLI, SIGKILL ends only the CLI. The container keeps running, since the CLI no longer proxies anything and --rm waits for the container's own exit. A script whose EXIT trap then restores shared state, such as rolling back a dataset the container has mounted read-write, restores it underneath a container that is still writing. A later run reusing a fixed --name then fails on the name conflict while the orphan lives.

    A .NET process inside such a container cancels on SIGTERM and can take well past 10 seconds to unwind, so the bound is reached in ordinary use.

    PlexCleaner kept main's wording, SIGTERM then an unbounded wait, for that reason. A rule carrying the bound could name the case: where the child is a container client, the trap stops the container itself, for example docker stop --time "<n>" "<name>", before the bounded wait on the client. Or it could exempt such a child from the SIGKILL step.

  4. ptr727 commented on Nov 26, 2026

    @ptr727
    OwnerAuthor

    Finding against main's "Interrupts in Shell", the INT and TERM trap bullet, raised by a local strict review on ptr727/PlexCleaner#1308.

    The bullet has the trap send SIGTERM with kill to the children the script started, then wait for them. It has no case for a child that passes no signal on. A docker run CLI holding a TTY, started with -it whenever standard input is a terminal, is such a child: the CLI turns off signal proxying in TTY mode, so the SIGTERM never reaches the container. The CLI either dies, which leaves the container running while the EXIT trap restores shared state underneath it, or it keeps waiting, which holds the trap until the container finishes on its own.

    PlexCleaner's harness now sends SIGTERM to the container by name, docker kill --signal TERM "<name>", then waits on the CLI, which exits once the container stops. It signals the CLI only where no container run is active or the docker kill fails. A reviewer applying the bullet as written reads that trap as non-conformant, since the CLI child is never sent SIGTERM itself.

    A rule naming the case could read: where a child is a container client, the trap stops the container itself rather than signalling the client, then waits on the client. That is the same case the earlier comment on this tracker raises for the bounded wait's SIGKILL step, so one wording could cover both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pre-existingprose

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions