This repository was archived by the owner on Apr 11, 2026. It is now read-only.
Commit 7f54390
fix(fn-20): address 4 iter-2 adversarial review findings
1. [REQUIRED] TCP daemon port discovery (server.rs) —
serve_tcp now writes the bound port to .flow/.state/flowctl.port
on startup and removes it on shutdown. CLI approval clients can
now find the TCP endpoint instead of silently falling back to
direct DB writes. Uses listener.local_addr() so port=0 ephemeral
binds also publish their real port.
2. [IMPORTANT] Browser approvals drop resolver (handlers/approvals.rs) —
daemon approve/reject handlers now default resolver to "dashboard"
when the client omits it, so every browser-driven resolution has a
non-null audit trail entry. CLI callers passing --resolver still win.
3. [IMPORTANT] epic audit receipts bypass archive (epic.rs) —
added review_belongs_to_epic() helper matching both the legacy
"-{id}." infix pattern and the new "epic-audit-{id}-*" prefix.
Both archive and clean paths now use it, so audit receipts are
moved with the rest of the epic's review artifacts.
4. [NICE-TO-HAVE] orphan approvals (approvals.rs) —
ApprovalStore::create() now validates the referenced task_id
exists before inserting. Typos return ValidationError instead of
creating ghost records that show up in the UI with no real work
to reconcile to. Added create_rejects_nonexistent_task test +
updated in-mem/server tests to seed epic+task rows.
Tests: 285 passed, 0 failed. Clippy clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d710120 commit 7f54390
4 files changed
Lines changed: 134 additions & 7 deletions
File tree
- flowctl/crates
- flowctl-cli/src/commands
- flowctl-daemon/src
- handlers
- flowctl-service/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
968 | | - | |
| 968 | + | |
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
| |||
1081 | 1081 | | |
1082 | 1082 | | |
1083 | 1083 | | |
1084 | | - | |
| 1084 | + | |
| 1085 | + | |
1085 | 1086 | | |
1086 | 1087 | | |
1087 | 1088 | | |
| |||
1288 | 1289 | | |
1289 | 1290 | | |
1290 | 1291 | | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1291 | 1305 | | |
1292 | 1306 | | |
1293 | 1307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | | - | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| 109 | + | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | | - | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
161 | 178 | | |
162 | 179 | | |
163 | 180 | | |
164 | 181 | | |
165 | 182 | | |
166 | | - | |
| 183 | + | |
167 | 184 | | |
168 | 185 | | |
169 | 186 | | |
170 | 187 | | |
171 | 188 | | |
172 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
173 | 193 | | |
| 194 | + | |
174 | 195 | | |
175 | 196 | | |
176 | 197 | | |
| |||
445 | 466 | | |
446 | 467 | | |
447 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
448 | 480 | | |
449 | 481 | | |
450 | 482 | | |
| |||
536 | 568 | | |
537 | 569 | | |
538 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
539 | 582 | | |
540 | 583 | | |
541 | 584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
126 | 155 | | |
127 | 156 | | |
128 | 157 | | |
| |||
248 | 277 | | |
249 | 278 | | |
250 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
251 | 301 | | |
252 | 302 | | |
253 | 303 | | |
254 | 304 | | |
255 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
256 | 320 | | |
257 | 321 | | |
258 | 322 | | |
| |||
0 commit comments