檢查 Labs 描述元
讀取 Labs 目錄並驗證本機 boundary-health 描述元。
Linux 上的 Altifigence CLI 0.1.9 提供本機 Labs 描述元工作流程。可用於檢查固定的工作流程目錄、讀取描述元狀態,以及檢查 JSON boundary-health 摘要。命令會傳回可隨審查一併儲存的中繼資料。請先查看目錄與狀態,確定正在檢查哪些描述元。
讀取已儲存的結果之前,請先確認結束狀態為 0。另行保留標準錯誤輸出,並檢查下文說明的結果欄位。
讀取目錄
alti labs inspect
alti labs status如需小型驗證範例,請將下列 JSON 儲存為既有專案中的 boundary-health.json。此範例包含空的 health-card 與 source-reference 陣列,用來示範驗證器接受的描述元結構。需要實質的健全性審查時,請根據已檢查的清單填入實際使用的摘要。識別、涵蓋範圍與安全性欄位皆屬於受檢查的結構。
儲存描述元
{
"schemaVersion": "altifigence.lab.json-boundary-health-summary.v0",
"tool": "alti-lab",
"healthSummaryId": "local-example",
"summaryState": "descriptor_only",
"inventoryState": "checked_fixture",
"sourceInventoryRef": {},
"coverageSummary": {
"overallState": "checked",
"summaryOnly": true,
"descriptorOnly": true
},
"consumerPolicy": {},
"safetyFlags": {
"dataOnly": true,
"descriptorOnly": true,
"readOnly": true,
"summaryOnly": true,
"commandExecution": false,
"shellExecution": false,
"runtimeExecution": false,
"networkCalls": false,
"repositoryMutation": false
},
"sourceCheckRefs": [],
"healthCards": [],
"driftGates": [],
"blockedActions": [],
"limitations": [],
"issueRefs": []
}驗證已儲存的檔案
alti labs validate --project /absolute/project boundary-health.json使用專案的絕對路徑,以及相對於該專案的描述元路徑。命令成功時會以 JSON 輸出已驗證的描述元。請將傳回摘要的識別資訊與已儲存的輸入進行比較,然後將檔案與輸出一併保留。驗證會檢查描述元宣告的結構。
檢查驗證輸出
下方顯示驗證成功輸出的部分欄位。完整輸出會保留其他描述元欄位。
{"schemaVersion":"altifigence.lab.json-boundary-health-summary.v0","tool":"alti-lab","healthSummaryId":"local-example","summaryState":"descriptor_only","inventoryState":"checked_fixture"}若出現錯誤 unsupported JSON boundary health summary schema,請依輸入範例將 schemaVersion 設為 altifigence.lab.json-boundary-health-summary.v0,再重新驗證。