Skip to content

fix(import): bound generated library names - #334

Merged
nixuuu merged 1 commit into
devfrom
fix/import-document-names
Nov 7, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/import-document-names

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 7, 2026

Copy link
Copy Markdown
Member

Instruction imports from workers with long names exceeded the document store's 120-character limit and failed on every retry.

Bound generated names in UTF-16 units, truncating the worker name at a grapheme boundary with an ellipsis and stable SHA-256 suffix while preserving the CLI and filename. Keep both reserves room for its counter and checks the owner's occupied names. Retry also handles oversized labels saved by older failed imports. Existing documents retain their names, and receipt-based Replace and Undo behavior is preserved.

Apply bounded names and collision checks to imported connected accounts, and stable suffixes to truncated command-derived skill names. Manifest-defined skills and marketplaces retain their existing name validation. Document the naming rules in docs/import.md.

Verification:

  • Gateway/worker integration coverage: 190-character worker names with shared prefixes, combining marks and emoji, uniqueness, Keep both, Replace, Undo, and legacy failed-import retry.
  • Connected account integration coverage and command-to-skill adapter coverage.
  • Full test gate: 1,727 passed, 161 skipped, 0 failed across 309 files; temporary-directory cleanup passed. Tests used worktree-local temporary data with Git discovery isolated from the parent repository.
  • bun install, bun run gen:check, bun run typecheck, bun run lint, bun run format:check, bun run check:tmp, and bun run --filter @canopy/web build.

no UI text changed

Fixes: #316

@nixuuu
nixuuu merged commit a15deab into dev Nov 7, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/import-document-names branch November 7, 2026 12:22
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