Commit 8e31ac1
committed
fix(agent): kill ECS baseline-build hang + early Linear ACK (ABCA-707)
A Linear task against the full ABCA monorepo wedged silently for 50+ min:
the pre-agent baseline build (mise run build → the agent pytest suite) hung
on the ECS substrate, and the issue showed no reaction/comment/state the
whole time. Root-caused live on ABCA-707. Three fixes:
1. Kill the hang at its root (agent/tests/conftest.py). The ECS agent task
def sets AGENT_SESSION_ROLE_ARN. With it set, aws_session resolves a
*scoped* session and tenant_client returns session.client(...), which
BYPASSES a @patch("boto3.client") mock. test_attachments then makes a
REAL S3 get_object that blocks forever on the ECS network (no egress) in
a socket read SIGALRM can't interrupt. Add AGENT_SESSION_ROLE_ARN to the
_clean_env scrub list so every test resolves the unscoped path where the
mock intercepts. reset_session_cache() alone was insufficient — a cold
get_session() re-resolves scoped while the var is still set. + regression
test (TestConftestScrubsScopingEnv).
2. Make the hang watchdog actually reap (agent/tests/conftest.py). The prior
faulthandler.dump_traceback_later(1200, exit=True) never fired: pytest's
faulthandler_timeout re-arms faulthandler's single timer per-test WITHOUT
exit=True, cancelling the session-level exit timer. Replace with an
independent daemon-thread reaper that dumps all stacks and os._exit(1)s at
600s, so a future hang fails the build fast instead of burning to the
3600s ceiling.
3. Early Linear ACK (agent/src/pipeline.py). Move token resolve + 👀 reaction
+ Backlog→In Progress + start comment to BEFORE setup_repo() so a
large-repo task shows immediate feedback during the multi-minute baseline
build instead of looking dead. As a side benefit, a setup-phase failure
now has a 👀 for the existing outer crash handler to swap to ❌ — closing
the silent-stuck-issue gap. configure_channel_mcp stays after the clone
(it needs the repo dir).1 parent 4466a02 commit 8e31ac1
3 files changed
Lines changed: 132 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | | - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
973 | 969 | | |
974 | 970 | | |
975 | 971 | | |
976 | 972 | | |
977 | | - | |
978 | 973 | | |
979 | 974 | | |
980 | 975 | | |
| |||
1000 | 995 | | |
1001 | 996 | | |
1002 | 997 | | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
1003 | 1023 | | |
1004 | 1024 | | |
1005 | 1025 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
25 | 53 | | |
26 | 54 | | |
27 | 55 | | |
| |||
111 | 139 | | |
112 | 140 | | |
113 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
114 | 152 | | |
115 | 153 | | |
116 | 154 | | |
| |||
121 | 159 | | |
122 | 160 | | |
123 | 161 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
133 | 175 | | |
134 | 176 | | |
135 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
82 | 111 | | |
83 | 112 | | |
84 | 113 | | |
| |||
0 commit comments