Skip to content

refactor(agent-package): index archive path admission#401

Open
Yevanchen wants to merge 1 commit into
mainfrom
refactor/yef-910-complexity-optimization
Open

refactor(agent-package): index archive path admission#401
Yevanchen wants to merge 1 commit into
mainfrom
refactor/yef-910-complexity-optimization

Conversation

@Yevanchen

Copy link
Copy Markdown
Collaborator

Summary

  • Indexed agent package archive ancestor paths so descendant collision checks no longer scan every previously admitted path.
  • Precomputed declared skill asset roots and check path prefixes by segment during package archive admission.
  • Added archive admission tests for nested skill assets and root-path rejection.

Why

  • The complexity optimizer scan flagged archive path admission as a repeated-scan hotspot. Large package archives could re-scan prior entries and declared skill roots per path even though the checks only need prefix membership.

Closes YEF-910

Verification

  • Commands:
    • bun test pkgs/agent-package/tests/archive-entry-admission.test.ts
    • bun run --filter @mosoo/agent-package test
    • bun run --filter @mosoo/agent-package tc
    • bun run --filter @mosoo/agent-package lint
    • just fmt-check-path pkgs/agent-package/src/archive-entry-admission.ts
    • just fmt-check-path pkgs/agent-package/src/archive-path-policy.ts
    • just fmt-check-path pkgs/agent-package/tests/archive-entry-admission.test.ts
    • git diff --check
    • just commit-check
    • just check (blocked by unrelated apps/driver/tests/acp-file-system.test.ts path assertion: expected /tmp/..., received /private/tmp/... on this macOS workspace)
  • Manual steps: N/A
  • 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; path admission semantics are covered by existing and new archive parser tests. Roll back commit 16231b11 if needed.

Review

  • Closest review areas: pkgs/agent-package/src/archive-entry-admission.ts, pkgs/agent-package/src/archive-path-policy.ts.
  • Known trade-offs: The full repo gate still needs the unrelated driver temp-path assertion fixed or normalized for macOS /private/tmp workspaces.

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