Skip to content

Consolidate sub/ path into one helper; fixes #921#923

Merged
FidoCanCode merged 1 commit into
mainfrom
fido/sub-dir-leftover-paths
Apr 24, 2026
Merged

Consolidate sub/ path into one helper; fixes #921#923
FidoCanCode merged 1 commit into
mainfrom
fido/sub-dir-leftover-paths

Conversation

@FidoCanCode
Copy link
Copy Markdown
Owner

Fixes #921.

Three separate modules (gh_status.py, status.py, worker.py) still had their own pre-rename copies of the filesystem walk to sub/. Only config.py was updated when the package moved from kennel/ to src/fido/ (#920). The other three kept pointing at the non-existent /workspace/src/sub/, which is why ClaudeSession launched claude with --system-prompt-file /workspace/src/sub/persona.md and claude exited silently with:

ClaudeSession[pid=54] stderr: Error: System prompt file not found: /workspace/src/sub/persona.md

That error was hidden behind an unread stderr pipe until #922 landed the stderr drain and made it visible. This PR fixes the actual crash by moving all four callers onto a single fido.config.default_sub_dir() helper — inline parents[N] / "sub" is now a review-time smell.

./fido ci green.

…#921)

Three separate modules were computing the filesystem walk from the
fido Python package back to the repo-root sub/ tree, each with its own
stale copy of the pre-rename formula:

- gh_status.py:18    parent.parent / "sub"   → /workspace/src/sub ❌
- status.py:361      parents[1] / "sub" / "persona.md"              ❌
- worker.py:197      parent.parent / "sub"   → /workspace/src/sub ❌
- config.py:114      parents[2] / "sub"      → fixed in #920        ✓

Only config.py got updated when the package moved from kennel/ to
src/fido/.  The other three kept pointing at the non-existent
/workspace/src/sub/, which is how ClaudeSession ended up launching
claude with --system-prompt-file /workspace/src/sub/persona.md and
claude exited silently with "System prompt file not found" written
to stderr — hidden behind the unread stderr pipe until the #922
stderr-drain made it visible.

Adds fido.config.default_sub_dir() as the single source of truth and
switches all four callers to use it.  Inline computation of this path
is now a review-time smell: grep for parents\[.\] / "sub" in any new
PR and redirect it here.
@FidoCanCode FidoCanCode requested a review from rhencke April 24, 2026 18:15
@FidoCanCode FidoCanCode merged commit cd82b18 into main Apr 24, 2026
1 check passed
@FidoCanCode FidoCanCode deleted the fido/sub-dir-leftover-paths branch April 24, 2026 18:17
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.

Workers crash on first iteration: claude session dies during set_status prompt

2 participants