Skip to content

fix(skill-package): index admitted path descendants - #430

Merged
Yevanchen merged 1 commit into
mainfrom
fix/skill-package-path-admission
Jul 29, 2026
Merged

fix(skill-package): index admitted path descendants#430
Yevanchen merged 1 commit into
mainfrom
fix/skill-package-path-admission

Conversation

@Yevanchen

@Yevanchen Yevanchen commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaced skill-package path descendant collision scans with an indexed admission state.
  • Added regression coverage for rejecting file/child collisions regardless of insertion order.

Why

  • Skill package normalization is used for archive import/export paths; checking every admitted path for descendants made collision admission O(n^2) as package entry counts grew.

Verification

  • Commands:
    • just test-package @mosoo/skill-package
    • just tc-package @mosoo/skill-package
    • just fmt-check-path pkgs/skill-package/src/path-admission.ts
    • just fmt-check-path pkgs/skill-package/tests/path-admission.test.ts
    • bun run --filter @mosoo/skill-package lint
    • TMPDIR=/private/tmp just check
    • just commit-check
  • Manual steps:
    • Ran complexity-optimizer scanner against the repo and inspected the reported owned-code hotspots.
  • Not run:
    • N/A

Impact

  • User/API/contract changes:
    • None.
  • Generated files / GraphQL / DB / lockfile:
    • None.
  • Env or config changes:
    • None.
  • Risk and rollback:
    • Low. Change is localized to path admission bookkeeping and preserves existing error behavior. Roll back the single commit if archive path admission regresses.

Review

  • Closest review areas:
    • pkgs/skill-package/src/path-admission.ts
    • pkgs/skill-package/tests/path-admission.test.ts
  • Known trade-offs:
    • The scanner still flags ordinary path-depth iteration in this package; the O(number of admitted entries) descendant scan has been removed.

@Yevanchen Yevanchen changed the title fix(skill-package): index admitted path descendants fix(skill-package): index admitted path descendants for YEF-932 Jul 29, 2026
@Yevanchen Yevanchen changed the title fix(skill-package): index admitted path descendants for YEF-932 fix(skill-package): index admitted path descendants Jul 29, 2026
@Yevanchen
Yevanchen force-pushed the fix/skill-package-path-admission branch from e150ed0 to 85ec173 Compare July 29, 2026 12:40
@Yevanchen
Yevanchen merged commit 18fa2ca into main Jul 29, 2026
9 checks passed
@Yevanchen
Yevanchen deleted the fix/skill-package-path-admission branch July 29, 2026 12:42
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