Commit c011ebf
fix: prevent incorrect entrypoint inference when multiple candidates exist (#313)
- Changed detect_entrypoint() return type from Optional[Path] to List[Path]
- Updated CLI layer to handle 0/1/multiple file cases appropriately
- Show error listing all files when ambiguous, require explicit path
- Updated 5 test cases to validate new list-based behavior
Fixes issue where agent.py was incorrectly inferred as entrypoint when
both agent.py (implementation) and main.py (actual entrypoint) exist.
Users must now explicitly specify path when multiple candidates found.
All tests pass (51/51). Pre-commit hooks validated.
Co-authored-by: Abhimanyu Siwach <siwabhi@amazon.com>1 parent ba056fb commit c011ebf
File tree
4 files changed
+42
-20
lines changed- src/bedrock_agentcore_starter_toolkit
- cli/runtime
- operations/runtime
- tests/operations/runtime
4 files changed
+42
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
| 165 | + | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
173 | 181 | | |
174 | | - | |
175 | | - | |
| 182 | + | |
| 183 | + | |
176 | 184 | | |
177 | 185 | | |
178 | | - | |
| 186 | + | |
179 | 187 | | |
180 | 188 | | |
181 | 189 | | |
| |||
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| 80 | + | |
78 | 81 | | |
79 | | - | |
80 | 82 | | |
81 | | - | |
82 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2290 | 2290 | | |
2291 | 2291 | | |
2292 | 2292 | | |
2293 | | - | |
| 2293 | + | |
2294 | 2294 | | |
2295 | 2295 | | |
2296 | 2296 | | |
| |||
2300 | 2300 | | |
2301 | 2301 | | |
2302 | 2302 | | |
2303 | | - | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
2304 | 2306 | | |
2305 | 2307 | | |
2306 | 2308 | | |
| |||
2310 | 2312 | | |
2311 | 2313 | | |
2312 | 2314 | | |
2313 | | - | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
2314 | 2318 | | |
2315 | 2319 | | |
2316 | 2320 | | |
| |||
2320 | 2324 | | |
2321 | 2325 | | |
2322 | 2326 | | |
2323 | | - | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
2324 | 2330 | | |
2325 | 2331 | | |
2326 | | - | |
| 2332 | + | |
2327 | 2333 | | |
2328 | 2334 | | |
2329 | 2335 | | |
| |||
2336 | 2342 | | |
2337 | 2343 | | |
2338 | 2344 | | |
2339 | | - | |
2340 | | - | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
2341 | 2351 | | |
2342 | 2352 | | |
2343 | 2353 | | |
| |||
0 commit comments