Skip to content

Fix /filters 500 for inherited skills dir outside the workspace root - #21

Merged
TeamSPoon merged 1 commit into
mainfrom
copilot/integrate-filters500
Sep 9, 2026
Merged

TeamSPoon merged 1 commit into
mainfrom
copilot/integrate-filters500

Conversation

@TeamSPoon

Copy link
Copy Markdown
Member

Follow-up to the cold-import fix: list_filters used Path.relative_to(root) for skillsDir, which raised ValueError (500) for workspaces whose skills dir resolves to the shared/inherited data home. Switched to overlay-safe _data_rel_of; /filters now returns 200 fast with no heavy imports. Regression test added.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Once the matplotlib cold import was removed, /filters reached list_filters line 5268 which did _skills_dir(root).relative_to(root); for workspaces whose skills dir resolves to the shared/inherited data home (outside the workspace root, e.g. arc3_random_player) that raised ValueError -> 500. Use the overlay-safe _data_rel_of(root, _skills_dir(root)) like the neighboring path fields. Adds a regression test; /filters now returns 200 (~1.7s, 248 filters) with no scikit-image/matplotlib import.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@TeamSPoon
TeamSPoon merged commit 1552434 into main Sep 9, 2026
@TeamSPoon
TeamSPoon deleted the copilot/integrate-filters500 branch September 9, 2026 03:18
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