chore(repair): deterministic auto-fix attempt 1

This commit is contained in:
github-actions[bot]
2026-03-02 17:09:50 +00:00
parent 6f56a9aff6
commit e6c02769d5
8 changed files with 206 additions and 38 deletions
@@ -0,0 +1,2 @@
PyYAML is required. Install with: pip3 install pyyaml
No module named 'yaml'
@@ -0,0 +1,16 @@
{
"generated_at": "2026-03-02T17:09:50Z",
"check_log": ".factory/repair/main/20260302T170949Z/attempt-1/check.log",
"recipes_file": "repairs/recipes.yaml",
"pr_url": "",
"recommended_recipe_ids": [
"format-json",
"strip-trailing-whitespace",
"regen-evidence-index",
"normalize-queue-shape"
],
"gh_checks": {
"available": false,
"reason": "no_pr_url"
}
}
@@ -0,0 +1,9 @@
$ cat '.factory/repair/main/20260302T170949Z/attempt-1/check.log' && false
stdout:
PyYAML is required. Install with: pip3 install pyyaml
No module named 'yaml'
stderr:
+2 -2
View File
@@ -76,10 +76,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest # 或 docker, self-hosted
steps:
- uses: actions/checkout@v4
- name: 构建镜像
run: |
docker build -t myapp:${{ gitea.sha }} .
+131 -26
View File
@@ -13,39 +13,92 @@
"deploy"
],
"properties": {
"evidenceId": { "type": "string", "minLength": 3 },
"service": { "type": "string", "minLength": 1 },
"env": { "type": "string", "minLength": 1 },
"evidenceId": {
"type": "string",
"minLength": 3
},
"service": {
"type": "string",
"minLength": 1
},
"env": {
"type": "string",
"minLength": 1
},
"source": {
"type": "object",
"required": ["repo", "commit"],
"required": [
"repo",
"commit"
],
"additionalProperties": true,
"properties": {
"repo": { "type": "string", "minLength": 3 },
"commit": { "type": "string", "minLength": 1 },
"workflowRun": { "type": ["string", "null"] }
"repo": {
"type": "string",
"minLength": 3
},
"commit": {
"type": "string",
"minLength": 1
},
"workflowRun": {
"type": [
"string",
"null"
]
}
}
},
"image": {
"type": "object",
"required": ["harbor"],
"required": [
"harbor"
],
"additionalProperties": true,
"properties": {
"ghcr": { "type": ["string", "null"] },
"harbor": { "type": "string", "minLength": 3 }
"ghcr": {
"type": [
"string",
"null"
]
},
"harbor": {
"type": "string",
"minLength": 3
}
}
},
"deploy": {
"type": "object",
"required": ["deployRepoCommit"],
"required": [
"deployRepoCommit"
],
"additionalProperties": true,
"properties": {
"deployRepoCommit": { "type": "string", "minLength": 1 },
"argocdApp": { "type": ["string", "null"] },
"syncedAt": { "type": ["string", "null"] }
"deployRepoCommit": {
"type": "string",
"minLength": 1
},
"argocdApp": {
"type": [
"string",
"null"
]
},
"syncedAt": {
"type": [
"string",
"null"
]
}
}
},
"promotedAt": { "type": ["string", "null"] },
"promotedAt": {
"type": [
"string",
"null"
]
},
"tests": {
"type": "object",
"additionalProperties": true,
@@ -54,17 +107,42 @@
"type": "object",
"additionalProperties": true,
"properties": {
"status": { "type": ["string", "null"] },
"details": { "type": ["string", "null"] },
"url": { "type": ["string", "null"] }
"status": {
"type": [
"string",
"null"
]
},
"details": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
}
},
"e2e": {
"type": "object",
"additionalProperties": true,
"properties": {
"status": { "type": ["string", "null"] },
"url": { "type": ["string", "null"] }
"status": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
}
}
}
@@ -73,14 +151,41 @@
"type": "object",
"additionalProperties": true,
"properties": {
"specPr": { "type": ["string", "null"] },
"archPr": { "type": ["string", "null"] },
"demoPr": { "type": ["string", "null"] },
"uatPr": { "type": ["string", "null"] },
"releasePr": { "type": ["string", "null"] },
"specPr": {
"type": [
"string",
"null"
]
},
"archPr": {
"type": [
"string",
"null"
]
},
"demoPr": {
"type": [
"string",
"null"
]
},
"uatPr": {
"type": [
"string",
"null"
]
},
"releasePr": {
"type": [
"string",
"null"
]
},
"prs": {
"type": "array",
"items": { "type": "string" }
"items": {
"type": "string"
}
}
}
}
+2 -2
View File
@@ -35,7 +35,7 @@ spec:
- -c
- |
set -e
# 注册 runner(如果未注册)
if [ ! -f /data/.runner ]; then
echo "Registering runner..."
@@ -46,7 +46,7 @@ spec:
--labels ubuntu-latest,ubuntu-22.04,docker,self-hosted \
--no-interactive
fi
# 启动 runner
echo "Starting runner..."
act_runner daemon --config /config/config.yaml
+22 -4
View File
@@ -3,28 +3,46 @@
{
"id": "format-json",
"description": "Pretty-format JSON payloads for queue/evidence/env files.",
"trigger_keywords": ["json", "parse", "decode", "unexpected token"],
"trigger_keywords": [
"json",
"parse",
"decode",
"unexpected token"
],
"action": "format_json",
"default_on_unknown": true
},
{
"id": "strip-trailing-whitespace",
"description": "Remove trailing whitespace from source/docs files.",
"trigger_keywords": ["whitespace", "lint", "format"],
"trigger_keywords": [
"whitespace",
"lint",
"format"
],
"action": "strip_trailing_whitespace",
"default_on_unknown": true
},
{
"id": "regen-evidence-index",
"description": "Regenerate evidence/index.json from evidence/records.",
"trigger_keywords": ["evidence/index.json", "generated", "out of date"],
"trigger_keywords": [
"evidence/index.json",
"generated",
"out of date"
],
"action": "regenerate_evidence_index",
"default_on_unknown": true
},
{
"id": "normalize-queue-shape",
"description": "Ensure release queue has pending/promoted/failed lists.",
"trigger_keywords": ["queue", "pending", "promoted", "failed"],
"trigger_keywords": [
"queue",
"pending",
"promoted",
"failed"
],
"action": "normalize_queue_shape",
"default_on_unknown": true
}
+22 -4
View File
@@ -3,28 +3,46 @@
{
"id": "format-json",
"description": "Pretty-format JSON payloads for queue/evidence/env files.",
"trigger_keywords": ["json", "parse", "decode", "unexpected token"],
"trigger_keywords": [
"json",
"parse",
"decode",
"unexpected token"
],
"action": "format_json",
"default_on_unknown": true
},
{
"id": "strip-trailing-whitespace",
"description": "Remove trailing whitespace from source/docs files.",
"trigger_keywords": ["whitespace", "lint", "format"],
"trigger_keywords": [
"whitespace",
"lint",
"format"
],
"action": "strip_trailing_whitespace",
"default_on_unknown": true
},
{
"id": "regen-evidence-index",
"description": "Regenerate evidence/index.json from evidence/records.",
"trigger_keywords": ["evidence/index.json", "generated", "out of date"],
"trigger_keywords": [
"evidence/index.json",
"generated",
"out of date"
],
"action": "regenerate_evidence_index",
"default_on_unknown": true
},
{
"id": "normalize-queue-shape",
"description": "Ensure release queue has pending/promoted/failed lists.",
"trigger_keywords": ["queue", "pending", "promoted", "failed"],
"trigger_keywords": [
"queue",
"pending",
"promoted",
"failed"
],
"action": "normalize_queue_shape",
"default_on_unknown": true
}