{
  "schema": "agent-rerun-receipt.v1",
  "record": {
    "id": "20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098",
    "taskId": "retry-after-v1",
    "taskTitle": "Strict HTTP Retry-After parser (synthetic test input)",
    "agent": "aider",
    "requestedModel": "byok/openai/gpt-4.1-mini",
    "resolvedModel": "byok/openai/gpt-4.1-mini",
    "wallSeconds": 10.293,
    "inputTokens": 831,
    "outputTokens": 583,
    "totalTokens": 1414,
    "costUsd": 0.001265,
    "energyWh": null,
    "assertionsPassed": 18,
    "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": "20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098.json",
    "archived": true
  },
  "sourceRecord": {
    "id": "20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098",
    "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/openai/gpt-4.1-mini",
    "resolvedModel": "byok/openai/gpt-4.1-mini",
    "status": "FAIL",
    "wallSeconds": 10.293,
    "inputTokens": 831,
    "outputTokens": 583,
    "totalTokens": 1414,
    "costUsd": 0.001265,
    "energyWh": null,
    "assertionsPassed": 18,
    "assertionsTotal": 20,
    "observedCodePass": false,
    "exitCode": 0,
    "evidencePaths": [
      "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098"
    ],
    "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": 1792153638.854938
    },
    "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": 831,
    "partialOutputTokens": 583,
    "partialTotalTokens": 1414,
    "partialEstimatedCostUsd": 0.001265,
    "reportedAdditiveReasoningTokens": null,
    "reportedReasoningTokens": null,
    "allCallsReportReasoning": false,
    "tokensPerSecond": 137.375,
    "knownTokensIncludingAdditiveReasoning": 1414,
    "knownTokensIncludingAdditiveReasoningPerSecond": 137.375,
    "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/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098.json",
    "publicEvidenceSha256": "e7ae6cd22d8e9aa91e74dc73c425210b0464ef11ff6c1c04b337a8a2f2fc6fa6"
  },
  "sourceFile": "artifacts/agent_comparison_completion_repair_20261016/matrix/reviewed-summary.json",
  "sourceFileSha256": "cfdb4bb21c1038588f0951f2cbe4774e077c01691d7e0e53434881d3b9a16419",
  "files": [
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/a88e3aadcf8b46b6becd87509763973b.http.json",
      "sha256": "1e59a50dc3d6db42e13fba247a3fe83c1a939e105d6bf1b3c8004d504062e05e",
      "bytes": 103
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/a88e3aadcf8b46b6becd87509763973b.request.json",
      "sha256": "f160ff0180d91e8631b07784b7b9d1dce5696f4324ec341b87bcc22af21f54a7",
      "bytes": 4498
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/a88e3aadcf8b46b6becd87509763973b.response.txt",
      "sha256": "405b660afd62e7578233795cbc8253c7af5f08dd2d3c35d64f30bd9f6eb35db4",
      "bytes": 135637
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/a88e3aadcf8b46b6becd87509763973b.timing.json",
      "sha256": "91fc89597af29eb6912d1d506923bc3cff4751d8efa222f449017ccda2ff0000",
      "bytes": 307
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/budget_ledger.json",
      "sha256": "0887daf0cc55f4b45d1a48d22d7ad35d4c77658f5c3606184f221c74ba841355",
      "bytes": 116
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/budget_ledger_at_terminal.json",
      "sha256": "0887daf0cc55f4b45d1a48d22d7ad35d4c77658f5c3606184f221c74ba841355",
      "bytes": 116
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/freeze.json",
      "sha256": "6718f8188c3f7bdfab621280befa2e148edd8a58293ea6adb48ce7dfb373759b",
      "bytes": 313,
      "content": "{\n  \"task_sha256\": \"6c229fd3a8dda211432b4ff70838fa0cb73b325bc778da52ab0cdd280619a5fe\",\n  \"oracle_sha256\": \"3675736119622cac168d711045426c6678bd08212b9bedf1aab71126a7ef1a76\",\n  \"starter_sha256\": \"595a2a41e7bfd09ad28045cb3be95f0126d702eb25e6f53c723c0b77c46b44e2\",\n  \"frozen_before_execution_at\": 1792153638.854938\n}",
      "contentRedacted": false,
      "publishedContentSha256": "6718f8188c3f7bdfab621280befa2e148edd8a58293ea6adb48ce7dfb373759b"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/health_after.json",
      "sha256": "5e68fa7258a289efff12f943b5b13c65d800c588e2eb3147be43e1f1bb5620dc",
      "bytes": 1326
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/health_before.json",
      "sha256": "801615f6f9b67e8852a09b85dd13552f74ae4824cacbf6d92f17d78cd527e9c2",
      "bytes": 1327
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/invocation.json",
      "sha256": "eda42f18abd16740b7ea0cd1e0fb97c3a43fa792362a06973c9c4d6ce4894c30",
      "bytes": 2005
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/launch.json",
      "sha256": "3508c9c34cd3f77404f09e1a51477ff1fcda73f4d73a50e6941fa7f22aefb8e5",
      "bytes": 172
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/model_preflight.json",
      "sha256": "6c920ca70482b1e8baddaf165a7a9a4a372d9c35901dcdc0c7355e3c84d0c489",
      "bytes": 2290
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/oracle.stderr.txt",
      "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "bytes": 0,
      "content": "",
      "contentRedacted": false,
      "publishedContentSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/oracle.stdout.txt",
      "sha256": "3e7b0982f217a41f229865a072cdee2a778735cbabe56238a3f0d4e91cab0746",
      "bytes": 1580,
      "content": "{\"passed\": 18, \"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\": null, \"pass\": true}, {\"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\": null, \"pass\": true}, {\"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": "3e7b0982f217a41f229865a072cdee2a778735cbabe56238a3f0d4e91cab0746"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/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/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/product_source.json",
      "sha256": "800394eb850384c5f7feb92bc1d1dc134e77175db563ab3ffa14bd80fab1c9a7",
      "bytes": 660,
      "content": "{\n  \"head\": \"fbc605ea70ed64408c1f1beef11f7cfcd2620117\",\n  \"files\": {\n    \"scripts/benchmarks/agent_comparison_rerun_20261016.py\": \"c625b691551051e1f0a3d8dea1fbb3ea6db797578005f86122099572c7acb0b0\",\n    \"tools/verdict-code/verdict_code/agent.py\": \"62e8e590d90d768f6d2c728a757727b77bfbb596776b17c8756a182a1238ccd3\",\n    \"tools/verdict-code/verdict_code/tools/__init__.py\": \"609350f15bbdec4099405afe9ddddddf7b2caa7d2d03cc53e0276d6ab8d3bd57\",\n    \"tools/verdict-code/verdict_code/main.py\": \"16e15abf490c9d9385ee968217ae579a41ee755e03d21d486647b09753e5a740\",\n    \"tools/verdict-code/VERSION\": \"71573f2b38da780fb8f08530fb1f65e7285e362953dc2aec19f1c59e92e6f442\"\n  }\n}",
      "contentRedacted": false,
      "publishedContentSha256": "800394eb850384c5f7feb92bc1d1dc134e77175db563ab3ffa14bd80fab1c9a7"
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/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/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/result.json",
      "sha256": "4f9da133fc35ea77759043635b01116fb1c550403e7613357e90415b6cdb0910",
      "bytes": 3925
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/sandbox.sb",
      "sha256": "2e4047e8533191449f176fc5bb58ac81a27b4f61d04a53157dba8be01aa3d602",
      "bytes": 5710
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/sandbox_preflight.json",
      "sha256": "8415d156075475eba2b82a04636f833e85484020de5e6424f6140cd0ac61390f",
      "bytes": 93
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/stderr.txt",
      "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "bytes": 0
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/stdout.txt",
      "sha256": "e17d7562974625f8d6f6fc73dc1fcf2598624d8506a557da472477aff3520931",
      "bytes": 2524
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/workspace/aider_model_metadata.json",
      "sha256": "a19d46136d1a210cc430d71de4b8f5958ec7cd881858c84c1edd6f7840f5873d",
      "bytes": 190
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/workspace/aider_settings.yml",
      "sha256": "97d92dcfd00e8a91d413f05958f20f710f069e1da2c15ca12ec8a466bda94098",
      "bytes": 184
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/workspace/chat_history.md",
      "sha256": "32663d0b9689e87b0ab5b41867fa418d363763c907a289011c617195979495ab",
      "bytes": 4614
    },
    {
      "path": "artifacts/agent_comparison_completion_repair_20261016/matrix/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/workspace/solution.py",
      "sha256": "8654afafd3324570af7d15a256663579ab83ba860f90aa7d35579fc18903d5b8",
      "bytes": 2194,
      "content": "from datetime import datetime, timezone, timedelta\nimport math\n\ndef retry_after(value, now):\n    \"\"\"Parse an HTTP Retry-After header according to the task contract.\"\"\"\n    if not isinstance(value, str):\n        return None\n    s = value.strip()\n    if not s:\n        return None\n\n    # Check if s is only ASCII decimal digits (no signs, no fractions)\n    if s.isdigit():\n        # Convert to int and return\n        try:\n            seconds = int(s)\n            if seconds < 0:\n                return None\n            return seconds\n        except Exception:\n            return None\n\n    # Otherwise, parse as HTTP-date of form: Wed, 21 Oct 2015 07:28:00 GMT\n    # Format: '%a, %d %b %Y %H:%M:%S GMT'\n    # Validate weekday matches date, and timezone is GMT exactly\n\n    # Quick check for trailing or leading extra text:\n    # The string must be exactly 29 characters for this format:\n    # 'Wed, 21 Oct 2015 07:28:00 GMT' is length 29\n    # But we should not rely on length only, because day and month can be single digit?\n    # Actually day is zero-padded two digits, month is 3-letter abbrev, weekday 3-letter abbrev, fixed format.\n    # So length must be exactly 29.\n    if len(s) != 29:\n        return None\n\n    # Check last 4 chars are ' GMT'\n    if s[-4:] != ' GMT':\n        return None\n\n    # Parse date part without ' GMT'\n    date_part = s[:-4]\n\n    # Parse with strptime\n    try:\n        dt = datetime.strptime(date_part, '%a, %d %b %Y %H:%M:%S')\n    except Exception:\n        return None\n\n    # Check that dt is naive, convert to aware UTC\n    dt = dt.replace(tzinfo=timezone.utc)\n\n    # Validate weekday matches\n    # dt.weekday() Monday=0 ... Sunday=6\n    # strptime %a gives abbreviated weekday name, e.g. Wed\n    # We can get the weekday from dt and compare to the string in s\n\n    # Map weekday number to abbreviated weekday name\n    weekday_map = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\n    expected_weekday = weekday_map[dt.weekday()]\n    actual_weekday = s[0:3]\n    if actual_weekday != expected_weekday:\n        return None\n\n    # Now compute difference in seconds\n    diff = (dt - now).total_seconds()\n    if diff < 0:\n        return 0\n    return math.ceil(diff)\n",
      "contentRedacted": false,
      "publishedContentSha256": "8654afafd3324570af7d15a256663579ab83ba860f90aa7d35579fc18903d5b8"
    }
  ],
  "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": "20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098",
    "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": 1792153638.854938
    },
    "candidateCode": "from datetime import datetime, timezone, timedelta\nimport math\n\ndef retry_after(value, now):\n    \"\"\"Parse an HTTP Retry-After header according to the task contract.\"\"\"\n    if not isinstance(value, str):\n        return None\n    s = value.strip()\n    if not s:\n        return None\n\n    # Check if s is only ASCII decimal digits (no signs, no fractions)\n    if s.isdigit():\n        # Convert to int and return\n        try:\n            seconds = int(s)\n            if seconds < 0:\n                return None\n            return seconds\n        except Exception:\n            return None\n\n    # Otherwise, parse as HTTP-date of form: Wed, 21 Oct 2015 07:28:00 GMT\n    # Format: '%a, %d %b %Y %H:%M:%S GMT'\n    # Validate weekday matches date, and timezone is GMT exactly\n\n    # Quick check for trailing or leading extra text:\n    # The string must be exactly 29 characters for this format:\n    # 'Wed, 21 Oct 2015 07:28:00 GMT' is length 29\n    # But we should not rely on length only, because day and month can be single digit?\n    # Actually day is zero-padded two digits, month is 3-letter abbrev, weekday 3-letter abbrev, fixed format.\n    # So length must be exactly 29.\n    if len(s) != 29:\n        return None\n\n    # Check last 4 chars are ' GMT'\n    if s[-4:] != ' GMT':\n        return None\n\n    # Parse date part without ' GMT'\n    date_part = s[:-4]\n\n    # Parse with strptime\n    try:\n        dt = datetime.strptime(date_part, '%a, %d %b %Y %H:%M:%S')\n    except Exception:\n        return None\n\n    # Check that dt is naive, convert to aware UTC\n    dt = dt.replace(tzinfo=timezone.utc)\n\n    # Validate weekday matches\n    # dt.weekday() Monday=0 ... Sunday=6\n    # strptime %a gives abbreviated weekday name, e.g. Wed\n    # We can get the weekday from dt and compare to the string in s\n\n    # Map weekday number to abbreviated weekday name\n    weekday_map = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\n    expected_weekday = weekday_map[dt.weekday()]\n    actual_weekday = s[0:3]\n    if actual_weekday != expected_weekday:\n        return None\n\n    # Now compute difference in seconds\n    diff = (dt - now).total_seconds()\n    if diff < 0:\n        return 0\n    return math.ceil(diff)\n",
    "oracle": {
      "passed": 18,
      "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": null,
          "pass": true
        },
        {
          "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": null,
          "pass": true
        },
        {
          "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/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098/a88e3aadcf8b46b6becd87509763973b.request.json",
        "requestSha256": "f160ff0180d91e8631b07784b7b9d1dce5696f4324ec341b87bcc22af21f54a7",
        "responseSha256": "405b660afd62e7578233795cbc8253c7af5f08dd2d3c35d64f30bd9f6eb35db4",
        "httpStatus": 200,
        "requestedModel": "byok/openai/gpt-4.1-mini",
        "resolvedModel": "byok/openai/gpt-4.1-mini",
        "backendModel": "openai/gpt-4.1-mini",
        "resolutionSource": "explicit_byok_route",
        "generationControls": {
          "max_tokens": 8192,
          "temperature": 0.0,
          "reasoning_choice": {
            "mode": "default"
          },
          "auto_failover": false,
          "stream": true
        },
        "inputTokens": 831,
        "outputTokens": 583,
        "totalTokens": 1414,
        "costUsd": 0.001265,
        "energyWh": null,
        "finishReasons": [
          "stop"
        ],
        "additiveReasoningTokens": null,
        "nestedReasoningTokens": null
      }
    ],
    "gatewayBefore": {
      "status": "healthy",
      "service": "local_gateway",
      "mode": "full",
      "port": 6120,
      "timestamp": "2026-10-16T12:27:18.886092+00:00",
      "uptime_seconds": 4879.3566999435425,
      "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:27:29.408877+00:00",
      "uptime_seconds": 4889.879482984543,
      "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/20261016T122718Z_aider_byok_openai_gpt-4.1-mini_c41098",
    "rawResultSha256": "4f9da133fc35ea77759043635b01116fb1c550403e7613357e90415b6cdb0910",
    "rawEvidenceHashes": {
      "health_before.json": "801615f6f9b67e8852a09b85dd13552f74ae4824cacbf6d92f17d78cd527e9c2",
      "stdout.txt": "e17d7562974625f8d6f6fc73dc1fcf2598624d8506a557da472477aff3520931",
      "policy.json": "79464c36a3d2f7094195db502cd93bdd8f67ba27004c9c9e234b314828ed23d2",
      "a88e3aadcf8b46b6becd87509763973b.request.json": "f160ff0180d91e8631b07784b7b9d1dce5696f4324ec341b87bcc22af21f54a7",
      "a88e3aadcf8b46b6becd87509763973b.response.txt": "405b660afd62e7578233795cbc8253c7af5f08dd2d3c35d64f30bd9f6eb35db4",
      "a88e3aadcf8b46b6becd87509763973b.http.json": "1e59a50dc3d6db42e13fba247a3fe83c1a939e105d6bf1b3c8004d504062e05e",
      "health_after.json": "5e68fa7258a289efff12f943b5b13c65d800c588e2eb3147be43e1f1bb5620dc",
      "model_preflight.json": "6c920ca70482b1e8baddaf165a7a9a4a372d9c35901dcdc0c7355e3c84d0c489",
      "sandbox_preflight.json": "8415d156075475eba2b82a04636f833e85484020de5e6424f6140cd0ac61390f",
      "budget_ledger_at_terminal.json": "0887daf0cc55f4b45d1a48d22d7ad35d4c77658f5c3606184f221c74ba841355",
      "prompt.txt": "6c229fd3a8dda211432b4ff70838fa0cb73b325bc778da52ab0cdd280619a5fe",
      "oracle.stdout.txt": "3e7b0982f217a41f229865a072cdee2a778735cbabe56238a3f0d4e91cab0746",
      "sandbox.sb": "2e4047e8533191449f176fc5bb58ac81a27b4f61d04a53157dba8be01aa3d602",
      "a88e3aadcf8b46b6becd87509763973b.timing.json": "91fc89597af29eb6912d1d506923bc3cff4751d8efa222f449017ccda2ff0000",
      "stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "launch.json": "3508c9c34cd3f77404f09e1a51477ff1fcda73f4d73a50e6941fa7f22aefb8e5",
      "invocation.json": "eda42f18abd16740b7ea0cd1e0fb97c3a43fa792362a06973c9c4d6ce4894c30",
      "oracle.stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "freeze.json": "6718f8188c3f7bdfab621280befa2e148edd8a58293ea6adb48ce7dfb373759b",
      "product_source.json": "800394eb850384c5f7feb92bc1d1dc134e77175db563ab3ffa14bd80fab1c9a7",
      "workspace/aider_model_metadata.json": "a19d46136d1a210cc430d71de4b8f5958ec7cd881858c84c1edd6f7840f5873d",
      "workspace/solution.py": "8654afafd3324570af7d15a256663579ab83ba860f90aa7d35579fc18903d5b8",
      "workspace/chat_history.md": "32663d0b9689e87b0ab5b41867fa418d363763c907a289011c617195979495ab",
      "workspace/aider_settings.yml": "97d92dcfd00e8a91d413f05958f20f710f069e1da2c15ca12ec8a466bda94098"
    },
    "productSource": {
      "head": "fbc605ea70ed64408c1f1beef11f7cfcd2620117",
      "files": {
        "scripts/benchmarks/agent_comparison_rerun_20261016.py": "c625b691551051e1f0a3d8dea1fbb3ea6db797578005f86122099572c7acb0b0",
        "tools/verdict-code/verdict_code/agent.py": "62e8e590d90d768f6d2c728a757727b77bfbb596776b17c8756a182a1238ccd3",
        "tools/verdict-code/verdict_code/tools/__init__.py": "609350f15bbdec4099405afe9ddddddf7b2caa7d2d03cc53e0276d6ab8d3bd57",
        "tools/verdict-code/verdict_code/main.py": "16e15abf490c9d9385ee968217ae579a41ee755e03d21d486647b09753e5a740",
        "tools/verdict-code/VERSION": "71573f2b38da780fb8f08530fb1f65e7285e362953dc2aec19f1c59e92e6f442"
      }
    },
    "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
    }
  }
}
