Repository navigation
feat(project): block add/remove command usage for v0 project on v1 CLI - #2581
Merged
Merged
Conversation
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
tejaskash
approved these changes
Oct 12, 2026
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Clean, well-scoped change. The extracted isV0Project helper is reused in both v0DependencyWarning and the new guard, the guard runs before withProject so the v1-schema parsing error can't leak out for add/remove, and the tests use real temp directories rather than fs mocks.
A couple of non-blocking observations the author may want to consider as follow-ups:
- New error short-circuits the stale-CDK guidance. The test
uses the add/remove error even when the old CDK dependency warning appliesconfirms this is intentional, butV0_PROJECT_ADD_REMOVE_MESSAGEtells the user to migrate, andagentcore migratecurrently throwsNotImplementedError(MIGRATE_NOT_AVAILABLE_MESSAGE). A user on a v0 project with stale CDK deps who used to be pointed atnpx @aws/agentcore@0 deploynow has no actionable path until migrate ships. Worth confirming this is the UX you want for the rc. - cwd handling is slightly inconsistent with
withProject.withProjectaccepts an optionalcwd, whilewithV0ProjectGuardreadsprocess.cwd()directly. In production wiring both resolve to the same directory, so this doesn't cause a bug today, but if a future caller passes a non-defaultcwdtowithProjectthe two will disagree. Taking an optionalcwdhere would keep them in lockstep.
Neither needs to block the merge.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2581 +/- ##
============================================
- Coverage 97.54% 97.54% -0.01%
============================================
Files 657 658 +1
Lines 48779 48806 +27
============================================
+ Hits 47580 47606 +26
- Misses 1199 1200 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
notgitika
approved these changes
Oct 13, 2026
13 of 17 tasks
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.
Description
Block
agentcore addandagentcore removeat command line and TUI level when the current project is a v0agentcore.json(version: 1). The middleware runs before project parsing and before the TUI launches.This PR also extracts the project version check added in PR #2566 to our
fsUtilshared helper, and is now reused in both places.Screen.Recording.2026-10-12.at.3.43.50.PM.mov
Type of Change
Testing
How have you tested the change?
bun run test(x pass, 0 fail)npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.