feat: strengthen BSP and PSP validation and handoff

This commit is contained in:
tangfahong committed 2026-09-24 11:52:22 +08:00
1 parent bcea35a91e
commit 1641fac631
39 files changed
+2695 -90

No files matched your search

@@ -287,7 +287,7 @@ def render(
status: str,
psp_repo: Path,
repository_url: str | None,
reference_psp: str,
reference_psp: str | None,
reference_commit: str | None,
static_path: Path,
bsp_lock_path: Path,
@@ -426,7 +426,9 @@ def build_parser() -> argparse.ArgumentParser:
parser.add_argument("--status", required=True, choices=STATUSES)
parser.add_argument("--psp-repo", type=Path, required=True)
parser.add_argument("--repository-url")
parser.add_argument("--reference-psp", required=True)
reference_group = parser.add_mutually_exclusive_group(required=True)
reference_group.add_argument("--reference-psp")
reference_group.add_argument("--no-reference", action="store_true")
parser.add_argument("--reference-commit")
parser.add_argument("--static-validation", type=Path, required=True)
parser.add_argument("--bsp-lock", type=Path, required=True)
@@ -453,6 +455,8 @@ def build_parser() -> argparse.ArgumentParser:
def main() -> int:
args = build_parser().parse_args()
try:
if args.no_reference and args.reference_commit:
raise HandoffError("无参考 PSP 时不能填写 --reference-commit")
remote_verification = None
if args.verify_remote:
if not args.repository_url: