Commit 97d7e4b
committed
fix(daemon): make schtasks fallback baseline-aware in launch observation (#91144)
The previous baseline filter lived only inside hasLaunchEvidence, so a
pre-existing verified gateway listener caused readLaunchObservation to
report state 'running' (via resolveListenerBackedScheduledTaskRuntime)
and short-circuit the fallback poll before the baseline filter was ever
consulted — exactly the foreground-listener suppression that #91144
reported.
Move task command/port resolution and baseline capture above
readLaunchObservation, and treat a listener-backed 'running' whose pid
is in the baseline as 'not-yet-run' so the bounded poll continues and
hasLaunchEvidence re-checks with baseline filtering. Resolve the
baseline from the installed task command port (same as
hasLaunchEvidence) so the include check is consistent when argv/env
override the configured gateway port. Restore the async
resolveScheduledTaskGatewayListenerPids path so inspectPortUsage
diagnostics are still used.
Add two regression tests:
- pre-existing verified gateway listener on the task port still fires
the fallback (covers the P1 short-circuit the prior diff missed)
- a fresh gateway listener appearing after /Run on a port that had a
baseline listener does not relaunch (suppresses false-positive)1 parent 074f9df commit 97d7e4b
2 files changed
Lines changed: 73 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
408 | 439 | | |
409 | 440 | | |
410 | 441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1101 | 1119 | | |
1102 | 1120 | | |
1103 | 1121 | | |
1104 | 1122 | | |
1105 | 1123 | | |
1106 | 1124 | | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
1107 | 1143 | | |
1108 | 1144 | | |
1109 | 1145 | | |
| |||
1127 | 1163 | | |
1128 | 1164 | | |
1129 | 1165 | | |
1130 | | - | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | 1166 | | |
1137 | 1167 | | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | 1168 | | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1151 | 1175 | | |
1152 | 1176 | | |
1153 | 1177 | | |
| |||
0 commit comments