Evidence export of closed runs and rtut seal (RBT-WP-0009-T04)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: sonnet Assistant-Process: 295952@bnt-lap001 Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
This commit is contained in:
parent
e021fd979f
commit
6d70f4d97d
12 changed files with 149 additions and 19 deletions
|
|
@ -174,6 +174,8 @@ def main(argv: list[str] | None = None) -> int:
|
|||
sp = sub.add_parser("ui", help="serve the local UI on 127.0.0.1")
|
||||
sp.add_argument("roots", nargs="*", default=["."])
|
||||
sp.add_argument("--port", type=int, default=8877)
|
||||
sp = sub.add_parser("seal", help="check the seal of an exported run or project-run record (JSON file)")
|
||||
sp.add_argument("record")
|
||||
sp = sub.add_parser("check", help="validate every pack, attribute set, project and template under a repository")
|
||||
sp.add_argument("root", nargs="?", default=".")
|
||||
sp = sub.add_parser("maturity", help="derived maturity of a pack at its current revision")
|
||||
|
|
@ -213,6 +215,15 @@ def main(argv: list[str] | None = None) -> int:
|
|||
except KeyboardInterrupt:
|
||||
pass
|
||||
return 0
|
||||
if a.cmd == "seal":
|
||||
import json
|
||||
from . import run as R
|
||||
try:
|
||||
state = R.record_seal_state(json.loads(Path(a.record).read_text()))
|
||||
except (OSError, ValueError) as e:
|
||||
print(f"error: {e}", file=sys.stderr); return 1
|
||||
print(state)
|
||||
return {"sealed": 0, "unsealed": 2, "open": 2, "broken": 1}[state]
|
||||
if a.cmd == "check":
|
||||
return _check(a.root)
|
||||
if a.cmd == "project":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue