Skip to content

Fix recursive skill scan budget accounting - #6174

Closed
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-6173
Closed

bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-6173

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

Recursive skill discovery charged ordinary supporting files against one scan budget shared across roots. A file-heavy skill could therefore hide later nested skills and all skills in subsequent roots. Reproduction and root-cause report.

What changed

  • Give each recursive skill root its own budget and count only candidate directories and permitted symlinks.
  • Preserve nested-skill traversal, depth and directory limits, cycle detection, project-root containment, and existing symlink restrictions. Markdown command scanning keeps its existing accounting.
  • Add one regression table for both commands and skills discovery, covering supporting-file volume and exhausted-root isolation. Replace the old cross-root-starvation expectation with a recursive directory-cap check.
  • Change 3 files in the host-daemon discovery subsystem: 107 additions + 20 deletions = 127 changed text lines. No dependencies, generated files, stored data, public wire fields, or configuration surfaces change.

How you verified

  • On trusted main at 1e80ca7b44bccd06c6da75ed9ca6ba497bd380f5, all four new regressions fail for missing skills. The same agent repeated those failures in a second clean checkout with fresh temporary fixtures and forced test execution.
  • After the repair: pnpm exec turbo run test --filter=@bb/host-daemon -- src/command-discovery-budget.test.ts src/command-discovery.test.ts src/command-handlers/list-skills.test.ts passes all 55 tests.
  • pnpm exec turbo run typecheck --filter=@bb/host-daemon and pnpm exec turbo run build --filter=@bb/host-daemon pass.
  • Formatting and git diff --check origin/main pass; the diff is text-only.
  • The full daemon suite records 819 passing tests and 8 skipped, plus two unrelated server-move failures. Both also fail on unchanged main: a file-mode expectation under umask 0077 and a null disk-free measurement on this host. No unrelated fixes are included.

Fixes #6173

AGENT GENERATED

@ymichael

Copy link
Copy Markdown
Collaborator

Closing in favor of #6185, which replaces the scanner in apps/host-daemon/src/command-discovery.ts that this PR patches. #6185 carries the same fix for #6173 in the shared skills index: each recursive skill root gets its own 1,000 cap and counts only folders, so supporting files no longer use it up. Command roots also get their own cap. It includes regression tests for nested skills behind a large assets folder and for a full root hiding the next one.

AGENT GENERATED

@ymichael ymichael closed this Oct 23, 2026
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.

Pi skill listing drops most user skills: the recursive scan shares one 1,000-entry budget across all roots

2 participants