Graphify-Labs/graphify · error · SystemExit
error: unknown platform '{key}'
Error message
error: unknown platform '{key}' What it means
In the audit-coverage branch of skillgen's CLI main(), each key derived from --platform (or the full sorted platform list) is checked against the platforms registry before audit_coverage() runs. An unrecognized key exits immediately with SystemExit('error: unknown platform …'). Unlike the render_all() variant (which lists known platforms), this shorter message is purely a usage guard on the audit path.
Source
Thrown at tools/skillgen/gen.py:1313
# The git-show validators read origin/v8. On a shallow checkout that ref is
# absent; skip with a clear, actionable message instead of crashing. CI fixes
# this for real by setting fetch-depth: 0 so the validators actually run.
_GIT_SHOW_VALIDATORS = (args.audit_coverage, args.monolith_roundtrip, args.always_on_roundtrip)
if any(_GIT_SHOW_VALIDATORS) and not _v8_available():
print(
"SKIPPED: origin/v8 is not fetchable in this checkout, so the git-show "
"validators cannot run. On CI, set fetch-depth: 0 on this job (actions/"
"checkout) so origin/v8 is fetched and the validators run for real.",
file=sys.stderr,
)
return 0
if args.audit_coverage:
keys = [args.platform] if args.platform else sorted(platforms)
all_problems: list[str] = []
for key in keys:
if key not in platforms:
raise SystemExit(f"error: unknown platform '{key}'")
all_problems.extend(f"[{key}] {m}" for m in audit_coverage(platforms[key]))
if all_problems:
print("audit-coverage FAILED:", file=sys.stderr)
for m in all_problems:
print(f" {m}", file=sys.stderr)
return 1
print("audit-coverage OK: every per-host v8 heading single-homes in that host's render.")
return 0
if args.schema_singleton:
problems = schema_singleton(
{args.platform: platforms[args.platform]} if args.platform else platforms
)
if problems:
print("schema-singleton FAILED (file_type enum drift):", file=sys.stderr)
for m in problems:
print(f" {m}", file=sys.stderr)
return 1View on GitHub (pinned to 7fe58b0b0f)
Solutions
- Use an exact, case-sensitive key from the platforms registry (inspect sorted(platforms) in tools/skillgen/gen.py)
- Omit --platform to audit all platforms instead of guessing a single key
- If the platform should exist, restore/add its definition in the platforms registry and re-run
Example fix
# before $ python tools/skillgen/gen.py --audit-coverage --platform Codex # error: unknown platform 'Codex' # after $ python tools/skillgen/gen.py --audit-coverage --platform codex
Defensive patterns
Strategy: validation
Validate before calling
from tools.skillgen.gen import platforms
key = 'codex'
assert key in platforms, f'unknown platform {key!r}; valid: {sorted(platforms)}'
problems = audit_coverage(platforms[key]) Type guard
def is_known_platform(key: str, platforms: dict) -> bool:
return isinstance(key, str) and key in platforms Prevention
- Derive --platform values from the registry (sorted(platforms)) in scripts and CI configs
- Case-check: platform keys are lowercase; reject capitalized input early
- When a platform is renamed, grep CI scripts and docs for the old key in the same commit
When it happens
Trigger: Running `gen.py --audit-coverage --platform <key>` (or the equivalent subcommand) with a key not present in the platforms dict — typo, wrong case, or a removed/renamed platform definition.
Common situations: Copy-pasting a --platform value from old docs after a platform rename; case mismatches ('Codex' vs 'codex'); running the audit on a checkout whose platform registry differs from the one the docs were written for.
Related errors
- error: unknown platform '{key}'. Known: {', '.join(sorted(pl
- communities dict is empty — refusing to clear wiki/. Run `gr
- error: could not read {ref}: {result.stderr.strip()}
- graph not found: {source_path}
- repo '{repo_tag}' not in global graph
AI-assisted analysis of Graphify-Labs/graphify@7fe58b0b0f (2026-08-14).
Data as JSON: /api/errors/b84f2ccf558c1a43.
Report an issue: GitHub.