Skip to content

fix(media): supervise watchdog and drain reconnect control before release (#538) - #639

Merged
raylei50653 merged 6 commits into
mainfrom
fix/538-f04-watchdog
Oct 27, 2026
Merged

raylei50653 merged 6 commits into
mainfrom
fix/538-f04-watchdog

Conversation

@raylei50653

Copy link
Copy Markdown
Owner

修復 #538 D3-F04:main 的 watchdog 納入 producer supervision;initial connect、reconnect 與 release 移出 event loop。取消會先等待正在執行的控制工作,再釋放管線,避免取消後重新開啟資源;第一次重連失敗後持續重試。來源建構與 DALI 無 watchdog 的清理範圍一併修正。

Primary objective: RUNTIME/CORRECTNESS(online media host lifecycle)。文件、契約測試與獨立審查的 runtime identity 同次交付;沒有 association/detect/default 參數變更。只有 implementation 軸改變,equivalence=unproven;native 永久卡死沒有硬停止時限,online qualification 不升級。

驗證:17 個隔離 host 契約、33 個既有 caller/media 回歸、3 個基線負控制與 2 個 mutation;真實 Python GStreamer/MediaMTX/CUDA 的斷流重試、恢復、initial/reconnect 取消及 watchdog fault。fresh native build、MOT17-09 probe、完整輸入 manifest 與 strict attested 通過。原始指令、適用範圍、首次失敗分類與 SHA-256 均在 docs/architecture/async_ownership_538.md §11;完整 pre_push、獨立 final-head review 與遠端 CI 收據見 comments。

Gate admission:此 PR 不修改 required CI 或 qualification 標準。新增既有 pytest 入口下的行為契約,防止 event-loop blocking、未持有 watchdog 與早於控制完成的 release;失敗時修復 lifecycle,不能以 skip/弱化斷言通過。

Remaining OPEN:F05、F03/F07、GE-07、多 worker NMS capture、update_into/NV12、online qualification。未清除 #340 trace;local-only、V5 UNRESOLVED、installed UNVERIFIED 不變。回退須實作與重發 coordinate 一起處理。

Only implementation changes, 319 members: main.py and mediamtx_client.py. Decision surface, environment, identity semantics and runtime inputs remain unchanged. Native build and MOT17-09 probe freshly captured on clean 596838f; probe equality does not establish equivalence (unproven). Archive outgoing canonical byte for byte.
…on (#638)

chore(runtime): independently review F04 media control coordinate (#538)

Copy link
Copy Markdown
Owner Author

verdict: APPROVE
head SHA: fc003b562c9d444881feba8694391ddbba19d5f3
findings: 無 blocking findings。
處置:獨立唯讀 Codex implementation/final-head delta review 完成。修正 non-file source 被當 dummy_video 而停用 watchdog 的 blocker;control cancellation/repeated cancellation/release ownership 審查無剩餘 blocking finding。強化 timer-held fixture,文件釐清 native 無硬停止時限與取消 note 的上層邊界。

獨立重跑 17 個契約測試通過;runtime 與真實 RTSP/CUDA probe hashes 均相符。Publication 已由另一個獨立 reviewer 審核於 #638(固定 5d6417e6),再合入 implementation。GitHub stacked merge 後僅重播兩個文件 commit,最終 tree 7c9b542a169c46acfeebe8ca5008168446c88bd7 精確等於已審且完整 pre_push 通過的 1c3a6ba tree,沒有內容 delta。

完整 pre_push exit 0:6402 passed/52 skipped/105 deselected/5 xfailed/0 failed;log SHA-256 79b5cbe7aec1886fe2ad8fce42537913eb723f50a0dfb2f0372593e75f52e356。首次完整測試是 6401 passed/1 failed(log 74097a60b1ba9712e702827ca123888b1ba0f6677bf9aab734ed1e5e707e93b5):舊 ignored completion-test binary 缺少 C0-10 案例;八個相關 source blobs 與基線相同,保留舊 binary、對 fresh fixture 的同一測試通過、重建預設 fixture 後原測試及整份 pre_push 通過。沒有改寫、跳過或弱化測試。首次 strict invocation 缺少 probe/manifest,補齊 required evidence 後 strict attested exit 0。詳細指令/SHA-256/適用範圍見同 PR 的 async_ownership_538.md §11。

尚須 applicable required CI、§0A self-check 與 exact-head merge;沒有把 stacked base 的空 checks 當 remote PASS。

Copy link
Copy Markdown
Owner Author

#550 §0A self-check — 自動授權合併

實際合併 head:fc003b562c9d444881feba8694391ddbba19d5f3;tested/reviewed tree:7c9b542a169c46acfeebe8ca5008168446c88bd7。Base main 6ca331d60e8fbb002fdfbd72487c60de6aee161b,剛重新核對 mergeStateStatus=CLEAN,head 未移動,review threads/change requests 為空。

  • 1 範圍/findings:符合 architecture(D): audit async ownership, backpressure, error propagation and shutdown #538 D1 owner 的 F04 切片及已記錄方案;獨立 exact-head review APPROVE(審查),source routing blocker 已修,沒有剩餘 blocking finding。
  • 2 CI/回歸/負控制:此 head 的 PR CI+C++ 8/8 SUCCESS;required pytest 為 6100 passed/294 skipped/105 deselected/4 xfailed/0 failed。本機完整 pre_push 6402 passed/0 failed;17 個 F04 契約、33 個既有 caller/media、三個基線負控制與兩個 mutation 全部符合預期。首次完整本機失敗已定位為舊 ignored completion fixture,重建後同一原測試及完整套件通過;首次 strict 缺必要 evidence,補足 fresh probe/manifest 後通過,均保留原結果與 SHA-256,沒有只靠重跑轉綠。遠端首輪沒有失敗/rerun。
  • 3 Runtime identity 原子落地:獨立 publication #638 已以固定 5d6417e6 審查,先合入本分支;implementation+canonical+archive 本次一起進 main。Implementation 0cb15155… → 6237a7ff…,另四軸相同;fresh native build/MOT17-09 probe/完整 manifest、strict attested exit 0。沒有 stale intermediate landing、package re-pin 或 equivalence 升級。
  • 4 真實環境與範圍:RTX 5070 Ti Laptop/GStreamer/自有 MediaMTX/CUDA 實測斷流 false,false,true 重試後恢復;initial/reconnect first-frame 等待中的取消先 drain 再 release、沒有 reopen;watchdog fault 經 producer 傳出並取消 sibling。Probe SHA-256 12cbf0138d1e27f043c0ee7b6967069464d77e66f3475a90eae0dcdafe8de50b、結果 4edde223b4af9f654bbcc6506579f09a937b1910634648aaa1252baf22733e7b;命令、runtime bytes/head、首次失敗與本機 log hashes 均在 本 PR §11。這是 Python GStreamer ingest/host lifecycle 切片,沒有用 CPU fake 代替真實證據,也沒有宣稱 C++ media opt-in、DALI ownership、detector/tracker 或 online qualification。
  • 5 收尾/拒絕/rollback:本 comment 在 merge 前留下逐條 self-check;不接受 head 移動、CI 紅、identity lag 或證據被推翻。回退須實作與重新發布 coordinate 一起處置,不能只還原 canonical;合併後核對 main tree、strict attested 及 main CI,再更新 Hub checkpoint。

Remaining OPEN:F05、F03/F07、GE-07、多 worker NMS capture、update_into/NV12、native 永久卡死的硬停止、online qualification;distribution=local-only、V5 UNRESOLVED、installed UNVERIFIED、equivalence=unproven。未清除 #340 trace;後續依既定順序獨立封存。

@raylei50653
raylei50653 merged commit e48f3b3 into main Oct 27, 2026
8 checks passed

Copy link
Copy Markdown
Owner Author

已依 §0A 合併:main e48f3b39d5bfeb192a08d8a02cd2c04cf053bdd2,parents = 原 main 6ca331d6 + reviewed head fc003b56。Main tree 7c9b542a169c46acfeebe8ca5008168446c88bd7 精確等於已審/完整 pre_push 通過的 tree;本機 main/origin/main/遠端 main SHA 一致,working tree clean。Merged-main strict attested 使用原 capture root 的 fresh verification probe+完整 manifest 再驗 exit 0,log SHA-256 6f66d4d2da35c315d08ac546f9d406dc828bf9378a7619db41ebb586d58e750d。內容座標沒有因 merge commit 改變,無需重用或重寫任何 probe。

合併後 main CI+C++ 已啟動,尚未當成 PASS;完成後回寫最終 checkpoint。

Copy link
Copy Markdown
Owner Author

收尾 PASS — main e48f3b39d5bfeb192a08d8a02cd2c04cf053bdd2

main CI 七項+C++ 8/8 SUCCESS,都綁定同一 main SHA/push event,沒有遠端 rerun。Main pytest:6100 passed/294 skipped/105 deselected/4 xfailed/0 failed。

Merged-main 獨立 closeout APPROVE;tree 7c9b542a169c46acfeebe8ca5008168446c88bd7 精確等於 reviewed/tested tree。Local/origin/remote main SHA 相同、working tree clean;strict attested 及原 capture root 的 fresh probe/manifest 重驗 exit 0(log SHA-256 6f66d4d2da35c315d08ac546f9d406dc828bf9378a7619db41ebb586d58e750d)。

完整 #538 checkpoint 擁有行為、證據與剩餘 OPEN;Hub 只記狀態與連結。#638/#639 均 MERGED,沒有本次遺留 Draft;沒有升級 qualification 或移除 #340 trace。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant