Skip to content

Committer follow-ups: subprocess isolation, SIGKILL escalation, YAML comment support - #3

Merged
Whamp merged 2 commits into
mainfrom
fix/committer-followups
Aug 17, 2026
Merged

Committer follow-ups: subprocess isolation, SIGKILL escalation, YAML comment support#3
Whamp merged 2 commits into
mainfrom
fix/committer-followups

Conversation

@Whamp

@Whamp Whamp commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Follow-ups to #2 (issue #1), from two independent reviews (GPT + Grok 4.6 cross-check).

Committer child hardening

  • --no-extensions on the spawned committer pi: a trusted project can no longer reload pi-brain in the child, whose turn_end hook would append to the very log.md being distilled.
  • Abort escalation fixed: proc.killed is true as soon as kill() is called, so the old !proc.killed guard never fired SIGKILL — a child ignoring SIGTERM hung the commit forever (matches hang reports on memory_commit is currently hardwired to use Antigravity #1). SIGKILL now fires unconditionally after 3s.

YAML comment support

  • Inline comments ( # outside quotes) are stripped from scalars; quoted # preserved; serializer quotes values containing # so they round-trip.
  • Comment lines no longer terminate nested maps/lists or turn # comment: lines into bogus keys. Previously committer: followed by a comment silently dropped the whole block to session defaults — including the init skeleton's own commented example.

Tests (the gap both reviews flagged)

  • 9 fake-pi spawn tests lock the argv contract: config override, per-field merge, session inherit, comment-only/unreadable/non-map/empty-string fallbacks, flag omission.
  • Abort test proves a SIGTERM-ignoring child is killed and the promise resolves (red on the old guard via bounded 9s race).
  • 10 YAML comment tests + init-skeleton tests (comment-only parses to {}, re-init preserves user config).
  • Full suite: 190 passed; pnpm run check green.

Will Hampson added 2 commits August 17, 2026 13:46
The committer child pi now runs with --no-extensions so a trusted
project cannot reload pi-brain and append to the log.md being
distilled. The abort path no longer guards SIGKILL behind
proc.killed (true as soon as kill() is called), so a child that
ignores SIGTERM is killed after 3s instead of hanging the commit.

Locks the model/thinking argv contract (config override, session
inherit, fallbacks) with fake-pi spawn tests.
parseYaml now strips inline comments (unquoted ' #' only),
skips comment lines anywhere in nested maps and lists, and no
longer turns '# comment:' lines into bogus keys or drops a nested
map separated from its key by a comment. serializeYaml quotes
values containing ' #' so they round-trip.

Also covers the init-script config skeleton: comment-only file
parses to an empty object and re-init never overwrites a user
config. Fixes a stale 'all five' mutation-checklist count.
@Whamp
Whamp merged commit fd59f3c into main Aug 17, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant