Skip to content

feat(runtime): restructure task scheduling and native patch execution - #2

Merged
Small-Ku merged 1 commit into
mainfrom
research/issue-1-work-unit-arbitration
Dec 1, 2026
Merged

Small-Ku merged 1 commit into
mainfrom
research/issue-1-work-unit-arbitration

Conversation

@Small-Ku

@Small-Ku Small-Ku commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Refs #1.

變更範圍

本 PR 延續既有 WorkUnit 研究,將已收斂的 runtime 實作整理成五個獨立、線性且已簽署的里程碑 commit。保留 TaskGraph、資源 admission 與 compio Dispatcher 的既有 ownership 邊界,不建立第二套 executor。

里程碑 實作
M1 型別化 service estimate、scheduler trace 與量測來源
M2 Command-wide scalar capacity、可行性與 waiter 生命週期、batch event 隔離
M3 共用 PatchPlan DAG、native HDIFFSF20 decoder、retained decoder ownership、輸入驗證與 forward recovery
M4 Typed DAG hints、保留既有排序政策、移除重複 admission probe
M5 Sanitized bounded capture、validator、compact、確定性 replay、實際 Verify read bytes、batch admission 與 rejected dispatch 修復

採用結論

  • HDiff 僅接受 HDIFFSF20 未壓縮與 zstd;不保留舊 decoder fallback。未支援 header 在安裝檔案變更前拒絕;已驗證輸出可跳過舊 payload。
  • 正常採用全段解碼、固定 2 個 decoder slots。保留安全的 continuation 與資源所有權,不採用 adaptive/progressive quantum 或 soft-deadline arbitration。
  • 維持既有排序與固定容量;不導入 HLFET、DRR、EEVDF 或 adaptive capacity。
  • Replay 提供結構及資源契約驗證,不宣稱可預測跨容量、裝置、cache 或不同並行環境的性能。

已完成驗證

  • Windows stable:五個里程碑分別通過 runtime tests(297 / 316 / 353 / 357 / 393)、workspace all-target check、Clippy、Rustfmt 及 repo policy(62 tests)。
  • 最終 tree:完整 workspace tests 525 passed、0 failed、12 ignored;另有三次隔離子程序驗證通過。Runtime no-default-features all-target check 通過。
  • M3 獨立 CLI 的 extracted / persisted recovery 各 8/8 通過,輸出 MD5 與 SHA-256 相符。使用隔離副本,不修改遊戲安裝。
  • 合成 fixtures 涵蓋 zstd、空 base、尾段 literals、unsupported headers、checkpoint、dispatch rejection、panic、StorageFull 注入、archive staging barrier、capture / replay admission correctness。
  • 所有新 commit 的 parent、tree 及本機簽章已逐一核對。

Review 與限制

  • GitHub CI、Linux 與 nightly toolchain gate 依現行 workflow 驗證。
  • StorageFull 是錯誤注入,不等同實體 ENOSPC;遠端 archive 吞吐量與最壞綜合記憶體上界未完整量測。自動完整包回退不在此輸入契約內。
  • 原 bounded re-arbitration 實驗結論不採用為 production policy;本 PR 不包含未採用的研究 harness、原始量測或遊戲資料。
  • 審查以這五個 commit 的候選 trees 為準,正式合併由維護者決定。

@Small-Ku Small-Ku changed the title research(runtime): measure bounded WorkUnit re-arbitration runtime: bounded WorkUnit re-arbitration Oct 2, 2026
@Small-Ku
Small-Ku force-pushed the research/issue-1-work-unit-arbitration branch from 6892b50 to 790e6c1 Compare December 1, 2026 13:22
@Small-Ku Small-Ku changed the title runtime: bounded WorkUnit re-arbitration feat(runtime): restructure task scheduling and native patch execution Dec 1, 2026
@Small-Ku
Small-Ku marked this pull request as ready for review December 1, 2026 13:23
@Small-Ku

Small-Ku commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Prerelease 相容層收斂

依維護者確認範圍追加三個已簽署 commit:

  • 9fbad98:刪除舊 trace MD5 batch 推斷、容量 fallback;runner ID / batch capacity 改為必要欄位,priority_cost 保持原有排序數值與規則。新 schema 不讀取已淘汰版本。
  • ac15fba:移除已被正式 CLI 取代的舊參數與 stage apply/resume、setup-persistent-resources 入口。原 staged update E2E 改用 update --stage-dir ... --require-staged,新增舊入口拒絕 regression。原 resource scope parity 規則同步使用正式參數。
  • 9c798ab:AssetStorageLayout 要求 storage_id / install_root;已具 ownership 的 metadata 保持原 schema,缺欄位拒絕且不自行認領。刪除 expected_md5 panic accessor、MD5 copy wrapper,以通用 ContentHash 及 ArtifactDigest 處理。

最終 tree abecfd603b6518d5ea4720851febb4f0d56308f4 已通過 Windows 完整 workspace tests、workspace all-target check、Clippy -D warnings、runtime no-default-features、Rustfmt 與 62 項 repo policy regression。三個新 commit 均在 GitHub 顯示 Verified。新一輪 CI 待確認;未改 main、未新增 PR 或公開私人資料。

…#2)

* feat(runtime): establish scheduler measurement authority
* feat(runtime): establish shared global capacity authority
* feat(runtime): unify native HDiff patch execution
* feat(scheduler): preserve policy with typed DAG hints
* feat(runtime): capture and replay validated scheduler workloads
* test(runtime): use native path components in patch plan validation
* ci: run each archived workspace test suite without sharding
* refactor(runtime): remove obsolete workload compatibility
* refactor(cli): remove superseded command aliases
* refactor(runtime): unify artifact and storage ownership models
@Small-Ku
Small-Ku force-pushed the research/issue-1-work-unit-arbitration branch from 9c798ab to 6951520 Compare December 1, 2026 22:16
@Small-Ku
Small-Ku merged commit 6951520 into main Dec 1, 2026
2 checks passed
@Small-Ku

Small-Ku commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

合併前的 review commits

原始 PR head:9c798ab418d2d448d0e25114145a35a0a9494ccb
最終簽署 commit:6951520f8be225684279a462981cbde5f1db7c1a

  • 8c2ab44c18b3 - feat(runtime): establish scheduler measurement authority
  • e0f62f8cf55b - feat(runtime): establish shared global capacity authority
  • 8260b4b0e7a5 - feat(runtime): unify native HDiff patch execution
  • 4a3b068279f3 - feat(scheduler): preserve policy with typed DAG hints
  • 790e6c1b7557 - feat(runtime): capture and replay validated scheduler workloads
  • b8749f710aee - test(runtime): use native path components in patch plan validation
  • 8ddd94f4de82 - ci: run each archived workspace test suite without sharding
  • 9fbad98d185d - refactor(runtime): remove obsolete workload compatibility
  • ac15fba090a6 - refactor(cli): remove superseded command aliases
  • 9c798ab418d2 - refactor(runtime): unify artifact and storage ownership models

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