Commit 000afc5
committed
fix(77): address the Copilot review, ship ameba v1.3.3
Two real bugs and one misleading comment, all found by the automated review on PR #68. Both bugs
are ameba-only: the esp32 half already had the correct shape in each case.
## Success path diverged from the unified teardown (ameba)
RecommissionFabricDelegate::OnFabricCommitted did its own partial cleanup -- clear the flag,
cancel the timer, delete the old fabrics -- and never called recommission_finish(). So a
SUCCESSFUL re-pair left the CHIP commissioning window OPEN and the BLE advert up, diverging from
the expiry / user-cancel / toggle paths. That is precisely the inconsistency the single teardown
was introduced to remove, and the comment above it already claimed to cover "every exit".
Now routes through recommission_finish(true, ...). The doomed fabric indices are snapshotted
first, because recommission_finish() clears the count and Delete() can re-enter the delegate.
The esp32 half was already written this way; the port missed it.
## Truncated monotonic timestamp (ameba)
The grace deadline stored GetMonotonicTimestamp().count() into a uint32_t and compared truncated
counts. That is unit-ambiguous and can wrap, and it ignored the Clock::Timestamp +
Milliseconds32 pattern this same file already uses for s_sync_hold_until. Now uses
Clock::Timestamp arithmetic throughout.
Not an issue on esp32, which uses esp_timer_get_time() -- int64 microseconds, unambiguous.
## Misleading flavour comment (esp32-release.sh)
The comment said "pass --release to opt out" but the script parses no such flag; flavour is
controlled by the ESP32_FLAVOUR environment variable. Corrected, since an operator following the
comment would silently get the debug default -- the opposite of what they asked for.
## Also noted by the review, fixed in the PR description rather than the code
The description still described the release as v1.3.0 and claimed swing was EXCLUDED from the
"77" exit check. Both are stale: the version is 1.3.3 and swing is deliberately included again
(the grace period is what prevents the self-cancel -- excluding swing removed the only exit route
that worked). Description updated.
Ameba 1.3.2 -> 1.3.3 (int 10303), flashed to node 14 over Matter OTA and verified: avail=True,
endpoints {0..10}. Host tests 330 pass. esp32 builds clean but is NOT yet flashed -- USB was
disconnected -- and is unaffected by both bugs above.
Assisted-by: AI1 parent 4f6c897 commit 000afc5
3 files changed
Lines changed: 24 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
| 303 | + | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
330 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
331 | 340 | | |
332 | 341 | | |
333 | 342 | | |
| |||
375 | 384 | | |
376 | 385 | | |
377 | 386 | | |
378 | | - | |
379 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
380 | 390 | | |
381 | 391 | | |
382 | 392 | | |
| |||
433 | 443 | | |
434 | 444 | | |
435 | 445 | | |
436 | | - | |
437 | | - | |
| 446 | + | |
438 | 447 | | |
439 | 448 | | |
440 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments