102 lines
4.3 KiB
Bash
Executable File
102 lines
4.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
MATRIX="$ROOT_DIR/working/04-任务矩阵.md"
|
|
README="$ROOT_DIR/working/README.md"
|
|
FUNCTIONS="$ROOT_DIR/working/01-项目功能内容.md"
|
|
NML_EVAL="$ROOT_DIR/working/09-emc_nml复用评估.md"
|
|
LEDGER="$ROOT_DIR/working/03-推进台账.md"
|
|
EVIDENCE="$ROOT_DIR/working/05-验收证据.md"
|
|
DECISIONS="$ROOT_DIR/working/06-决策记录.md"
|
|
|
|
fail() {
|
|
printf 'task_working_closure_status=fail\n'
|
|
printf 'task_working_closure_error=%s\n' "$1"
|
|
exit 1
|
|
}
|
|
|
|
require_file() {
|
|
local label="$1"
|
|
local file="$2"
|
|
[[ -f "$file" ]] || fail "$label missing: $file"
|
|
printf 'task_working_closure_%s=ok\n' "$label"
|
|
}
|
|
|
|
require_text() {
|
|
local label="$1"
|
|
local file="$2"
|
|
local text="$3"
|
|
grep -Fq "$text" "$file" || fail "$label missing"
|
|
printf 'task_working_closure_%s=ok\n' "$label"
|
|
}
|
|
|
|
reject_regex() {
|
|
local label="$1"
|
|
local file="$2"
|
|
local regex="$3"
|
|
if grep -Eq "$regex" "$file"; then
|
|
fail "$label present"
|
|
fi
|
|
printf 'task_working_closure_%s=absent\n' "$label"
|
|
}
|
|
|
|
require_file matrix "$MATRIX"
|
|
require_file readme "$README"
|
|
require_file functions "$FUNCTIONS"
|
|
require_file nml_eval "$NML_EVAL"
|
|
require_file ledger "$LEDGER"
|
|
require_file evidence "$EVIDENCE"
|
|
require_file decisions "$DECISIONS"
|
|
|
|
require_text matrix_t007_done "$MATRIX" '| T-007 | 建立 `EMC_STAT` 等价状态容器 | 完成 |'
|
|
require_text matrix_t047_done "$MATRIX" '| T-047 | 收口 working 索引与闭合 gate | 完成 |'
|
|
require_text matrix_t048_done "$MATRIX" '| T-048 | 将 working closure gate 纳入全局文档一致性验证 | 完成 |'
|
|
require_text matrix_t049_done "$MATRIX" '| T-049 | 建立 task-HAL 全量闭合验证入口 | 完成 |'
|
|
require_text matrix_t050_done "$MATRIX" '| T-050 | 建立 status JSON LinuxCNC 对标方案 | 完成 |'
|
|
require_text matrix_t051_done "$MATRIX" '| T-051 | SJ-1 规范 `emcStatus.motion.traj` | 完成 |'
|
|
require_text matrix_t052_done "$MATRIX" '| T-052 | SJ-2 规范 task line 和 interpreter 字段 | 完成 |'
|
|
require_text matrix_t053_done "$MATRIX" '| T-053 | SJ-3 规范 `emcStatus.motion.axis[]` 和 `joint[]` | 完成 |'
|
|
require_text matrix_t054_done "$MATRIX" '| T-054 | SJ-4 规范 IO/aux/tool/coolant 边界 | 完成 |'
|
|
require_text matrix_t055_done "$MATRIX" '| T-055 | SJ-5 引入 status JSON contract gate | 完成 |'
|
|
require_text matrix_next_none "$MATRIX" '下一条优先任务:无'
|
|
reject_regex matrix_unclosed_tasks "$MATRIX" '^\| T-[0-9]+ \|.*\| (待办|进行中|阻塞) \|'
|
|
|
|
require_text readme_closed "$README" '当前所有任务均为完成'
|
|
require_text readme_status_source "$README" 'StandaloneEmcStatus'
|
|
require_text readme_no_json "$README" 'host JSON motion plan 仅保留为 timed-plan 兼容/调试入口'
|
|
|
|
require_text functions_closed "$FUNCTIONS" '## 当前闭合状态'
|
|
require_text functions_standalone_status "$FUNCTIONS" 'StandaloneEmcStatus'
|
|
require_text functions_readiness "$FUNCTIONS" 'fullLinuxCncProgramExecutionReady=false'
|
|
|
|
require_text nml_t007_done "$NML_EVAL" 'T-007 已建立集中 `StandaloneEmcStatus`'
|
|
require_text ledger_t007 "$LEDGER" 'T-007 已完成'
|
|
require_text ledger_t047 "$LEDGER" 'T-047 已完成'
|
|
require_text ledger_t048 "$LEDGER" 'T-048 已完成'
|
|
require_text ledger_t049 "$LEDGER" 'T-049 已完成'
|
|
require_text ledger_t050 "$LEDGER" 'T-050 已完成'
|
|
require_text ledger_t051 "$LEDGER" 'T-051'
|
|
require_text ledger_t052 "$LEDGER" 'T-052'
|
|
require_text ledger_t053 "$LEDGER" 'T-053'
|
|
require_text ledger_t054 "$LEDGER" 'T-054'
|
|
require_text ledger_t055 "$LEDGER" 'T-055'
|
|
require_text evidence_t007 "$EVIDENCE" 'T-007 验收通过'
|
|
require_text evidence_t047 "$EVIDENCE" 'T-047 验收通过'
|
|
require_text evidence_t048 "$EVIDENCE" 'T-048 验收通过'
|
|
require_text evidence_t049 "$EVIDENCE" 'T-049 验收通过'
|
|
require_text evidence_t050 "$EVIDENCE" 'T-050 验收通过'
|
|
require_text evidence_t051 "$EVIDENCE" 'T-051'
|
|
require_text evidence_t052 "$EVIDENCE" 'T-052'
|
|
require_text evidence_t053 "$EVIDENCE" 'T-053'
|
|
require_text evidence_t054 "$EVIDENCE" 'T-054'
|
|
require_text evidence_t055 "$EVIDENCE" 'T-055'
|
|
require_text decision_t007 "$DECISIONS" 'D-039'
|
|
require_text decision_t047 "$DECISIONS" 'D-040'
|
|
require_text decision_t048 "$DECISIONS" 'D-041'
|
|
require_text decision_t049 "$DECISIONS" 'D-042'
|
|
require_text decision_t050 "$DECISIONS" 'D-044'
|
|
require_text decision_t051_t055 "$DECISIONS" 'D-045'
|
|
|
|
printf 'task_working_closure_status=ok\n'
|