Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Dispatches caller-supplied disjoint write-scope packets exactly once through a chosen executor, returning per-packet results.
32% 95%+64 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 7 of 22 without it.
3 of 3 safety checks passed
Not used yet
#!/usr/bin/env python3
"""One-shot dispatch for explicit packets with disjoint write scopes."""
from __future__ import annotations
from collections.abc import Callable, Iterable, Mapping
from pathlib import PurePosixPath
from typing import Any
def _packet_id(packet: Mapping[str, Any]) -> str:
value = packet.get("packet_id", packet.get("id"))
if not isinstance(value, str) or not value.strip():
raise ValueError("each packet needs a nonempty packet_id")
return value
def _includes(packet: Mapping[str, Any]) -> tuple[str, ...]:
scope = packet.get("write_scope")
if not isinstance(scope, Mapping):
raise ValueError(f"{_packet_id(packet)}: write_scope must be an object")
# `exclude` is not honored by the lexical disjointness proof below. Admitting
# it silently would let a packet look narrower than it dispatches, so reject
# its presence rather than ignore it.
if scope.get("exclude"):
raise ValueError(
f"{_packet_id(packet)}: write_scope.exclude is not honored by the "
"disjointness proof — remove it or narrow include instead"
)
raw = scope.get("include")
if not isinstance(raw, list) or not raw:
raise ValueError(f"{_packet_id(packet)}: write_scope.include must be nonempty")
normalized: list[str] = []
for value in raw:
if not isinstance(value, str) or not value.strip():
raise ValueError(f"{_packet_id(packet)}: include paths must be nonempty strings")
path = PurePosixPath(value.replace("\\", "/"))
if path.is_absolute() or ".." in path.parts:
raise ValueError(f"{_packet_id(packet)}: include path must be workspace-relative: {value}")
normalized.append(path.as_posix().rstrip("/"))Published skills whose descriptions closely match this one, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.