WARDEN-WP-0044-T01: warden case check-type; revised oidc-rp 1.0 type conforms
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

Mechanical follow-through check (lane, warden_executes, value_handling,
attended justification, read-free verification, rollback coverage). The
revised type passes schema; lanes identity-provisioner-groups and
keycape-client-secret-generate are not yet in the catalog (gate T02).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 327203@bnt-lap001
Assistant-Session: 55028ae3-4914-4bd1-8f5c-815f3527aef0
This commit is contained in:
tegwick 2026-10-09 00:25:11 +02:00
parent 98cb0bc24a
commit 0e7ceb8c06
5 changed files with 349 additions and 1 deletions

View file

@ -7,6 +7,7 @@ from pathlib import Path
from typing import Annotated, List, Optional
import typer
import yaml
from rich.console import Console
from rich.table import Table
@ -50,6 +51,11 @@ memory_app = typer.Typer(
no_args_is_help=True,
)
app.add_typer(memory_app, name="memory")
case_app = typer.Typer(
help="SecurityCaseType follow-through (WARDEN-WP-0044; read-only check, no execution)",
no_args_is_help=True,
)
app.add_typer(case_app, name="case")
console = Console()
err = Console(stderr=True)
@ -2212,3 +2218,28 @@ def memory_activate(
print(json.dumps(payload, indent=2))
return
console.print(warden_memory.format_activation_summary(payload))
@case_app.command("check-type")
def case_check_type(
type_file: Annotated[Path, typer.Argument(help="SecurityCaseType type.yaml")],
output_json: Annotated[bool, typer.Option("--json", help="Output JSON")] = False,
) -> None:
"""Check a type's follow_through against ops-warden's planning rules (exit 1 if not plannable)."""
from warden.case_type import check_follow_through, load_type, summarize
try:
doc = load_type(type_file)
except (OSError, ValueError, yaml.YAMLError) as exc:
err.print(f"[red]{exc}[/red]")
raise typer.Exit(2)
report = check_follow_through(doc, _load_catalog())
if output_json:
print(json.dumps(report.as_dict(), indent=2))
else:
console.print(f"{report.type_id} {report.version}: schema_ok={report.schema_ok} plannable={report.plannable}")
console.print(f"warden executes: {', '.join(report.warden_steps) or '-'}")
console.print(f"attended sessions: {', '.join(report.attended_lanes) or '-'}")
if report.findings:
console.print(summarize(report.findings), markup=False)
raise typer.Exit(0 if report.plannable else 1)