Skip to content

ledger_merge: --base never reads stdin (fixes the web-session hang) - #38

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/ledger-merge-classifier-timeout-g6tt13
Sep 17, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/ledger-merge-classifier-timeout-g6tt13

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

What

Same defect as the Mind's copy of scripts/ledger_merge.py, fixed the same way: classify --base origin/main blocked forever in a Claude Code web/mobile container because the source order tried stdin before --base, and the harness stdin is a socket that never closes.

Fix

  • Precedence is now explicit paths, then --base, then stdin. A --base run never touches stdin.
  • Stdin is read only when it is the sole source left.
  • Docstring, argparse help and REFERENCE.md state the order.

Tests

  • Two tests hold a stdin pipe open, never write to it, and assert --base and explicit-path runs still return.
  • One test pins that --base wins over piped paths.
  • Full Cortex suite and the Brain's cortex conductor tests (which shell out to this script) are green.

Sibling of the PyAutoMind PR of the same title.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Amh3Vn7CQGTT2XmopbZFbW


Generated by Claude Code

Same defect as the Mind's copy, fixed the same day: `classify --base
origin/main` blocked forever in a Claude Code web/mobile container because
the source order tried stdin before `--base`, and the harness stdin is a
socket that never closes.

Precedence is now explicit paths, then `--base`, then stdin. Stdin is read
only when it is the sole source left. Two regression tests hold a stdin
pipe open and never write to it, and assert that `--base` and
explicit-path runs still return; a third pins the precedence.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Amh3Vn7CQGTT2XmopbZFbW
@Jammy2211
Jammy2211 merged commit 851450e into main Sep 17, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the claude/ledger-merge-classifier-timeout-g6tt13 branch September 17, 2026 17:25
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.

2 participants