fix(api): log skipped prompt files - #181
Conversation
Unreadable prompts previously disappeared from listings without an explanation. Warn with the file path and error while preserving partial results, and cover the behavior with a selective regression test.
|
Merged — and welcome, this is your first here. I'm adding your name to You wrote the claim as a scope statement and then shipped exactly that, including leaving the activation path alone. That loop has a separate defect in it — a failed deactivation can leave two prompts active for one task — and the issue kept it out because it needs a design decision first. Thank you for keeping this change focused and reviewable. The test is the right shape too. One broken file and one healthy one, asserting both that the warning names the broken file and that the healthy prompt still comes back — that second assertion is what stops a future refactor from turning "skip and log" into "abort the request." Reverting your You also correctly omitted the suggested Fifty minutes from the issue being filed to a green PR. Thank you. |
Summary
GET /promptssilently omitted files whose reads failed, making a partial listing indistinguishable from a directory that simply contained fewer prompts.palinode.apilogger with the affected path and exception, using lazy%sformatting.Closes #179
Validation
pytest tests/test_prompts.py -q --tb=short: 16 passed.ruff check palinode/ tests/ scripts/: passed.bandit -r palinode/ -ll: passed (no medium/high findings).git diff --check: passed.The broader local pytest run was interrupted after 637 passing tests when sandbox restrictions blocked loopback-server binds and existing subprocess tests attempted writes to the default home data directory. It was not a successful full-suite run; the CI unit-test jobs subsequently passed on all three configured platforms.