LESSON-28 · TOPIC 01

唯一 Production Artifact 根

能確認唯一交付根包含六頁、assets、apps-script、robots、sitemap 與 smoke test。

release-checkdist/project/e-commerce Production Artifact 與本機 Smoke|唯一 Production Artifact 根本頁只練一個責任

本頁只練什麼

能確認唯一交付根包含六頁、assets、apps-script、robots、sitemap 與 smoke test。

上傳根錯層或只手改 dist 會讓產物無法重建。

要修改的檔案:files/starter/index.html

定位:先從 e-commerce 根列出 index.html 與六頁。|依 starter-1 定位,只修改「唯一 Production Artifact 根」的責任。

任務情境

先結果,再原理;完成後要能說出自己看見的證據。

現在的問題

學生正在累積 project/e-commerce,必須在不碰外部服務的前提下完成「唯一 Production Artifact 根」。

起始狀態:本地 fixture 已準備 唯一 Production Artifact 根 的最小資料,尚未執行驗收。

完成後要看到

result 含 root/current/rollback/deployable=true,remoteRequests=0。

驗收證據:operation=release-manifest 與 result manifest

何時會用到

第 23–28 章運動器材電商在修改 dist/project/e-commerce 時。

常見混淆:看到畫面不等於契約通過;仍要核對欄位、操作與證據。

觀念與最小範例

這段程式是理解起點,不是要你直接跳過 Starter。

唯一 Production Artifact 根 Single production artifact root

能確認唯一交付根包含六頁、assets、apps-script、robots、sitemap 與 smoke test。

正式說法:Single production artifact root 是把 唯一 Production Artifact 根 的輸入、責任、輸出與證據固定成可重現契約。

{ root:'dist/project/e-commerce', current:'local-candidate', rollback:'previous-local' }

三步完成本主題

每一步都留下可觀察結果;如果沒看到,先看「卡住先查」。

  1. Step 1|先看見目前缺口,不急著貼答案。

    檔案:files/starter/index.html 定位:先從 e-commerce 根列出 index.html 與六頁。

    要做:先重新載入 Starter,記錄目前畫面、DOM、Computed、Console 或文件內容。

    預期:能指出「先從 e-commerce 根列出 index.html 與六頁。」目前的缺口。

    證據:保存 files/starter/index.html 的目前狀態,並指出下一步只會修改哪個檔案責任。

    卡住先查:確認開啟的是 files/starter/index.html,且定位到 先從 e-commerce 根列出 index.html 與六頁。。

  2. Step 2|只修改本主題的一個責任。

    檔案:files/starter/index.html 定位:先從 e-commerce 根列出 index.html 與六頁。

    要做:建立本地 release manifest 並核對 root 直接含 index.html。

    預期:result 含 root/current/rollback/deployable=true,remoteRequests=0。

    證據:operation=release-manifest 與 result manifest

    卡住先查:先從 e-commerce 根列出 index.html 與六頁。

  3. Step 3|重新載入並以證據驗收,不以『看起來差不多』判定完成。

    檔案:files/starter/index.html 定位:先從 e-commerce 根列出 index.html 與六頁。

    要做:重新整理頁面,再逐項比對預期結果與 evidence。

    預期:result 含 root/current/rollback/deployable=true,remoteRequests=0。

    證據:operation=release-manifest 與 result manifest

    卡住先查:先從 e-commerce 根列出 index.html 與六頁。

觀察示範

這個示範只讓你看懂概念,不會替你修改 Starter,也不會自動宣告完成。

唯一 Production Artifact 根runtime fixture · read-only demo
本主題示範畫面:尚未執行

驗收證據

勾選只是學習紀錄;真正完成仍要回到 Starter 的實際結果。

提示 1|方向

方向提示:先只找出「唯一 Production Artifact 根」的輸入與可觀察輸出,不同時修改別的責任。

提示 2|關鍵片段

關鍵片段:{ root:'dist/project/e-commerce', current:'local-candidate', rollback:'previous-local' }

提示 3|完整解答與原因

完整解答與原因:建立本地 release manifest 並核對 root 直接含 index.html。;驗收必須得到「operation=release-manifest 與 result manifest」,因為這項證據直接對應本 module 的成功條件。

完成後進入下一階段,或回到入口選下一個 topic。

開始 Starter →回到主題清單