473 lines
17 KiB
JSON
473 lines
17 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"$id": "urn:awoooi:source-control-ref-truth-owner-response-v1",
|
||
"title": "Source Control Ref Truth Owner Response 收件契約 v1",
|
||
"description": "定義 owner 回覆 refs truth / deprecated / release tag / GitHub-only refs 判定時的收件欄位、驗收規則與拒收規則。此 schema 不授權 fetch、push refs、delete refs、force push、rewrite tag、切換 GitHub primary、建立 repo、修改 visibility 或保存 secret value。",
|
||
"type": "object",
|
||
"required": [
|
||
"schema_version",
|
||
"status",
|
||
"date",
|
||
"mode",
|
||
"runtime_execution_authorized",
|
||
"source_contract",
|
||
"target_contract",
|
||
"source_indexes",
|
||
"summary",
|
||
"response_templates",
|
||
"acceptance_checks",
|
||
"rejection_rules",
|
||
"allowed_outputs",
|
||
"forbidden_actions"
|
||
],
|
||
"properties": {
|
||
"schema_version": {
|
||
"const": "source_control_ref_truth_owner_response_v1"
|
||
},
|
||
"status": {
|
||
"type": "string",
|
||
"enum": ["draft_waiting_owner_response"]
|
||
},
|
||
"date": {
|
||
"type": "string"
|
||
},
|
||
"mode": {
|
||
"type": "string",
|
||
"enum": ["owner_ref_truth_response_intake_only"]
|
||
},
|
||
"runtime_execution_authorized": {
|
||
"type": "boolean",
|
||
"const": false
|
||
},
|
||
"source_contract": {
|
||
"type": "string",
|
||
"const": "source_control_ref_truth_classification_v1"
|
||
},
|
||
"target_contract": {
|
||
"type": "string",
|
||
"const": "source_control_reconcile_plan_v1"
|
||
},
|
||
"source_indexes": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"summary": {
|
||
"type": "object",
|
||
"required": [
|
||
"owner_response_status",
|
||
"repo_count",
|
||
"total_ref_review_item_count",
|
||
"manual_truth_required_count",
|
||
"deprecated_candidate_count",
|
||
"release_tag_review_count",
|
||
"github_only_review_count",
|
||
"owner_response_request_packet_count",
|
||
"owner_response_template_status_count",
|
||
"owner_response_audit_event_template_count",
|
||
"owner_response_redaction_example_count",
|
||
"owner_response_collection_check_count",
|
||
"intake_preflight_check_count",
|
||
"response_template_count",
|
||
"received_response_count",
|
||
"accepted_response_count",
|
||
"rejected_response_count",
|
||
"acceptance_check_count",
|
||
"rejection_rule_count",
|
||
"refs_sync_authorized",
|
||
"refs_delete_authorized",
|
||
"force_push_authorized",
|
||
"github_primary_switch_authorized",
|
||
"secret_value_collection_allowed",
|
||
"action_buttons_allowed"
|
||
],
|
||
"properties": {
|
||
"owner_response_status": {
|
||
"type": "string",
|
||
"enum": ["waiting_owner_response"]
|
||
},
|
||
"repo_count": {"type": "integer", "minimum": 0},
|
||
"total_ref_review_item_count": {"type": "integer", "minimum": 0},
|
||
"manual_truth_required_count": {"type": "integer", "minimum": 0},
|
||
"deprecated_candidate_count": {"type": "integer", "minimum": 0},
|
||
"release_tag_review_count": {"type": "integer", "minimum": 0},
|
||
"github_only_review_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_request_packet_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_template_status_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_audit_event_template_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_redaction_example_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_collection_check_count": {"type": "integer", "minimum": 0},
|
||
"intake_preflight_check_count": {"type": "integer", "minimum": 0},
|
||
"response_template_count": {"type": "integer", "minimum": 0},
|
||
"received_response_count": {"type": "integer", "minimum": 0},
|
||
"accepted_response_count": {"type": "integer", "minimum": 0},
|
||
"rejected_response_count": {"type": "integer", "minimum": 0},
|
||
"acceptance_check_count": {"type": "integer", "minimum": 0},
|
||
"rejection_rule_count": {"type": "integer", "minimum": 0},
|
||
"refs_sync_authorized": {"type": "boolean", "const": false},
|
||
"refs_delete_authorized": {"type": "boolean", "const": false},
|
||
"force_push_authorized": {"type": "boolean", "const": false},
|
||
"github_primary_switch_authorized": {"type": "boolean", "const": false},
|
||
"secret_value_collection_allowed": {"type": "boolean", "const": false},
|
||
"action_buttons_allowed": {"type": "boolean", "const": false}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"owner_response_template_statuses": {
|
||
"type": "array",
|
||
"description": "S4.11 五個 refs truth response templates 的逐項收件狀態;只供 AwoooP 顯示,不代表 approval、refs execution queue 或 primary readiness。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"template_id",
|
||
"lane",
|
||
"display_order",
|
||
"collection_status",
|
||
"request_status",
|
||
"received_response_count",
|
||
"accepted_response_count",
|
||
"rejected_response_count",
|
||
"latest_outcome_lane",
|
||
"next_owner_action",
|
||
"awooop_display_mode",
|
||
"execution_authorized",
|
||
"not_approval",
|
||
"still_forbidden"
|
||
],
|
||
"properties": {
|
||
"template_id": {"type": "string"},
|
||
"lane": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"collection_status": {"type": "string", "enum": ["waiting_owner_response"]},
|
||
"request_status": {"type": "string", "enum": ["request_ready_not_sent"]},
|
||
"received_response_count": {"type": "integer", "minimum": 0},
|
||
"accepted_response_count": {"type": "integer", "minimum": 0},
|
||
"rejected_response_count": {"type": "integer", "minimum": 0},
|
||
"latest_outcome_lane": {"type": "string", "enum": ["keep_waiting_owner_response"]},
|
||
"next_owner_action": {"type": "string"},
|
||
"awooop_display_mode": {"type": "string", "enum": ["display_template_status_only"]},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true},
|
||
"still_forbidden": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"owner_response_audit_event_templates": {
|
||
"type": "array",
|
||
"description": "AwoooP 可照此格式記錄 S4.11 refs truth owner response 流程的脫敏 audit metadata;此欄位只是模板,尚未代表 runtime ingestion、refs execution 或 primary readiness。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"event_template_id",
|
||
"display_order",
|
||
"event_status",
|
||
"trigger",
|
||
"purpose",
|
||
"allowed_metadata_fields",
|
||
"forbidden_payloads",
|
||
"emitted_event_count",
|
||
"stored_raw_payload_allowed",
|
||
"awooop_display_mode",
|
||
"execution_authorized",
|
||
"not_approval"
|
||
],
|
||
"properties": {
|
||
"event_template_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"event_status": {"type": "string", "enum": ["template_only_not_emitted"]},
|
||
"trigger": {"type": "string"},
|
||
"purpose": {"type": "string"},
|
||
"allowed_metadata_fields": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"forbidden_payloads": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"emitted_event_count": {"type": "integer", "minimum": 0},
|
||
"stored_raw_payload_allowed": {"type": "boolean", "const": false},
|
||
"awooop_display_mode": {"type": "string", "enum": ["display_audit_template_only"]},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"owner_response_redaction_examples": {
|
||
"type": "array",
|
||
"description": "Owner 回覆 S4.11 refs truth 時可參考的脫敏範例;只供 AwoooP 顯示,不代表收件、驗收、refs 執行或 primary 授權。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"example_id",
|
||
"display_order",
|
||
"example_status",
|
||
"category",
|
||
"safe_response_shape",
|
||
"required_redactions",
|
||
"forbidden_raw_values",
|
||
"stored_raw_payload_allowed",
|
||
"awooop_display_mode",
|
||
"execution_authorized",
|
||
"not_approval"
|
||
],
|
||
"properties": {
|
||
"example_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"example_status": {"type": "string", "enum": ["template_example_only"]},
|
||
"category": {"type": "string"},
|
||
"safe_response_shape": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"required_redactions": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"forbidden_raw_values": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"stored_raw_payload_allowed": {"type": "boolean", "const": false},
|
||
"awooop_display_mode": {"type": "string", "enum": ["display_redaction_example_only"]},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"owner_response_collection_checks": {
|
||
"type": "array",
|
||
"description": "AwoooP 顯示 S4.11 request packet 到收回 refs truth owner response 之間的只讀收件檢查;不得把 request ready、audit template、redaction example 或 owner wording 誤判為 response received / accepted 或 refs 授權。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"check_id",
|
||
"display_order",
|
||
"title",
|
||
"required",
|
||
"pass_condition",
|
||
"failure_lane",
|
||
"awooop_display",
|
||
"execution_authorized",
|
||
"not_approval"
|
||
],
|
||
"properties": {
|
||
"check_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"title": {"type": "string"},
|
||
"required": {"type": "boolean"},
|
||
"pass_condition": {"type": "string"},
|
||
"failure_lane": {"type": "string"},
|
||
"awooop_display": {"type": "string"},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"intake_preflight_checks": {
|
||
"type": "array",
|
||
"description": "AwoooP 收到 S4.11 refs truth owner response 前後可執行的只讀 preflight;只分類可收、補證、隔離或拒收,不授權 refs sync、delete、force push、backfill、tag rewrite 或 primary 執行。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"check_id",
|
||
"display_order",
|
||
"title",
|
||
"required",
|
||
"pass_condition",
|
||
"failure_lane",
|
||
"awooop_display",
|
||
"execution_authorized"
|
||
],
|
||
"properties": {
|
||
"check_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"title": {"type": "string"},
|
||
"required": {"type": "boolean"},
|
||
"pass_condition": {"type": "string"},
|
||
"failure_lane": {"type": "string"},
|
||
"awooop_display": {
|
||
"type": "string",
|
||
"enum": [
|
||
"ready_for_owner_review",
|
||
"request_more_evidence",
|
||
"quarantine_sensitive_payload",
|
||
"reject_execution_request"
|
||
]
|
||
},
|
||
"execution_authorized": {"type": "boolean", "const": false}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"owner_response_request_packet": {
|
||
"type": "object",
|
||
"description": "AwoooP 可直接顯示給 owner 的 S4.11 refs truth 回覆請求;只說明要填什麼與不得貼什麼,不授權 fetch、push、delete、force push、rewrite refs 或 GitHub primary 執行。",
|
||
"required": [
|
||
"request_id",
|
||
"display_status",
|
||
"requested_packet",
|
||
"required_response_item_count",
|
||
"requested_template_ids",
|
||
"owner_instruction_summary",
|
||
"allowed_response_fields",
|
||
"evidence_ref_rules",
|
||
"forbidden_payloads",
|
||
"allowed_submission_modes",
|
||
"awooop_display_mode",
|
||
"execution_authorized",
|
||
"not_approval",
|
||
"still_forbidden"
|
||
],
|
||
"properties": {
|
||
"request_id": {"type": "string"},
|
||
"display_status": {"type": "string", "enum": ["ready_to_request_owner_response"]},
|
||
"requested_packet": {"type": "string"},
|
||
"required_response_item_count": {"type": "integer", "minimum": 0},
|
||
"requested_template_ids": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"owner_instruction_summary": {"type": "string"},
|
||
"allowed_response_fields": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"evidence_ref_rules": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"forbidden_payloads": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"allowed_submission_modes": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"awooop_display_mode": {"type": "string", "enum": ["display_owner_response_request_only"]},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true},
|
||
"still_forbidden": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"response_templates": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"template_id",
|
||
"lane",
|
||
"affected_repos",
|
||
"risk",
|
||
"covered_item_count",
|
||
"requested_owner_decision",
|
||
"required_owner_fields",
|
||
"acceptable_decisions",
|
||
"minimum_evidence_refs",
|
||
"acceptance_criteria",
|
||
"rejection_conditions",
|
||
"allowed_outputs",
|
||
"execution_authorized"
|
||
],
|
||
"properties": {
|
||
"template_id": {"type": "string"},
|
||
"lane": {"type": "string"},
|
||
"affected_repos": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"risk": {"type": "string"},
|
||
"covered_item_count": {"type": "integer", "minimum": 0},
|
||
"requested_owner_decision": {"type": "string"},
|
||
"required_owner_fields": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"acceptable_decisions": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"minimum_evidence_refs": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"acceptance_criteria": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"rejection_conditions": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"allowed_outputs": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"execution_authorized": {
|
||
"type": "boolean",
|
||
"const": false
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"acceptance_checks": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"check_id",
|
||
"title",
|
||
"required",
|
||
"pass_condition",
|
||
"failure_lane",
|
||
"execution_authorized"
|
||
],
|
||
"properties": {
|
||
"check_id": {"type": "string"},
|
||
"title": {"type": "string"},
|
||
"required": {"type": "boolean"},
|
||
"pass_condition": {"type": "string"},
|
||
"failure_lane": {"type": "string"},
|
||
"execution_authorized": {"type": "boolean", "const": false}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"rejection_rules": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"allowed_outputs": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"forbidden_actions": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
}
|