Extend planner scope with replaceable checklist and presentation
Check instruction packages / check (push) Failing after 2s
Check instruction packages / check (push) Failing after 2s
This commit is contained in:
1 parent
b4666bbda1
commit
f42eba659d
6 files changed
+69
-8
No files matched your search
+13
-2
@@ -44,15 +44,26 @@ def check_package(path):
|
||||
manifest = json.loads(_text(raw_manifest, str(sidecar)))
|
||||
except (ValueError, TypeError) as error:
|
||||
_fail(f"{sidecar}: invalid JSON: {error}")
|
||||
if not isinstance(manifest, dict) or set(manifest) != {"schemaVersion", "source", "role", "step", "files"}:
|
||||
if not isinstance(manifest, dict) or (
|
||||
(manifest.get("schemaVersion") == 1 and set(manifest) != {"schemaVersion", "source", "role", "step", "files"}) or
|
||||
(manifest.get("schemaVersion") == 2 and set(manifest) != {"schemaVersion", "source", "role", "step", "files", "issueClaim"}) or
|
||||
manifest.get("schemaVersion") not in (1, 2)
|
||||
):
|
||||
_fail(f"{path}: unsupported manifest fields")
|
||||
source = manifest["source"]
|
||||
if not isinstance(source, dict) or set(source) != {"kind", "reference"}:
|
||||
_fail(f"{path}: invalid source")
|
||||
if source["kind"] not in ("first-party", "user") or not isinstance(source["reference"], str) or not re.fullmatch(r"[A-Za-z0-9._:-]{1,128}", source["reference"]):
|
||||
_fail(f"{path}: invalid source identity")
|
||||
if manifest["schemaVersion"] != 1 or (manifest["role"], manifest["step"]) not in (("planner", "planning"), ("implementer", "implementation"), ("reviewer", "review"), ("designer", "design")):
|
||||
if (manifest["role"], manifest["step"]) not in (("planner", "planning"), ("implementer", "implementation"), ("reviewer", "review"), ("designer", "design")):
|
||||
_fail(f"{path}: incompatible role or step")
|
||||
if manifest["schemaVersion"] == 2:
|
||||
claim = manifest["issueClaim"]
|
||||
label = claim.get("statusLabel") if isinstance(claim, dict) else None
|
||||
if (manifest["role"], manifest["step"]) != ("planner", "planning") or not isinstance(claim, dict) or set(claim) != {"statusLabel"} or (
|
||||
label is not None and (not isinstance(label, str) or not re.fullmatch(r"status/[a-z][a-z0-9-]{0,63}", label) or label == "status/ready-for-agent")
|
||||
):
|
||||
_fail(f"{path}: invalid issue claim policy")
|
||||
files = manifest["files"]
|
||||
if not isinstance(files, list) or not 1 <= len(files) <= 16:
|
||||
_fail(f"{path}: invalid file list")
|
||||
|
||||
Reference in new issue
Block a user