fix(cases): expose explicit versioned type roots in Mason CLI
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a140c4-354a-7823-8f0d-8f717397f786
This commit is contained in:
parent
e4761b843c
commit
57411f25b9
4 changed files with 129 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ def _parser() -> argparse.ArgumentParser:
|
|||
help="skip the live OpenBao survey (marks the plan's survey source 'none')",
|
||||
)
|
||||
plan.add_argument("--netkingdom-root", type=Path, default=None)
|
||||
plan.add_argument("--types-root", type=Path, help="explicit exact-version SecurityCaseType root")
|
||||
plan.add_argument(
|
||||
"--allow-unimplemented",
|
||||
action="store_true",
|
||||
|
|
@ -74,6 +75,7 @@ def _parser() -> argparse.ArgumentParser:
|
|||
help="reference case only: build against an acknowledged type",
|
||||
)
|
||||
build.add_argument("--netkingdom-root", type=Path, default=None)
|
||||
build.add_argument("--types-root", type=Path, help="explicit exact-version SecurityCaseType root")
|
||||
structure = families.add_parser(
|
||||
"structure-request", help="read-only typed structural evidence request"
|
||||
)
|
||||
|
|
@ -81,6 +83,7 @@ def _parser() -> argparse.ArgumentParser:
|
|||
structure.add_argument("--plan", required=True, type=Path)
|
||||
structure.add_argument("--bundle", required=True, type=Path)
|
||||
structure.add_argument("--netkingdom-root", type=Path)
|
||||
structure.add_argument("--types-root", type=Path, help="explicit exact-version SecurityCaseType root")
|
||||
structure.add_argument("--allow-unimplemented", action="store_true")
|
||||
return parser
|
||||
|
||||
|
|
@ -101,6 +104,7 @@ def _build(args) -> int:
|
|||
args.plan,
|
||||
out,
|
||||
nk_root=nk_root,
|
||||
types_root=args.types_root,
|
||||
allow_unimplemented=args.allow_unimplemented,
|
||||
)
|
||||
except (
|
||||
|
|
@ -134,6 +138,7 @@ def _plan(args) -> int:
|
|||
doc, collisions, rendered = case_plan.plan_from_case(
|
||||
args.case,
|
||||
nk_root=nk_root,
|
||||
types_root=args.types_root,
|
||||
structure=case_plan.Structure() if args.no_live else None,
|
||||
allow_unimplemented=args.allow_unimplemented,
|
||||
)
|
||||
|
|
@ -171,6 +176,7 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|||
args.plan,
|
||||
args.bundle,
|
||||
nk_root=args.netkingdom_root or case_plan.DEFAULT_NK_ROOT,
|
||||
types_root=args.types_root,
|
||||
allow_unimplemented=args.allow_unimplemented,
|
||||
)
|
||||
except Exception:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue