governance: enforce strict Questions→Proposal→Plan gates with explicit approval phrases; add branching proposal; mark plan pending; audit checks sequencing
Some checks failed
ci / test (push) Has been cancelled
Some checks failed
ci / test (push) Has been cancelled
This commit is contained in:
@@ -38,6 +38,35 @@ check "Gitea workflow exists" test -f .gitea/workflows/ci.yml
|
||||
# Docker compose for local parity
|
||||
check "docker/compose.yml exists" test -f docker/compose.yml
|
||||
|
||||
# Sequencing gates: for each plan, ensure corresponding proposal approved; for each proposal, ensure questions approved
|
||||
status_warn=0
|
||||
for plan in collab/plan/*.md; do
|
||||
[ -f "$plan" ] || continue
|
||||
base=$(basename "$plan")
|
||||
prefix=${base%%.md}
|
||||
proposal="collab/proposals/$prefix.md"
|
||||
if [ ! -f "$proposal" ]; then
|
||||
echo "[fail] Missing proposal for plan: $plan" >&2; failures=$((failures+1)); continue
|
||||
fi
|
||||
if ! grep -q "Approved for Plan" "$proposal"; then
|
||||
echo "[warn] Proposal not yet approved for plan ($prefix). Plan should be pending." >&2
|
||||
status_warn=1
|
||||
fi
|
||||
# check questions
|
||||
qfile="collab/questions/$prefix.md"
|
||||
if [ ! -f "$qfile" ]; then
|
||||
echo "[fail] Missing questions for: $prefix" >&2; failures=$((failures+1))
|
||||
else
|
||||
if ! grep -q "Approved for Proposal" "$qfile"; then
|
||||
echo "[warn] Questions not yet approved for proposal ($prefix)." >&2
|
||||
status_warn=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$status_warn" -eq 1 ]; then
|
||||
echo "[note] Sequencing warnings present; ensure approvals before proceeding."
|
||||
fi
|
||||
|
||||
echo "[summary] failures=$failures"
|
||||
exit "$failures"
|
||||
|
||||
|
Reference in New Issue
Block a user