feat(ADM-018): completed feature

This commit is contained in:
chattie
2026-08-17 22:23:10 +02:00
parent cf1c69fc8b
commit d595b4871f
871 changed files with 47411 additions and 281 deletions

View File

@@ -213,6 +213,7 @@ def validate_stage_transition(status, args):
stage = args.stage or status.get('stage') or 'idle'
agent = args.agent or status.get('agent') or STAGE_OWNERS.get(stage)
feature_id = args.feature_id if args.feature_id is not None else status.get('feature_id')
state = args.state
expected_owner = STAGE_OWNERS.get(stage)
if expected_owner and agent != expected_owner:
@@ -227,6 +228,16 @@ def validate_stage_transition(status, args):
suffix = f" con verdict {verdict}" if verdict else ""
raise SystemExit(f"No se puede entrar en {stage}: falta {filename}{suffix} para {feature_id}")
# Block marking close stage as done without all required gates
if stage == 'close' and state == 'done' and feature_id:
missing_gates = []
for gate_agent in ['reviewer', 'security', 'qa']:
gate_file = GATE_FILES[gate_agent]
if not artifact_ok(feature_id, gate_file, 'APPROVED'):
missing_gates.append(f"{gate_file} (APPROVED)")
if missing_gates:
raise SystemExit(f"No se puede cerrar {feature_id}: faltan gates aprobados: {', '.join(missing_gates)}")
def validate_runtime_args(args):
roles = set(load_roles()) or set(DEFAULT_EMOJIS)