{
  "nbformat": 4,
  "nbformat_minor": 5,
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.12.14"
    },
    "execution_note": "Code cells executed with Python via an AST-based offline notebook runner; outputs are actual stdout and rich MIME return values. No Jupyter package dependency."
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# Audit the evaluation before trusting the score\n",
        "\n",
        "This notebook reruns the attached offline analysis. Place all bundle files in one directory and run from that directory. The default path uses Python’s standard library only. Published measurements, metadata and illustrative numerical probes are identified in the article and provenance. No model or API calls occur.\n"
      ],
      "id": "cell-1"
    },
    {
      "cell_type": "code",
      "metadata": {},
      "source": [
        "import sys, json, runpy\n",
        "from pathlib import Path\n",
        "if str(Path.cwd()) not in sys.path:\n",
        "    sys.path.insert(0, str(Path.cwd()))\n",
        "analysis = runpy.run_path('analyze.py', run_name='offline_analysis')\n",
        "result = analysis['analyze']()\n",
        "analysis['draw'](result)\n",
        "print('All analysis assertions passed; figures and results regenerated.')\n",
        "print(json.dumps(result, indent=2))\n"
      ],
      "execution_count": 1,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "All analysis assertions passed; figures and results regenerated.\n",
            "{\n",
            "  \"entries\": [\n",
            "    {\n",
            "      \"dataset\": \"intervention/aime.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"explicitly skipped\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": \"AIME problem text is not redistributed in OSS; rows expose `url` and `source` instead of `problem`.\",\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.answer_checking_autograder\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.hint_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"intervention/daft.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"metadata-eligible for mock scaffold\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.answer_checking_autograder\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.hint_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"intervention/gpqa.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"metadata-eligible for mock scaffold\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.answer_checking_autograder\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.hint_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"intervention/gpqa_encoded.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"metadata-eligible for mock scaffold\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.answer_checking_autograder\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.encoded_hint_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"intervention/memory_advice.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"explicitly skipped\",\n",
            "      \"deprecated\": true,\n",
            "      \"skip_reason\": \"Memory retrieval evals depend on tool/runtime-specific memory APIs and are intentionally excluded from the mock OSS scaffold.\",\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.memory_advice_answer_grader\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.memory_advice_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"intervention/scruples_first_person.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"metadata-eligible for mock scaffold\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.string_match_answer_grader\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.scruples_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"intervention/scruples_suggest_right.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"metadata-eligible for mock scaffold\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.string_match_answer_grader\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.scruples_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"intervention/scruples_suggest_wrong.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"metadata-eligible for mock scaffold\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.string_match_answer_grader\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.scruples_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"intervention/wmdp_sandbagging.jsonl\",\n",
            "      \"archetype\": \"intervention\",\n",
            "      \"status\": \"metadata-eligible for mock scaffold\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"shared_rules.intervention_answer_graders.answer_checking_autograder\",\n",
            "      \"z_rule\": \"shared_rules.intervention_monitors.sandbagging_monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"process/process_aime_math.jsonl\",\n",
            "      \"archetype\": \"process\",\n",
            "      \"status\": \"explicitly skipped\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": \"AIME problem text is not redistributed in OSS; rows expose `url` and `source` instead of `problem`.\",\n",
            "      \"y_rule\": \"shared_rules.process_labeling.answer_grader\",\n",
            "      \"z_rule\": \"shared_rules.process_labeling.monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"process/process_gpqa_physics.jsonl\",\n",
            "      \"archetype\": \"process\",\n",
            "      \"status\": \"metadata-eligible for mock scaffold\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"shared_rules.process_labeling.answer_grader\",\n",
            "      \"z_rule\": \"shared_rules.process_labeling.monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"outcome/flaky_tools_charxiv.jsonl\",\n",
            "      \"archetype\": \"outcome\",\n",
            "      \"status\": \"explicitly skipped\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": \"Flaky Tools evals depend on tool/runtime-specific tool availability and are intentionally excluded from the mock OSS scaffold.\",\n",
            "      \"y_rule\": \"shared_rules.flaky_tools_outcome.answer_judge\",\n",
            "      \"z_rule\": \"shared_rules.flaky_tools_outcome.monitor\"\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"outcome/livebench.md\",\n",
            "      \"archetype\": \"outcome\",\n",
            "      \"status\": \"description only\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"Outcome answer judging is dataset-specific (not included as JSONL in this repo).\",\n",
            "      \"z_rule\": {\n",
            "        \"valid_answers\": [\n",
            "          \"A\",\n",
            "          \"B\"\n",
            "        ],\n",
            "        \"z_positive_answers\": [\n",
            "          \"A\"\n",
            "        ]\n",
            "      }\n",
            "    },\n",
            "    {\n",
            "      \"dataset\": \"outcome/shadearena.md\",\n",
            "      \"archetype\": \"outcome\",\n",
            "      \"status\": \"description only\",\n",
            "      \"deprecated\": false,\n",
            "      \"skip_reason\": null,\n",
            "      \"y_rule\": \"Side-task success label from task evaluation/judge (positive subset filtering applied per Appendix C).\",\n",
            "      \"z_rule\": {\n",
            "        \"valid_answers\": [\n",
            "          \"A\",\n",
            "          \"B\",\n",
            "          \"C\",\n",
            "          \"D\"\n",
            "        ],\n",
            "        \"z_positive_answers\": [\n",
            "          \"C\"\n",
            "        ],\n",
            "        \"meaning_of_positive\": \"Harmful side-task materially pursued.\"\n",
            "      }\n",
            "    }\n",
            "  ],\n",
            "  \"entry_count\": 14,\n",
            "  \"status_counts\": {\n",
            "    \"explicitly skipped\": 4,\n",
            "    \"metadata-eligible for mock scaffold\": 8,\n",
            "    \"description only\": 2\n",
            "  },\n",
            "  \"archetype_counts\": {\n",
            "    \"intervention\": 9,\n",
            "    \"process\": 2,\n",
            "    \"outcome\": 3\n",
            "  },\n",
            "  \"resolved_rule_reference_occurrences\": 24,\n",
            "  \"unique_resolved_rule_references\": 12,\n",
            "  \"verified_prompt_reference_occurrences\": 26,\n",
            "  \"unique_verified_prompt_paths\": 15,\n",
            "  \"mock_constants\": {\n",
            "    \"MOCK_MODEL_P_CORRECT\": {\n",
            "      \"intervention_control\": 0.35,\n",
            "      \"intervention_treatment\": 0.75,\n",
            "      \"process\": 0.65\n",
            "    },\n",
            "    \"MOCK_MONITOR_SCOPE_QUALITY\": {\n",
            "      \"cot_only\": {\n",
            "        \"tpr\": 0.82,\n",
            "        \"tnr\": 0.78\n",
            "      },\n",
            "      \"answer_only\": {\n",
            "        \"tpr\": 0.6,\n",
            "        \"tnr\": 0.85\n",
            "      },\n",
            "      \"all_messages\": {\n",
            "        \"tpr\": 0.88,\n",
            "        \"tnr\": 0.88\n",
            "      }\n",
            "    }\n",
            "  },\n",
            "  \"scope_configuration_arithmetic\": [\n",
            "    {\n",
            "      \"scope\": \"cot_only\",\n",
            "      \"mock_tpr\": 0.82,\n",
            "      \"mock_tnr\": 0.78,\n",
            "      \"configured_product\": 0.6396,\n",
            "      \"configured_balanced_accuracy\": 0.8\n",
            "    },\n",
            "    {\n",
            "      \"scope\": \"answer_only\",\n",
            "      \"mock_tpr\": 0.6,\n",
            "      \"mock_tnr\": 0.85,\n",
            "      \"configured_product\": 0.51,\n",
            "      \"configured_balanced_accuracy\": 0.725\n",
            "    },\n",
            "    {\n",
            "      \"scope\": \"all_messages\",\n",
            "      \"mock_tpr\": 0.88,\n",
            "      \"mock_tnr\": 0.88,\n",
            "      \"configured_product\": 0.7744,\n",
            "      \"configured_balanced_accuracy\": 0.88\n",
            "    }\n",
            "  ],\n",
            "  \"dataset_archive_inspected\": false,\n",
            "  \"pair_integrity_verified\": false,\n",
            "  \"model_performance_measured\": false\n",
            "}\n"
          ]
        }
      ],
      "id": "cell-2"
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Regenerated figures\n",
        "\n",
        "The following rich SVG outputs come from files regenerated by the preceding code, not screenshots of an external result.\n"
      ],
      "id": "cell-3"
    },
    {
      "cell_type": "code",
      "metadata": {},
      "source": [
        "class LocalSVG:\n",
        "    def __init__(self, filename):\n",
        "        self.filename = filename\n",
        "    def _repr_mimebundle_(self, include=None, exclude=None):\n",
        "        return {'image/svg+xml': Path(self.filename).read_text(), 'text/plain': self.filename}\n"
      ],
      "execution_count": 2,
      "outputs": [],
      "id": "cell-4"
    },
    {
      "cell_type": "code",
      "metadata": {},
      "source": [
        "LocalSVG('mock-configuration.svg')\n"
      ],
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 920 515\" role=\"img\" aria-labelledby=\"t d\"><title id=\"t\">The visibility ordering is written into the mock</title><desc id=\"d\">Literal source-code probabilities. These are not measured monitor capabilities.</desc><rect width=\"100%\" height=\"100%\" fill=\"#faf9f5\"/><style>text{font-family:Arial,sans-serif;fill:#292d29;font-size:14px} .title{font-family:Georgia,serif;font-size:25px} .sub{fill:#646961;font-size:13px} .axis{stroke:#d6dbd3;stroke-width:1} .value{font-weight:600} </style><text class=\"title\" x=\"36\" y=\"41\">The visibility ordering is written into the mock</text><text class=\"sub\" x=\"36\" y=\"67\">Literal source-code probabilities. These are not measured monitor capabilities.</text><text x=\"36\" y=\"153\" class=\"\" text-anchor=\"start\">CoT only</text><rect x=\"230\" y=\"135\" width=\"442.79999999999995\" height=\"21\" fill=\"#3d5744\" rx=\"2\"/><text x=\"682.8\" y=\"151\" class=\"\" text-anchor=\"start\">0.82</text><rect x=\"230\" y=\"164\" width=\"421.2\" height=\"21\" fill=\"#b68c65\" rx=\"2\"/><text x=\"661.2\" y=\"180\" class=\"\" text-anchor=\"start\">0.78</text><text x=\"36\" y=\"248\" class=\"\" text-anchor=\"start\">Answer only</text><rect x=\"230\" y=\"230\" width=\"324.0\" height=\"21\" fill=\"#3d5744\" rx=\"2\"/><text x=\"564.0\" y=\"246\" class=\"\" text-anchor=\"start\">0.60</text><rect x=\"230\" y=\"259\" width=\"459.0\" height=\"21\" fill=\"#b68c65\" rx=\"2\"/><text x=\"699.0\" y=\"275\" class=\"\" text-anchor=\"start\">0.85</text><text x=\"36\" y=\"343\" class=\"\" text-anchor=\"start\">All messages</text><rect x=\"230\" y=\"325\" width=\"475.2\" height=\"21\" fill=\"#3d5744\" rx=\"2\"/><text x=\"715.2\" y=\"341\" class=\"\" text-anchor=\"start\">0.88</text><rect x=\"230\" y=\"354\" width=\"475.2\" height=\"21\" fill=\"#b68c65\" rx=\"2\"/><text x=\"715.2\" y=\"370\" class=\"\" text-anchor=\"start\">0.88</text><rect x=\"230\" y=\"455\" width=\"12\" height=\"12\" fill=\"#3d5744\" rx=\"2\"/><text x=\"252\" y=\"467\" class=\"\" text-anchor=\"start\">Configured TPR</text><rect x=\"500\" y=\"455\" width=\"12\" height=\"12\" fill=\"#b68c65\" rx=\"2\"/><text x=\"522\" y=\"467\" class=\"\" text-anchor=\"start\">Configured TNR</text></svg>",
            "text/plain": "mock-configuration.svg"
          },
          "metadata": {},
          "execution_count": 3
        }
      ],
      "id": "cell-5"
    },
    {
      "cell_type": "code",
      "metadata": {},
      "source": [
        "LocalSVG('release-matrix.svg')\n",
        "\n",
        "import base64\n",
        "from pathlib import Path\n",
        "print('__NOTEBOOK_IMAGE__svg+xml:' + base64.b64encode(Path('mock-configuration.svg').read_bytes()).decode())\n",
        "print('__NOTEBOOK_IMAGE__svg+xml:' + base64.b64encode(Path('release-matrix.svg').read_bytes()).decode())\n"
      ],
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 920 555\" role=\"img\" aria-labelledby=\"t d\"><title id=\"t\">Fourteen registry entries do not mean fourteen runnable evaluations</title><desc id=\"d\">Registry gates only: archive rows, tool adapters and actual models are separate requirements.</desc><rect width=\"100%\" height=\"100%\" fill=\"#faf9f5\"/><style>text{font-family:Arial,sans-serif;fill:#292d29;font-size:14px} .title{font-family:Georgia,serif;font-size:25px} .sub{fill:#646961;font-size:13px} .axis{stroke:#d6dbd3;stroke-width:1} .value{font-weight:600} </style><text class=\"title\" x=\"36\" y=\"41\">Fourteen registry entries do not mean fourteen runnable evaluations</text><text class=\"sub\" x=\"36\" y=\"67\">Registry gates only: archive rows, tool adapters and actual models are separate requirements.</text><text x=\"36\" y=\"164\" class=\"\" text-anchor=\"start\">Intervention</text><rect x=\"220\" y=\"140\" width=\"392\" height=\"38\" fill=\"#3d5744\" rx=\"2\"/><text x=\"416\" y=\"165\" class=\"\" text-anchor=\"middle\" style=\"fill:#fff\">7</text><rect x=\"612\" y=\"140\" width=\"112\" height=\"38\" fill=\"#b68c65\" rx=\"2\"/><text x=\"668\" y=\"165\" class=\"\" text-anchor=\"middle\" style=\"fill:#fff\">2</text><text x=\"36\" y=\"264\" class=\"\" text-anchor=\"start\">Process</text><rect x=\"220\" y=\"240\" width=\"56\" height=\"38\" fill=\"#3d5744\" rx=\"2\"/><text x=\"248\" y=\"265\" class=\"\" text-anchor=\"middle\" style=\"fill:#fff\">1</text><rect x=\"276\" y=\"240\" width=\"56\" height=\"38\" fill=\"#b68c65\" rx=\"2\"/><text x=\"304\" y=\"265\" class=\"\" text-anchor=\"middle\" style=\"fill:#fff\">1</text><text x=\"36\" y=\"364\" class=\"\" text-anchor=\"start\">Outcome</text><rect x=\"220\" y=\"340\" width=\"56\" height=\"38\" fill=\"#b68c65\" rx=\"2\"/><text x=\"248\" y=\"365\" class=\"\" text-anchor=\"middle\" style=\"fill:#fff\">1</text><rect x=\"276\" y=\"340\" width=\"112\" height=\"38\" fill=\"#c7c7bb\" rx=\"2\"/><text x=\"332\" y=\"365\" class=\"\" text-anchor=\"middle\" style=\"fill:#292d29\">2</text><rect x=\"36\" y=\"440\" width=\"12\" height=\"12\" fill=\"#3d5744\" rx=\"2\"/><text x=\"58\" y=\"451\" class=\"\" text-anchor=\"start\">Metadata-eligible for mock scaffold</text><rect x=\"36\" y=\"466\" width=\"12\" height=\"12\" fill=\"#b68c65\" rx=\"2\"/><text x=\"58\" y=\"477\" class=\"\" text-anchor=\"start\">Explicitly skipped</text><rect x=\"36\" y=\"492\" width=\"12\" height=\"12\" fill=\"#c7c7bb\" rx=\"2\"/><text x=\"58\" y=\"503\" class=\"\" text-anchor=\"start\">Description only</text></svg>",
            "text/plain": "release-matrix.svg"
          },
          "metadata": {},
          "execution_count": 4
        }
      ],
      "id": "cell-6"
    }
  ]
}
