fix: sanitize derived project ids#2107
Open
miloquinn wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sanitize project IDs derived from local directory names before registering projects in the global config.
Root Cause
Some
ao startpaths usedbasename(...)directly as the requested project ID. Directory names such asllama.cppcan contain dots or other characters that do not satisfy the project ID schema, which can cause validation errors during startup/registration.Fix
Use the existing
sanitizeProjectIdhelper for derived IDs in the local config registration paths, while preserving the original directory name as the human-readable project name/display value.Impact
Projects in directories like
llama.cppnow register cleanly instead of failing validation. Existing readable project names are preserved.Tests
corepack pnpm --filter @aoagents/ao-cli test -- start.test.tscorepack pnpm --filter @aoagents/ao-cli typecheckFixes #1877