325 lines
11 KiB
JSON
325 lines
11 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",
|
|
"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},
|
|
"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_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
|
|
}
|