feat: clone repos at runtime for fresh code on each review#991
feat: clone repos at runtime for fresh code on each review#991jesseturner21 wants to merge 1 commit intoaws:mainfrom
Conversation
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-991-tarball/aws-agentcore-0.10.0.tgz |
…h review Add invoke_command helper to execute shell commands on the harness runtime. Clone repos before agent invocation so code is always up to date instead of relying on stale pre-cloned images.
7cdaf5c to
d9c1fba
Compare
|
The URL in The PR uses: But the actual API (from the Note the differences:
You can verify with: import boto3
c = boto3.client('bedrock-agentcore', region_name='us-east-1')
print(c.meta.service_model.operation_model('InvokeAgentRuntimeCommand').http)
# {'method': 'POST', 'requestUri': '/runtimes/{agentRuntimeArn}/commands', ...}As written, every clone call will 404. |
|
You'll need to either:
Option 2 is likely simpler since it reuses the same session the harness is already operating in and avoids introducing a separate API call. |
|
Even if the URL and ARN issues are fixed, the clone commands won't actually help the review because the sandbox filesystem isn't shared across sessions.
To make this work you'd need to (a) reuse a single session id for both clones and the harness invocation, and (b) confirm that |
|
The Options:
Whatever path you choose, make sure the token isn't logged — the current code prints the full command ( |
|
Clone failure is treated as a warning and the script continues: if not invoke_command(HARNESS_ARN, cmd, REGION):
print(f" {YELLOW}Warning: clone failed, agent may lack repo context{RESET}")Meanwhile Either:
Also worth noting: if the runtime image already has |
|
Reviewed — all the serious issues I found have already been raised in the existing comments (wrong |
Summary
Test plan