Skip to content

Fix sub_dir default after kennel→fido package rename (closes #919)#920

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

Fix sub_dir default after kennel→fido package rename (closes #919)#920
FidoCanCode merged 1 commit into
mainfrom
fido/fix-sub-dir-default

Conversation

@FidoCanCode
Copy link
Copy Markdown
Owner

Fixes #919.

Default sub_dir was walking Path(__file__).resolve().parent.parent, which yielded /workspace/src/sub now that the package lives at src/fido/ — the real sub/ is at the repo root (/workspace/sub). Preflight rejected the missing directory and the supervisor marked the container action=fail, refusing to auto-retry.

Switches to parents[2] / "sub" and adds a regression test that the default path actually contains the five canonical sub-skill markdown files. The existing name-only test would have kept passing with the broken path.

./fido ci green locally.

`src/fido/config.py:114` was still computing
`Path(__file__).resolve().parent.parent / "sub"`, which was correct when
the Python package lived directly at the repo root (`kennel/`).  After
the move to `src/fido/` the package is one level deeper, so the relative
walk now needs to go up one more directory to reach the repo-root
`sub/` tree.

Switches to `parents[2] / "sub"` and adds a regression test that the
default `sub_dir` points at a real directory containing the five
canonical sub-skill markdown files (persona/setup/task/ci/resume).
The existing name-only test would have continued to pass with the
broken path, so the new assertion is what catches the rename drift.
@FidoCanCode FidoCanCode requested a review from rhencke April 24, 2026 17:48
@FidoCanCode FidoCanCode merged commit 0d127e8 into main Apr 24, 2026
1 check passed
@FidoCanCode FidoCanCode deleted the fido/fix-sub-dir-default branch April 24, 2026 17:49
FidoCanCode added a commit that referenced this pull request Apr 24, 2026
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.

Co-authored-by: Fido Can Code <190991155+FidoCanCode@users.noreply.github.com>
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.

Preflight fails on boot: sub_dir default still uses pre-kennel-rename path

2 participants