Commit fc328ef
committed
fix(ecs): address #596 re-review nits — stale parity comments + WARN noise + max_turns coercion
Scott's fresh re-review (head 86ab249) is Approve-with-nits: B1 (over-privilege)
and B2 (governance) resolved; remaining asks are doc-accuracy + WARN-channel
hygiene.
- N1: rewrite the artifactsBucket JSDoc (ecs-agent-cluster.ts) that still claimed
a read/write task-role grant the B1 fix deliberately removed — now states
env-only wiring with delivery through the task_id-scoped SessionRole (parity
with the AgentCore runtime role, which has no artifacts grant). The grant block
~30 lines below was already corrected in the B1 commit; this was its residual
half.
- N2: same inverted-comment fix at the agent.ts wiring site — '(read+write grant
in the construct)' → env-only + SessionRole delivery.
- N3: drop github_token_secret_arn from _KNOWN_ORCHESTRATOR_KEYS. It is ALWAYS
present and ALWAYS resolved via the GITHUB_TOKEN_SECRET_ARN env, so listing it
fired the known-key WARN on 100% of ECS boots — pure noise diluting the channel
meant for genuine future contract gaps. Now falls through as a quiet foreign-key
drop; comment records why it must not be re-added. +test asserting no WARN.
- N4: max_turns int() coercion accepted a bool (int(True)==1) and truncated a
non-integral float (int(3.9)==3), and the comment falsely claimed it 'matches
how every other field is handled' (it is the one non-str coercion). Now rejects
bools + non-integral floats with a breadcrumb; valid int / int-string / int-float
still pass. +test. Reachable only via a corrupt payload (orchestrator emits a
real int), so cosmetic — bundled since cheap.
- N5: no-op — the Dockerfile corepack line already has no 2>/dev/null.
Gates: cdk 2355 tests + eslint + synth green; agent 1268 tests + ruff + ty green.
Non-blocking #608 test-seam gaps (finalize deleteEcsPayload, boot-uri parse,
entrypoint re-export, zero-ECS-synth assert) remain tracked, not in scope here.1 parent 86ab249 commit fc328ef
4 files changed
Lines changed: 57 additions & 11 deletions
File tree
- agent
- src
- tests
- cdk/src
- constructs
- stacks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1328 | 1328 | | |
1329 | 1329 | | |
1330 | 1330 | | |
1331 | | - | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
1332 | 1338 | | |
1333 | 1339 | | |
1334 | 1340 | | |
| |||
1383 | 1389 | | |
1384 | 1390 | | |
1385 | 1391 | | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
1389 | 1402 | | |
1390 | | - | |
| 1403 | + | |
1391 | 1404 | | |
1392 | 1405 | | |
1393 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
1394 | 1411 | | |
1395 | 1412 | | |
1396 | 1413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
105 | 117 | | |
106 | 118 | | |
107 | 119 | | |
| |||
143 | 155 | | |
144 | 156 | | |
145 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
146 | 170 | | |
147 | 171 | | |
148 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | | - | |
626 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
627 | 629 | | |
628 | 630 | | |
629 | 631 | | |
| |||
0 commit comments