{
  "schema": "agent-rerun-receipt.v1",
  "record": {
    "id": "20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5",
    "taskId": "retry-after-v1",
    "taskTitle": "Strict HTTP Retry-After parser (synthetic test input)",
    "agent": "aider",
    "requestedModel": "byok/google/models/gemini-2.5-flash",
    "resolvedModel": "byok/google/models/gemini-2.5-flash",
    "wallSeconds": 18.183,
    "inputTokens": 870,
    "outputTokens": 3408,
    "totalTokens": 4278,
    "costUsd": 0.008781,
    "energyWh": null,
    "assertionsPassed": 16,
    "assertionsTotal": 20,
    "observedNativeModel": null,
    "modelIdentityStatus": null,
    "modelIdentityEvidence": null,
    "providerResponseModel": null,
    "reasoningEffort": "default",
    "family": "matched-harness",
    "status": "FAIL",
    "tier": "cloud/BYOK",
    "diagnosticOnly": false,
    "comparisonEligible": true,
    "cohort": "historical-model",
    "resultNote": null,
    "limitations": [
      "Exploratory n=1 synthetic task; not a general coding-agent ranking.",
      "Exploratory arm E; JSON/DuckDB/Neon canonical admission NOT_VERIFIED."
    ],
    "evidenceFile": "20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5.json",
    "archived": true
  },
  "sourceRecord": {
    "id": "20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5",
    "originalCampaign": "agent_comparison_20261015",
    "rerun": true,
    "correctionOf": null,
    "cohort": "original-model",
    "family": "same-model-harness-rerun",
    "taskId": "retry-after-v1",
    "taskTitle": "Strict HTTP Retry-After parser (synthetic test input)",
    "agent": "aider",
    "requestedModel": "byok/google/models/gemini-2.5-flash",
    "resolvedModel": "byok/google/models/gemini-2.5-flash",
    "status": "FAIL",
    "wallSeconds": 18.183,
    "inputTokens": 870,
    "outputTokens": 3408,
    "totalTokens": 4278,
    "costUsd": 0.008781,
    "energyWh": null,
    "assertionsPassed": 16,
    "assertionsTotal": 20,
    "observedCodePass": false,
    "exitCode": 0,
    "evidencePaths": [
      "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5"
    ],
    "arm": "E",
    "admission": "NOT_VERIFIED",
    "limitations": [
      "Exploratory n=1 synthetic task; not a general coding-agent ranking.",
      "Exploratory arm E; JSON/DuckDB/Neon canonical admission NOT_VERIFIED."
    ],
    "freeze": {
      "task_sha256": "6c229fd3a8dda211432b4ff70838fa0cb73b325bc778da52ab0cdd280619a5fe",
      "oracle_sha256": "3675736119622cac168d711045426c6678bd08212b9bedf1aab71126a7ef1a76",
      "starter_sha256": "595a2a41e7bfd09ad28045cb3be95f0126d702eb25e6f53c723c0b77c46b44e2",
      "frozen_before_execution_at": 1792153738.2326632
    },
    "mutableRuntimeFiles": [
      "budget_ledger.json"
    ],
    "terminalBudgetSnapshot": "budget_ledger_at_terminal.json",
    "rawStatus": "FAIL",
    "metadataTransportDiagnosticCount": 0,
    "diagnosticOnly": false,
    "tokenSource": "provider",
    "accountingComplete": true,
    "identityVerified": true,
    "providerCallCount": 1,
    "partialInputTokens": 870,
    "partialOutputTokens": 3408,
    "partialTotalTokens": 4278,
    "partialEstimatedCostUsd": 0.008781,
    "reportedAdditiveReasoningTokens": null,
    "reportedReasoningTokens": 2890,
    "allCallsReportReasoning": true,
    "tokensPerSecond": 235.275,
    "knownTokensIncludingAdditiveReasoning": 4278,
    "knownTokensIncludingAdditiveReasoningPerSecond": 235.275,
    "generationCensored": false,
    "budgetControls": {
      "schema": "agent_comparison_rerun_policy.v1",
      "temperature": 0.0,
      "timeout_seconds": 240,
      "per_request_output_tokens": 8192,
      "proxy_shared_max_input_tokens": 160000,
      "proxy_shared_max_output_tokens": 32000,
      "proxy_reservation": "entire request UTF8 bytes +32/message+128; providerusage settled after eachcall; failclosed ifmissing",
      "maximum_input_tokens": 160000,
      "total_token_budget": 400000,
      "max_turns": 24,
      "proxy_read_timeout_seconds": 270,
      "verdict_stream_idle_timeout_seconds": 240,
      "aider_request_timeout_seconds": 240,
      "reasoning": {
        "mode": "default"
      },
      "models": "exact pins, no failover",
      "task_file": "solution.py",
      "hidden_oracle_fed_to_agent": false,
      "producer_location": "outside candidate workspace; candidate read denied",
      "aider_context": "live exact catalog context metadata; history ceiling=min(inputbudget,context/2)",
      "appendix_model_changed": false
    },
    "reasoningEffort": "default",
    "sharedProxyCapsEnforced": true,
    "actualBelowCommonCaps": true,
    "timeoutSeconds": 240,
    "terminalError": null,
    "terminalCompleted": true,
    "agentFailureReason": null,
    "sameGatewayInstance": true,
    "comparisonEligible": true,
    "publicEvidencePath": "artifacts/agent_comparison_completion_repair_20261016/matrix/public_evidence/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5.json",
    "publicEvidenceSha256": "95b3496bcb7bc156a1a5d249ad17e0710d782f007ddd39b01f80c9cce811d703"
  },
  "sourceFile": "artifacts/agent_comparison_completion_repair_20261016/matrix/reviewed-summary.json",
  "sourceFileSha256": "cfdb4bb21c1038588f0951f2cbe4774e077c01691d7e0e53434881d3b9a16419",
  "files": [
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/9c598e622b334621bdb4b68094b95ca7.http.json",
      "sha256": "1e59a50dc3d6db42e13fba247a3fe83c1a939e105d6bf1b3c8004d504062e05e",
      "bytes": 103
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/9c598e622b334621bdb4b68094b95ca7.request.json",
      "sha256": "623de6182ff1ea925eddd0455ac001a50ea49dcc3da356d09e37e732e399cf22",
      "bytes": 4509
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/9c598e622b334621bdb4b68094b95ca7.response.txt",
      "sha256": "2bd022fd8b3317b30928e266fe9cf0370f137011fe442ff18a6cefeda3867bd8",
      "bytes": 15808
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/9c598e622b334621bdb4b68094b95ca7.timing.json",
      "sha256": "35aa0bc10f550c0fdfc29d7dbb8892b0d6dfb16044927260d2855843296efd3d",
      "bytes": 307
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/budget_ledger.json",
      "sha256": "fe3ba069e83f0ea2ccdbeb0cd854ddfc232aba0693a50c5ba386612700579fe0",
      "bytes": 117
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/budget_ledger_at_terminal.json",
      "sha256": "fe3ba069e83f0ea2ccdbeb0cd854ddfc232aba0693a50c5ba386612700579fe0",
      "bytes": 117
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/freeze.json",
      "sha256": "1c185552c623a48ed726963f4051c7d45caabed6d4e0be1706bbd1ac518f3347",
      "bytes": 314,
      "content": "{\n  \"task_sha256\": \"6c229fd3a8dda211432b4ff70838fa0cb73b325bc778da52ab0cdd280619a5fe\",\n  \"oracle_sha256\": \"3675736119622cac168d711045426c6678bd08212b9bedf1aab71126a7ef1a76\",\n  \"starter_sha256\": \"595a2a41e7bfd09ad28045cb3be95f0126d702eb25e6f53c723c0b77c46b44e2\",\n  \"frozen_before_execution_at\": 1792153738.2326632\n}",
      "contentRedacted": false,
      "publishedContentSha256": "1c185552c623a48ed726963f4051c7d45caabed6d4e0be1706bbd1ac518f3347"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/health_after.json",
      "sha256": "c91f23593be19f9979078416aba6db6391e552f8d71b3dde77b3a107e6f9de7c",
      "bytes": 1326
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/health_before.json",
      "sha256": "dee9c2be845bf137b9daa96d0b020099a62780dff408370fb8e6b1e904bb943c",
      "bytes": 1326
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/invocation.json",
      "sha256": "9b67b749b3a5df0599e0efb1034986f25120fce3caa9170784d988c7ee3cf7cc",
      "bytes": 2071
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/launch.json",
      "sha256": "2cf13691a1ebfe3b1dca7981106ada29ab3af0c54eb14d2c6cd2694d7eeb8e03",
      "bytes": 183
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/model_preflight.json",
      "sha256": "66ca2dc0e3682acd1bdc6516c027781b4e4beea0023296667fe0a1c242983005",
      "bytes": 2274
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/oracle.stderr.txt",
      "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "bytes": 0,
      "content": "",
      "contentRedacted": false,
      "publishedContentSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/oracle.stdout.txt",
      "sha256": "a74c160266f3022da7be962edd43939c083261346fca7a18ca12386897dc1d04",
      "bytes": 1576,
      "content": "{\"passed\": 16, \"total\": 20, \"cases\": [{\"input\": \"0\", \"expected\": 0, \"actual\": 0, \"pass\": true}, {\"input\": \" 120\\t\", \"expected\": 120, \"actual\": 120, \"pass\": true}, {\"input\": \"0007\", \"expected\": 7, \"actual\": 7, \"pass\": true}, {\"input\": \"-1\", \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": \"+1\", \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": \"1.5\", \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": \"\\uff11\\uff12\", \"expected\": null, \"actual\": 12, \"pass\": false}, {\"input\": \"\\u0661\\u0662\", \"expected\": null, \"actual\": 12, \"pass\": false}, {\"input\": \"\", \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": null, \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": 4, \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": \"Wed, 21 Oct 2015 07:28:00 GMT\", \"expected\": 1, \"actual\": 1, \"pass\": true}, {\"input\": \"Wed, 21 Oct 2015 07:28:01 GMT\", \"expected\": 2, \"actual\": 2, \"pass\": true}, {\"input\": \"Wed, 21 Oct 2015 07:27:00 GMT\", \"expected\": 0, \"actual\": 0, \"pass\": true}, {\"input\": \"Tue, 21 Oct 2015 07:28:00 GMT\", \"expected\": null, \"actual\": 1, \"pass\": false}, {\"input\": \"Wed, 21 Oct 2015 07:28:00 UTC\", \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": \"wed, 21 Oct 2015 07:28:00 GMT\", \"expected\": null, \"actual\": 1, \"pass\": false}, {\"input\": \"Wed, 31 Feb 2015 07:28:00 GMT\", \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": \"Wed, 21 Oct 2015 07:28:00 GMT trailing\", \"expected\": null, \"actual\": null, \"pass\": true}, {\"input\": \"Wed, 21 Oct 2015 07:28:00 +0000\", \"expected\": null, \"actual\": null, \"pass\": true}]}\n",
      "contentRedacted": false,
      "publishedContentSha256": "a74c160266f3022da7be962edd43939c083261346fca7a18ca12386897dc1d04"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/policy.json",
      "sha256": "79464c36a3d2f7094195db502cd93bdd8f67ba27004c9c9e234b314828ed23d2",
      "bytes": 923,
      "content": "{\n  \"schema\": \"agent_comparison_rerun_policy.v1\",\n  \"temperature\": 0.0,\n  \"timeout_seconds\": 240,\n  \"per_request_output_tokens\": 8192,\n  \"proxy_shared_max_input_tokens\": 160000,\n  \"proxy_shared_max_output_tokens\": 32000,\n  \"proxy_reservation\": \"entire request UTF8 bytes +32/message+128; providerusage settled after eachcall; failclosed ifmissing\",\n  \"maximum_input_tokens\": 160000,\n  \"total_token_budget\": 400000,\n  \"max_turns\": 24,\n  \"proxy_read_timeout_seconds\": 270,\n  \"verdict_stream_idle_timeout_seconds\": 240,\n  \"aider_request_timeout_seconds\": 240,\n  \"reasoning\": {\n    \"mode\": \"default\"\n  },\n  \"models\": \"exact pins, no failover\",\n  \"task_file\": \"solution.py\",\n  \"hidden_oracle_fed_to_agent\": false,\n  \"producer_location\": \"outside candidate workspace; candidate read denied\",\n  \"aider_context\": \"live exact catalog context metadata; history ceiling=min(inputbudget,context/2)\",\n  \"appendix_model_changed\": false\n}",
      "contentRedacted": false,
      "publishedContentSha256": "79464c36a3d2f7094195db502cd93bdd8f67ba27004c9c9e234b314828ed23d2"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/product_source.json",
      "sha256": "975f3a00f185e9b85bc682c1cd4328ef3095d688906de32290374354438c2ef7",
      "bytes": 660,
      "content": "{\n  \"head\": \"29c79e665a08eac9d03bda26de1e0f8eddccccb9\",\n  \"files\": {\n    \"scripts/benchmarks/agent_comparison_rerun_20261016.py\": \"c625b691551051e1f0a3d8dea1fbb3ea6db797578005f86122099572c7acb0b0\",\n    \"tools/verdict-code/verdict_code/agent.py\": \"d69203aaa46e6b60f35dd5ca3b99d1e1566abb7f0ba604430469530434af7b28\",\n    \"tools/verdict-code/verdict_code/tools/__init__.py\": \"609350f15bbdec4099405afe9ddddddf7b2caa7d2d03cc53e0276d6ab8d3bd57\",\n    \"tools/verdict-code/verdict_code/main.py\": \"a85ce7b0392f06dccf14062386096285766aa7ecd8c9d8203aca63fe2f9a9c37\",\n    \"tools/verdict-code/VERSION\": \"178a491d1c5069072fa1764932d4babf4df7a814c007eb0994d49d70be18d08c\"\n  }\n}",
      "contentRedacted": false,
      "publishedContentSha256": "975f3a00f185e9b85bc682c1cd4328ef3095d688906de32290374354438c2ef7"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/prompt.txt",
      "sha256": "6c229fd3a8dda211432b4ff70838fa0cb73b325bc778da52ab0cdd280619a5fe",
      "bytes": 837,
      "content": "Synthetic benchmark task: Retry-After parsing. Implement `retry_after(value, now)` in solution.py using only Python standard library. now is an aware UTC datetime. Return a nonnegative integer number of seconds or None for invalid input. Strings containing only ASCII decimal digits after surrounding whitespace return that integer. Otherwise accept an RFC HTTP-date of form `Wed, 21 Oct 2015 07:28:00 GMT`, case sensitive, validated weekday must agree with date. For a valid HTTP date return max(0, ceil((date-now).total_seconds())). Reject non-string inputs, signs, fractions, non-ASCII digits, extra text, and non-GMT timezone names. Do not change any other source file. Hidden tests are unavailable. Write the implementation to disk and finish. Do not install dependencies, access network, use other models, or edit unrelated paths.\n",
      "contentRedacted": false,
      "publishedContentSha256": "6c229fd3a8dda211432b4ff70838fa0cb73b325bc778da52ab0cdd280619a5fe"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/result.json",
      "sha256": "a7fbc2fa346eab5ce4ce371bf382dd5d05015d7bec88952e32017e5718474f09",
      "bytes": 3959
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/sandbox.sb",
      "sha256": "e370082246dd0d7f9ec230185abd2593e4358b0b78546fb47f9d49406dcf9ed9",
      "bytes": 5919
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/sandbox_preflight.json",
      "sha256": "8415d156075475eba2b82a04636f833e85484020de5e6424f6140cd0ac61390f",
      "bytes": 93
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/stderr.txt",
      "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "bytes": 0
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/stdout.txt",
      "sha256": "cbb81b79e206739a8cde3583914f758b9f07c290271bb79d3421ac506b63a0a3",
      "bytes": 2301
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/workspace/aider_model_metadata.json",
      "sha256": "638ee90c58bc3528da75c51eeed6a723ef386393ac26e62f5f19c28dd4a6d77d",
      "bytes": 201
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/workspace/aider_settings.yml",
      "sha256": "481122b6b8bfaa8a620a0a2a0a09bf03a0e47b95e2b04434b16426bf8f29ddb7",
      "bytes": 195
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/workspace/chat_history.md",
      "sha256": "230e5294a6fee5136630dab029427d215aecc65ae6e73d93628fc1fa93984661",
      "bytes": 4435
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/workspace/solution.py",
      "sha256": "1d575f3f84bd03f256aa53742e3d59045d6fa9e2186e0e6139f234ad1f116970",
      "bytes": 1954,
      "content": "import datetime\nimport math\n\ndef retry_after(value, now):\n    \"\"\"Parse an HTTP Retry-After header according to the task contract.\n\n    Args:\n        value: The string value of the Retry-After header.\n        now: An aware UTC datetime object representing the current time.\n\n    Returns:\n        A nonnegative integer number of seconds, or None for invalid input.\n    \"\"\"\n    if not isinstance(value, str):\n        return None\n\n    # Attempt to parse as an integer number of seconds\n    stripped_value = value.strip()\n    if stripped_value.isdigit():\n        seconds = int(stripped_value)\n        # The task requires a \"nonnegative integer\".\n        if seconds < 0:\n            return None\n        return seconds\n\n    # Attempt to parse as an HTTP-date string\n    # Format: \"Wed, 21 Oct 2015 07:28:00 GMT\"\n    # The format string includes \"%a\" for weekday validation and \"GMT\" for timezone.\n    # strptime will raise ValueError if the weekday doesn't match the date,\n    # or if the timezone is not exactly \"GMT\".\n    http_date_format = \"%a, %d %b %Y %H:%M:%S GMT\"\n    try:\n        # Parse the date string into a naive datetime object\n        dt_obj = datetime.datetime.strptime(value, http_date_format)\n\n        # The 'now' parameter is an aware UTC datetime.\n        # The datetime object parsed from strptime is naive.\n        # We must make it aware and set its timezone to UTC for correct comparison.\n        dt_obj = dt_obj.replace(tzinfo=datetime.timezone.utc)\n\n        # Calculate the time difference\n        time_difference = dt_obj - now\n        total_seconds = time_difference.total_seconds()\n\n        # Return max(0, ceil((date-now).total_seconds()))\n        # math.ceil returns a float, so cast to int as the return type is integer.\n        result_seconds = math.ceil(total_seconds)\n        return max(0, int(result_seconds))\n\n    except ValueError:\n        # If strptime fails, the value is not a valid HTTP-date string\n        return None\n\n",
      "contentRedacted": false,
      "publishedContentSha256": "1d575f3f84bd03f256aa53742e3d59045d6fa9e2186e0e6139f234ad1f116970"
    }
  ],
  "disclosure": "Synthetic inputs and observed execution. Original-byte hashes retained; selected source and oracle outputs reproduced. Private provider transcripts remain local.",
  "reviewedEvidence": {
    "provenance": "Synthetic test input; actual installed CLI execution; reviewed public-safe evidence fixture.",
    "runId": "20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5",
    "task": "Synthetic benchmark task: Retry-After parsing. Implement `retry_after(value, now)` in solution.py using only Python standard library. now is an aware UTC datetime. Return a nonnegative integer number of seconds or None for invalid input. Strings containing only ASCII decimal digits after surrounding whitespace return that integer. Otherwise accept an RFC HTTP-date of form `Wed, 21 Oct 2015 07:28:00 GMT`, case sensitive, validated weekday must agree with date. For a valid HTTP date return max(0, ceil((date-now).total_seconds())). Reject non-string inputs, signs, fractions, non-ASCII digits, extra text, and non-GMT timezone names. Do not change any other source file. Hidden tests are unavailable. Write the implementation to disk and finish. Do not install dependencies, access network, use other models, or edit unrelated paths.\n",
    "freeze": {
      "task_sha256": "6c229fd3a8dda211432b4ff70838fa0cb73b325bc778da52ab0cdd280619a5fe",
      "oracle_sha256": "3675736119622cac168d711045426c6678bd08212b9bedf1aab71126a7ef1a76",
      "starter_sha256": "595a2a41e7bfd09ad28045cb3be95f0126d702eb25e6f53c723c0b77c46b44e2",
      "frozen_before_execution_at": 1792153738.2326632
    },
    "candidateCode": "import datetime\nimport math\n\ndef retry_after(value, now):\n    \"\"\"Parse an HTTP Retry-After header according to the task contract.\n\n    Args:\n        value: The string value of the Retry-After header.\n        now: An aware UTC datetime object representing the current time.\n\n    Returns:\n        A nonnegative integer number of seconds, or None for invalid input.\n    \"\"\"\n    if not isinstance(value, str):\n        return None\n\n    # Attempt to parse as an integer number of seconds\n    stripped_value = value.strip()\n    if stripped_value.isdigit():\n        seconds = int(stripped_value)\n        # The task requires a \"nonnegative integer\".\n        if seconds < 0:\n            return None\n        return seconds\n\n    # Attempt to parse as an HTTP-date string\n    # Format: \"Wed, 21 Oct 2015 07:28:00 GMT\"\n    # The format string includes \"%a\" for weekday validation and \"GMT\" for timezone.\n    # strptime will raise ValueError if the weekday doesn't match the date,\n    # or if the timezone is not exactly \"GMT\".\n    http_date_format = \"%a, %d %b %Y %H:%M:%S GMT\"\n    try:\n        # Parse the date string into a naive datetime object\n        dt_obj = datetime.datetime.strptime(value, http_date_format)\n\n        # The 'now' parameter is an aware UTC datetime.\n        # The datetime object parsed from strptime is naive.\n        # We must make it aware and set its timezone to UTC for correct comparison.\n        dt_obj = dt_obj.replace(tzinfo=datetime.timezone.utc)\n\n        # Calculate the time difference\n        time_difference = dt_obj - now\n        total_seconds = time_difference.total_seconds()\n\n        # Return max(0, ceil((date-now).total_seconds()))\n        # math.ceil returns a float, so cast to int as the return type is integer.\n        result_seconds = math.ceil(total_seconds)\n        return max(0, int(result_seconds))\n\n    except ValueError:\n        # If strptime fails, the value is not a valid HTTP-date string\n        return None\n\n",
    "oracle": {
      "passed": 16,
      "total": 20,
      "cases": [
        {
          "input": "0",
          "expected": 0,
          "actual": 0,
          "pass": true
        },
        {
          "input": " 120\t",
          "expected": 120,
          "actual": 120,
          "pass": true
        },
        {
          "input": "0007",
          "expected": 7,
          "actual": 7,
          "pass": true
        },
        {
          "input": "-1",
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": "+1",
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": "1.5",
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": "１２",
          "expected": null,
          "actual": 12,
          "pass": false
        },
        {
          "input": "١٢",
          "expected": null,
          "actual": 12,
          "pass": false
        },
        {
          "input": "",
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": null,
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": 4,
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": "Wed, 21 Oct 2015 07:28:00 GMT",
          "expected": 1,
          "actual": 1,
          "pass": true
        },
        {
          "input": "Wed, 21 Oct 2015 07:28:01 GMT",
          "expected": 2,
          "actual": 2,
          "pass": true
        },
        {
          "input": "Wed, 21 Oct 2015 07:27:00 GMT",
          "expected": 0,
          "actual": 0,
          "pass": true
        },
        {
          "input": "Tue, 21 Oct 2015 07:28:00 GMT",
          "expected": null,
          "actual": 1,
          "pass": false
        },
        {
          "input": "Wed, 21 Oct 2015 07:28:00 UTC",
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": "wed, 21 Oct 2015 07:28:00 GMT",
          "expected": null,
          "actual": 1,
          "pass": false
        },
        {
          "input": "Wed, 31 Feb 2015 07:28:00 GMT",
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": "Wed, 21 Oct 2015 07:28:00 GMT trailing",
          "expected": null,
          "actual": null,
          "pass": true
        },
        {
          "input": "Wed, 21 Oct 2015 07:28:00 +0000",
          "expected": null,
          "actual": null,
          "pass": true
        }
      ]
    },
    "providerCalls": [
      {
        "requestEvidence": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5/9c598e622b334621bdb4b68094b95ca7.request.json",
        "requestSha256": "623de6182ff1ea925eddd0455ac001a50ea49dcc3da356d09e37e732e399cf22",
        "responseSha256": "2bd022fd8b3317b30928e266fe9cf0370f137011fe442ff18a6cefeda3867bd8",
        "httpStatus": 200,
        "requestedModel": "byok/google/models/gemini-2.5-flash",
        "resolvedModel": "byok/google/models/gemini-2.5-flash",
        "backendModel": "google/models/gemini-2.5-flash",
        "resolutionSource": "explicit_byok_route",
        "generationControls": {
          "max_tokens": 8192,
          "temperature": 0.0,
          "reasoning_choice": {
            "mode": "default"
          },
          "auto_failover": false,
          "stream": true
        },
        "inputTokens": 870,
        "outputTokens": 3408,
        "totalTokens": 4278,
        "costUsd": 0.008781,
        "energyWh": null,
        "finishReasons": [
          "stop"
        ],
        "additiveReasoningTokens": null,
        "nestedReasoningTokens": 2890
      }
    ],
    "gatewayBefore": {
      "status": "healthy",
      "service": "local_gateway",
      "mode": "full",
      "port": 6120,
      "timestamp": "2026-10-16T12:28:58.267362+00:00",
      "uptime_seconds": 4978.737965106964,
      "server_start_time": 1792148759.529398,
      "git_sha": "8fd6e78eed8972be1b897c1665177b04e989b0f5",
      "build_time": "2026-10-16T07:05:23-04:00",
      "version": "8fd6e78eed8972be1b897c1665177b04e989b0f5",
      "interop_min": 1,
      "interop_max": 1,
      "dependencies": {
        "event_stream": "http://localhost:6102"
      },
      "lightrag": {
        "enabled": true,
        "status": "online",
        "files_indexed": 8020,
        "url": "http://127.0.0.1:6150"
      },
      "cloud_relay": {
        "connected": true,
        "authenticated": true
      },
      "context_status": {
        "summary": "ok",
        "target_context": 65536,
        "providers": [
          {
            "provider": "ollama",
            "status": "ok",
            "actual_context": 131072,
            "target_context": 65536,
            "model": "deepseek-r1:7b"
          },
          {
            "provider": "lmstudio",
            "status": "ok",
            "actual_context": 262144,
            "target_context": 65536,
            "model": "verdict-4-35b-toolterse-v5-mlx"
          },
          {
            "provider": "llamacpp",
            "status": "context_unknown",
            "actual_context": null,
            "target_context": 65536,
            "model": null
          }
        ]
      }
    },
    "gatewayAfter": {
      "status": "healthy",
      "service": "local_gateway",
      "mode": "full",
      "port": 6120,
      "timestamp": "2026-10-16T12:29:16.602665+00:00",
      "uptime_seconds": 4997.073270082474,
      "server_start_time": 1792148759.529398,
      "git_sha": "8fd6e78eed8972be1b897c1665177b04e989b0f5",
      "build_time": "2026-10-16T07:05:23-04:00",
      "version": "8fd6e78eed8972be1b897c1665177b04e989b0f5",
      "interop_min": 1,
      "interop_max": 1,
      "dependencies": {
        "event_stream": "http://localhost:6102"
      },
      "lightrag": {
        "enabled": true,
        "status": "online",
        "files_indexed": 8020,
        "url": "http://127.0.0.1:6150"
      },
      "cloud_relay": {
        "connected": true,
        "authenticated": true
      },
      "context_status": {
        "summary": "ok",
        "target_context": 65536,
        "providers": [
          {
            "provider": "ollama",
            "status": "ok",
            "actual_context": 131072,
            "target_context": 65536,
            "model": "deepseek-r1:7b"
          },
          {
            "provider": "lmstudio",
            "status": "ok",
            "actual_context": 262144,
            "target_context": 65536,
            "model": "verdict-4-35b-toolterse-v5-mlx"
          },
          {
            "provider": "llamacpp",
            "status": "context_unknown",
            "actual_context": null,
            "target_context": 65536,
            "model": null
          }
        ]
      }
    },
    "rawArtifacts": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122858Z_aider_byok_google_models_gemini-2.5-flash_5a87e5",
    "rawResultSha256": "a7fbc2fa346eab5ce4ce371bf382dd5d05015d7bec88952e32017e5718474f09",
    "rawEvidenceHashes": {
      "health_before.json": "dee9c2be845bf137b9daa96d0b020099a62780dff408370fb8e6b1e904bb943c",
      "stdout.txt": "cbb81b79e206739a8cde3583914f758b9f07c290271bb79d3421ac506b63a0a3",
      "policy.json": "79464c36a3d2f7094195db502cd93bdd8f67ba27004c9c9e234b314828ed23d2",
      "9c598e622b334621bdb4b68094b95ca7.timing.json": "35aa0bc10f550c0fdfc29d7dbb8892b0d6dfb16044927260d2855843296efd3d",
      "9c598e622b334621bdb4b68094b95ca7.http.json": "1e59a50dc3d6db42e13fba247a3fe83c1a939e105d6bf1b3c8004d504062e05e",
      "health_after.json": "c91f23593be19f9979078416aba6db6391e552f8d71b3dde77b3a107e6f9de7c",
      "model_preflight.json": "66ca2dc0e3682acd1bdc6516c027781b4e4beea0023296667fe0a1c242983005",
      "sandbox_preflight.json": "8415d156075475eba2b82a04636f833e85484020de5e6424f6140cd0ac61390f",
      "9c598e622b334621bdb4b68094b95ca7.request.json": "623de6182ff1ea925eddd0455ac001a50ea49dcc3da356d09e37e732e399cf22",
      "budget_ledger_at_terminal.json": "fe3ba069e83f0ea2ccdbeb0cd854ddfc232aba0693a50c5ba386612700579fe0",
      "9c598e622b334621bdb4b68094b95ca7.response.txt": "2bd022fd8b3317b30928e266fe9cf0370f137011fe442ff18a6cefeda3867bd8",
      "prompt.txt": "6c229fd3a8dda211432b4ff70838fa0cb73b325bc778da52ab0cdd280619a5fe",
      "oracle.stdout.txt": "a74c160266f3022da7be962edd43939c083261346fca7a18ca12386897dc1d04",
      "sandbox.sb": "e370082246dd0d7f9ec230185abd2593e4358b0b78546fb47f9d49406dcf9ed9",
      "stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "launch.json": "2cf13691a1ebfe3b1dca7981106ada29ab3af0c54eb14d2c6cd2694d7eeb8e03",
      "invocation.json": "9b67b749b3a5df0599e0efb1034986f25120fce3caa9170784d988c7ee3cf7cc",
      "oracle.stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "freeze.json": "1c185552c623a48ed726963f4051c7d45caabed6d4e0be1706bbd1ac518f3347",
      "product_source.json": "975f3a00f185e9b85bc682c1cd4328ef3095d688906de32290374354438c2ef7",
      "workspace/aider_model_metadata.json": "638ee90c58bc3528da75c51eeed6a723ef386393ac26e62f5f19c28dd4a6d77d",
      "workspace/solution.py": "1d575f3f84bd03f256aa53742e3d59045d6fa9e2186e0e6139f234ad1f116970",
      "workspace/chat_history.md": "230e5294a6fee5136630dab029427d215aecc65ae6e73d93628fc1fa93984661",
      "workspace/aider_settings.yml": "481122b6b8bfaa8a620a0a2a0a09bf03a0e47b95e2b04434b16426bf8f29ddb7"
    },
    "productSource": {
      "head": "29c79e665a08eac9d03bda26de1e0f8eddccccb9",
      "files": {
        "scripts/benchmarks/agent_comparison_rerun_20261016.py": "c625b691551051e1f0a3d8dea1fbb3ea6db797578005f86122099572c7acb0b0",
        "tools/verdict-code/verdict_code/agent.py": "d69203aaa46e6b60f35dd5ca3b99d1e1566abb7f0ba604430469530434af7b28",
        "tools/verdict-code/verdict_code/tools/__init__.py": "609350f15bbdec4099405afe9ddddddf7b2caa7d2d03cc53e0276d6ab8d3bd57",
        "tools/verdict-code/verdict_code/main.py": "a85ce7b0392f06dccf14062386096285766aa7ecd8c9d8203aca63fe2f9a9c37",
        "tools/verdict-code/VERSION": "178a491d1c5069072fa1764932d4babf4df7a814c007eb0994d49d70be18d08c"
      }
    },
    "protocol": {
      "schema": "agent_comparison_rerun_policy.v1",
      "temperature": 0.0,
      "timeout_seconds": 240,
      "per_request_output_tokens": 8192,
      "proxy_shared_max_input_tokens": 160000,
      "proxy_shared_max_output_tokens": 32000,
      "proxy_reservation": "entire request UTF8 bytes +32/message+128; providerusage settled after eachcall; failclosed ifmissing",
      "maximum_input_tokens": 160000,
      "total_token_budget": 400000,
      "max_turns": 24,
      "proxy_read_timeout_seconds": 270,
      "verdict_stream_idle_timeout_seconds": 240,
      "aider_request_timeout_seconds": 240,
      "reasoning": {
        "mode": "default"
      },
      "models": "exact pins, no failover",
      "task_file": "solution.py",
      "hidden_oracle_fed_to_agent": false,
      "producer_location": "outside candidate workspace; candidate read denied",
      "aider_context": "live exact catalog context metadata; history ceiling=min(inputbudget,context/2)",
      "appendix_model_changed": false
    }
  }
}
