{
  "notes": "EPISODE 4 (2026-11-29). Read the ten new results (native-mend 4, native-proof 4, native-browser 2); SHA-256 match the hand-over; all accepted, nothing refused. Trunk = 28ff85f30059f1ffbde546ab29aee4cc93d7a41f (native-mend on 40669c6; web/src unchanged but i18n-ui). Earlier notes still hold.\n\nCHECKED MYSELF on a clone of 28ff85f (web/, npm ci): tsc exit 0; 216 tests, 214 pass, 0 fail, 2 todo (both in native-merged); i18n-check exit 0 (605 strings, 9 languages). I read the code at each reported line: the defects are real.\n\nWHAT THE TESTS OF 40669c6 SHOWED (all handed again next episode: cite them)\n- native-proof/historical-replay, LIVE read-only: order 0xe881aee2...a267 -> paid, verifying; report.md 44,037 bytes verified; ReportView 14 of 14 fights with both probabilities, 109 source links; complete=false (no report.json in that delivery). Defects: issue wording, banner provenance, empty league labels.\n- native-proof/state-census, LIVE: 135 job.open/IMD requests on the Intake (132 completed, 3 admitted; no refused or failed one exists). 30 real hashes + 2 controls through readNative: 25 pass, 7 fail = 6 paid through other contracts stay pending, 1 unrelated reverted transaction read as failed.\n- native-proof/fork-payment, SIMULATED (anvil fork, block 26,519,527; flagged by source checks, no reason): 1/5/14 games: quote = priceOf = 0.5 IMD, exact approve, one request, one Requested log, one transfer to payTo, nothing else. Gas: approve 46,964; request 178,730 / 209,660 / 280,450 for 3,844 / 4,619 / 6,392 bytes (code assumes 25 a byte, real about 40). D1: with ETH = the site's estimate the 14-game case approved, then could not pay. D2: a wallet error with no hash blocks that selection for ever.\n- native-proof/body-precheck, LIVE from a server: the trunk's real bodies (1/5/14 games, English, Japanese + question): POST /requests/check 200, blockers []. A precheck, not an admission.\n- native-browser/purchase-to-report, SIMULATED (headless Chromium, fixtures): 29 pass, 7 fail, 1 not run. Every gate held (no early paid badge, no early report, no second payment). BLOCKING: legacyFromV3 (swarm.ts:200) drops probabilities, arguments and sources of a verified report.json, so the cards show none. Also raw Markdown in arguments, 'Result Void' on unplayed games, agents 'not stated', paid badge vanishing while a completion confirms, Back trapped, dashboard total 0, raw reason codes, old price tiers in index.html.\n- native-browser/failures-and-recovery, SIMULATED: 11 of 15 pass. Fails: Pay enabled beside an unresolved order (no duplicate send happened); stale approval sentence; 'Verified' sentence over a rejected other-job snapshot; failed entry with running job reads as waiting.\n- native-mend: ui-test (29 cases), checkout-strings (92 keys x 9 languages), merged-flow-test (29 cases, real modules together, 2 todo), guide.\n\nSPAWNED: three code waves, 15 items (43 of 50 used). The checks are code items with scope [] because a research batch cannot wait on a code wave; the skill says a code batch waits while another runs, so the three should run in order, each from the merged trunk. Unconfirmed: check.\n1. native-repair (8, one owner a file): report-reader (swarm.ts), report-view (pages.tsx), tracking (native/client.ts; new reasons awaiting-receipt, unsupported-transaction, not-an-intake-request), status-view (native/view.tsx), payment (native/payment.ts: gas estimate, hashless attempts), checkout-ui (checkout.tsx, native/body.ts), guide (docs/IMD_NATIVE_FLOW.md, README.md), page-meta (web/index.html).\n2. native-seams (2): fit (repairs made to fit, the 2 todo cases pass, new merged cases), strings (new i18n-ui/repair.ts, 9 languages).\n3. native-verify (5): suite (writes only docs/NATIVE_VERIFICATION.md), browser-sale, browser-failures, live-replay, fork-pay. Each result begins with its commit and three markers: web/tests/native-cards.test.mjs, web/tests/native-view.test.mjs (native-repair), web/src/i18n-ui/repair.ts (native-seams).\n\nEPISODE 5 (the last)\n1. In goal.json compare each wave's merged commit with the commit each native-seams and native-verify result names. A result whose markers are absent, or whose commit precedes native-seams' merge, tested unrepaired code: cite it as that, never as proof of a repair.\n2. Spawn nothing: no episode is left to read it. Set finish true whatever landed. Write notes the write-up can stand on: final trunk commit; suite counts; each defect above with the result that shows it mended, or that it is not; every failure left.\n3. If a wave was refused, did not merge or did not run, say so and write up the last merged commit. On 28ff85f the cards lose probabilities and sources of a full report.json, so 'display predictions, probability estimates, research and source citations' is NOT met there.\n4. A requester note with the transaction hash of an order they paid changes what can be claimed: quote it.\n\nTHE WRITE-UP MUST SAY\n- Architecture: SELECT GAMES -> the wallet approves IMD and calls Intake.request(job.open@job-1, body, no callback, IMD, live priceOf) at 0xa43e6f75ee006411f79ac1c84120606c2330de82 -> the page keeps the transaction hash -> GET api.imd.fun/intake/1/<tx> -> admission.result.jobId -> /jobs/<id> -> /jobs/<id>/result -> snapshot Keccak-256 and each file's SHA-256 checked -> report shown. Paid only at 3 confirmations with matching Requested log, transfer and IMD order status paid; complete only with the canonical Completed log, a complete result and verified files. No site contract, escrow, Worker or extra transfer in the paid path.\n- Key verdict: no signing key is needed to pay, be admitted, track or read reports (repo-facts/signing-keys, native-flow/tracking-client, native-evidence/body-browser-contract; the live replays ran with none). VERIFIER_PRIVATE_KEY serves only the old escrow's verifyDelivery/rejectDelivery for historical orders and is introduced nowhere.\n- Every test labelled live or simulated, with its counts and commit.\n- NOT done: nobody has made a real purchase through this flow, and no worker can (it takes a wallet with IMD and ETH and the site published with VITE_PAID_RESEARCH_OPEN=true). The requester's 'do not mark this complete until the entire payment-to-report workflow has been successfully tested' is NOT met. Deliver as partial: the owner's acceptance run in docs/IMD_NATIVE_FLOW.md is the remaining step; the switch stays off until it is recorded.\n- The goal has no owner, children budget, mandate or asks: it cannot push to github.com/AgentStewLC/launch-3500-imd-picks-complete nor publish imdpicks.com, which still serves that repository's dist/ at 741da405 (escrow path, paid switch false). The owner's: merge the trunk, build with the switch, publish, mend www (525), the first paid order.\n- A page on imdpicks.com cannot use IMD's free check (403 origin_not_allowed): bodies are validated locally and one could still be refused after payment; a same-origin proxy would need hosting the owner authorises, and no key.\n- The one past sports delivery had report.md only; if IMD again sends no report.json the page shows a verified partial report (predictions recovered from the Markdown), not 'Report ready'.\n- 1,999 agents an order: no documented IMD.fun job option gives it (panelSize 1999 -> 400 'expected number to be <=9'; the past sports job had one seat). Unmet; promise no headcount.\n- Agents #507 and #1113: both jobs completed before this goal. #507's V14 adds a site checkout contract (never deployed), which the requester rules out: nothing reused. #1113 was a content review. Nothing duplicated.\n- Backlog: sport tiles (main.tsx:97), duplicate guard's RPC client (orders.ts:125), swap findings of job 084260e9; requests paid through another contract are not followed (the checkout pays directly).\n- Flagged by source checks without a reason: protocol-facts/job-body, protocol-facts/past-orders, repo-facts/live-site, native-evidence/body-browser-contract, native-proof/fork-payment.",
  "spawn": [
    {
      "name": "native-repair",
      "mode": "code",
      "brief": "IMDPicks' site is this repository's web/. A customer selects games, pays IMD.fun's own Intake from their wallet (web/src/checkout.tsx, web/src/native/) and the page follows the order to its report (native/client.ts, native/view.tsx, swarm.ts, pages.tsx). At commit 28ff85f, from web/, `npm ci`, `npx tsc --noEmit`, `node --test tests/*.test.mjs` (TMPDIR set to a folder inside test/scratch: 216 tests, 214 pass, 2 todo) and `node scripts/i18n-check.mjs` pass. Tests found defects; you mend one group, in your files only, while other items mend other files unseen: keep every exported name and type, add no dependency, change no package or build file, add no site contract, extra transfer or signing key, and leave web/src/i18n-ui alone (write a new customer-facing sentence in English through the existing t() calls; a later wave translates). Never show paid or complete on less confirmation than the code asks now. {{task}} {{more}} Add offline tests in your files that fail before your change and pass after; where an existing assertion states the defect, change it and say so. Your result, in Markdown, must contain: each defect with file and line, what happened and what happens now; files changed; each command with exit code and test counts; every new English sentence a customer can see, quoted; defects seen outside your files; what stays unproven. No live payment is made.",
      "items": [
        {
          "key": "report-reader",
          "vars": {
            "task": "Your files: web/src/swarm.ts, web/tests/native-report.test.mjs, web/tests/fixtures/native-report/**. (1) Blocking: legacyFromV3 (swarm.ts:200-208) keeps only verdict, likelyWinner, one probability, pick and risks of a verified imd-picks.report/3 bundle, so every game card loses both sides' probabilities, prices, arguments, confidence and all sources. Carry into each game, in fields ReportGame already has: markets with every outcome's probability and price, supporting, opposing, risks, confidence, winnerProbability (the most likely outcome's p), probability, sources as {url, title, accessedAt}; and the agents count and roles the bundle states, so the page stops saying participation is not stated when it is.",
            "more": "(2) swarm.ts:582 settles every no-pick as void, so a game three days away reads 'Result Void': a no-pick has no result. (3) attachEvents (swarm.ts:193) skips a game that has an espnId, leaving league and start empty: when the id is a paid event's, fill what is missing and keep what the report gave. (4) swarm.ts:839 says 'historical Markdown-only delivery is shown as text only' whenever report.json is not verified, although predictions recovered from the verified report.md are shown, and also when a declared report.json failed its SHA-256: say which case it is. Test with a schema-3 fixture of three games (a pick, a no-pick, a probability-only game), five sources each, through the real fetchNativeReport with only downloads simulated."
          },
          "scope": [
            "web/src/swarm.ts",
            "web/tests/native-report.test.mjs",
            "web/tests/fixtures/native-report/**"
          ]
        },
        {
          "key": "report-view",
          "vars": {
            "task": "Your files: web/src/pages.tsx, new web/tests/native-cards.test.mjs, web/tests/fixtures/native-cards/**. Another item makes the report reader pass each game's markets, supporting, opposing, risks, confidence, winnerProbability and sources (existing ReportGame fields) from a verified report.json; the cards must show them. (1) PickCard draws the probability bar only for a pick (pages.tsx:415): show each side's probability for a no-pick and a probability-only game too, when the game has them. (2) pages.tsx:427-428 print supporting and opposing as plain text, so a citation reads as raw Markdown '[stats](https://...)': render them with the inline renderer of web/src/markdown.tsx, http(s) links as anchors, and render risks, which the card never shows.",
            "more": "(3) pages.tsx:413 prints an empty league span when the league is missing: leave it out. (4) pages.tsx:424: no result line for an unplayed game with no pick, never 'Void'. (5) verifyNote (pages.tsx:293-298): when the manifest is verified and jsonSource is 'embedded', say the predictions were recovered from the verified report.md and no separate predictions file was delivered. (6) pages.tsx:926 sums only escrow and legacy orders under 'Total IMD spent here, confirmed' beside a confirmed native order: label it as earlier orders only. (7) reportLangOf (pages.tsx:304) must read the language from a JSON job body's objective, as native/body.ts writes it. Test ReportView's static markup from fixture games with those fields: both probabilities, anchors in arguments, five source anchors a game, no 'Void'."
          },
          "scope": [
            "web/src/pages.tsx",
            "web/tests/native-cards.test.mjs",
            "web/tests/fixtures/native-cards/**"
          ]
        },
        {
          "key": "tracking",
          "vars": {
            "task": "Your files: web/src/native/client.ts, web/tests/native-client.test.mjs, web/tests/fixtures/native-client/**. (1) client.ts:227-232 sets snapshot.jobId only after /jobs/<id> and /jobs/<id>/result both answer, and readCompletion (client.ts:203) can throw first while a completion is under three blocks deep: a paid, admitted order then returns with no job id and the page drops its paid badge. Once the matched Intake entry is paid and its admission names a job, the snapshot keeps paid, payer, requestId and that jobId whatever is still pending; a job whose id or paidBy disagrees stays a mismatch with no job id. (2) client.ts:211-216: a confirmed refusal (entry refused, canonical Completed status 1, job and result refused) after admission throws admission-refusal-disagreement and stays pending: return phase refused.",
            "more": "(3) client.ts:185 returns failed 'request-reverted' for any reverted transaction before binding it to the Intake; a real unrelated revert (0x4a94111a874a4b82f8aae04b4ceede15566d28ce167eea6eaec918397f8d039c) read as a failed order. Say failed only when the transaction went to the Intake and its calldata is request with this action and token; otherwise pending, unpaid, reason 'not-an-intake-request'. (4) client.ts:91-98: a successful request that reached the Intake through another contract returns 'request-transaction-mismatch' like an order still indexing: return 'unsupported-transaction', pending and unpaid. (5) client.ts:275 calls a transaction with no receipt yet 'read-unavailable': use 'awaiting-receipt', and keep 'read-unavailable' for failed reads. Keep every other reason code."
          },
          "scope": [
            "web/src/native/client.ts",
            "web/tests/native-client.test.mjs",
            "web/tests/fixtures/native-client/**"
          ]
        },
        {
          "key": "status-view",
          "vars": {
            "task": "Your files: web/src/native/view.tsx, new web/tests/native-view.test.mjs, web/tests/fixtures/native-view/**. (1) view.tsx:163 treats a snapshot with no jobId as not matching the job in the address, so on #/job/<id>?tx=<hash> the paid badge, job id, payer and reason vanish while a completion confirms or /jobs/<id> is down: only a different job id is a mismatch; an absent one keeps what is confirmed and shows the address's job id. (2) view.tsx:149 sets location.hash on admission, adding a history entry, so Back returns to #/tx/<hash> and is sent forward again: replace the entry. (3) view.tsx:187 prints the reader's reason code raw ('read-unavailable', 'awaiting-index', 'intake-entry-mismatch'): show one plain sentence a code through t(), for every code native/client.ts can return and three another item adds now ('awaiting-receipt':",
            "more": "not mined yet; 'unsupported-transaction': it did not call IMD's Intake directly from the paying wallet, so this page cannot follow it; 'not-an-intake-request': not an IMDPicks order), a general sentence for an unknown code, and 'job-completion-disagreement' as IMD's records disagreeing, not as ordinary waiting. Keep the code in small print. (4) view.tsx:191 prints report issues untranslated: pass them through t(). (5) view.tsx:193 mounts ReportView when the snapshot was rejected (another job's) and nothing verified exists, so the customer reads 'Verified: the report's bytes match...' over no report: mount it only when verified text or verified predictions exist. Test with trackNative and NativeStatus, read and fetchReport injected."
          },
          "scope": [
            "web/src/native/view.tsx",
            "web/tests/native-view.test.mjs",
            "web/tests/fixtures/native-view/**"
          ]
        },
        {
          "key": "payment",
          "vars": {
            "task": "Your files: web/src/native/payment.ts, web/tests/native-checkout.test.mjs, web/tests/fixtures/native-checkout/**. Measured on a Mainnet fork of this code: approve used 46,964 gas; request used 178,730 for a 3,844-byte body, 209,660 for 4,619 and 280,450 for 6,392, about 40 gas a byte. (1) gasUnits (payment.ts:63-64) assumes 25 a byte and prices at eth_gasPrice: for 14 games it gave 314,800 against 327,414 used, so a wallet holding exactly the estimate passed the check at payment.ts:236, paid for the approval and could not send the request. Estimate from the real calls where they can be estimated (estimateContractGas for approve, and for request once the allowance is there), else by a formula no lower than those measurements; add at least a fifth; price at what a wallet reserves (maxFeePerGas from estimateFeesPerGas, else the gas price). The check before the approval prompt must cover approval and request together.",
            "more": "(2) payment.ts:277-286 removes a stored attempt only on a wallet rejection (code 4001). Any other error before a hash exists (insufficient funds, an RPC error) leaves an attempt with no txHash; reconcile (payment.ts:117) then answers 'unknown' and earlierOrder (payment.ts:197) throws 'The earlier request still needs confirmation on Ethereum' on every later try, though nothing was sent. When writeContract throws and the payer's nonce has not moved since the attempt began, cancel the attempt; and let reconcile treat an attempt with no hash as retryable once the payer has sent nothing since its fromBlock. Test both with the suite's simulated wallet and RPC."
          },
          "scope": [
            "web/src/native/payment.ts",
            "web/tests/native-checkout.test.mjs",
            "web/tests/fixtures/native-checkout/**"
          ]
        },
        {
          "key": "checkout-ui",
          "vars": {
            "task": "Your files: web/src/checkout.tsx, web/src/native/body.ts, web/tests/native-body.test.mjs, web/tests/fixtures/native-body/**, new web/tests/native-checkout-ui.test.mjs. (1) checkout.tsx:100-101: canPay ignores an unresolved saved order for the same selection, so 'Pay ... IMD and start research' stays enabled beside 'Open request ...' while that order's research runs. The payment code would reopen it, but the invitation is wrong: while such an order exists, disable Pay and offer only to open it. (2) checkout.tsx:63-75: after the wallet declines the Intake request the approval is already mined, yet the page still says 'Your wallet will first ask you to approve the quoted IMD amount.' because the quote is not read again: refresh the quote after any wallet error and after an approval.",
            "more": "(3) body.ts:92 and :97 put numbers into the error text ('Research objective exceeds 8000 characters (8997)...'), checkout.tsx:51 stores that text and :200 looks it up as a translation key, which never matches: web/src/i18n-ui/checkout.ts already holds the templates with placeholders, so carry the template and its values on the error and translate with them. Keep the English text of both errors exactly as it is. Test (3) in every catalogue language for one objective-limit and one byte-limit error, and (1) and (2) by rendering the checkout with a simulated wallet."
          },
          "scope": [
            "web/src/checkout.tsx",
            "web/src/native/body.ts",
            "web/tests/native-body.test.mjs",
            "web/tests/fixtures/native-body/**",
            "web/tests/native-checkout-ui.test.mjs"
          ]
        },
        {
          "key": "guide",
          "vars": {
            "task": "Your files: docs/IMD_NATIVE_FLOW.md, README.md (no test: check relative links instead). Record what was observed on 2026-11-29 on commit 40669c6 in the guide's 'Verification records', each row marked live or simulated: (a) live: past order 0xe881aee29502a10dd88ec2217e5c8b0fbea9a281f2cf68e485b0f77f6fcfa267 through the tracker and report reader: paid, verifying, report.md verified, 14 of 14 fights with both probabilities and 109 source links, complete false as that delivery had no report.json; (b) live: 30 real Intake transactions and 2 controls, 25 read as expected, 6 paid through other contracts stayed pending, 1 unrelated revert read as failed; (c) simulated on a Mainnet fork: 1, 5 and 14 games, exact 0.5 IMD approval, one request, one transfer to the Intake's payee, gas check 12,614 units short for 14 games;",
            "more": "(d) live: six bodies (1, 5, 14 games, English and Japanese) passed IMD's free check from a server; a browser on imdpicks.com gets 403 from it, so the page validates locally; (e) simulated in headless Chromium: a sale to 'Report ready', 29 of 37 steps passed, every confirmation gate held, the cards lost probabilities and sources; a failure walk, 11 of 15 passed. Say a repair wave follows; its results are not here. Keep the owner's acceptance run as not performed and the switch off. Say: no signing key is needed to pay, be admitted, track or read reports; 1,999 agents an order is not an option IMD.fun documents; merging into production, publishing imdpicks.com and the www 525 error are the owner's. README.md:5 still quotes escrow tiers (1 / 1.5 / 2 IMD): the price is the Intake's live quote."
          },
          "scope": [
            "docs/IMD_NATIVE_FLOW.md",
            "README.md"
          ]
        },
        {
          "key": "page-meta",
          "vars": {
            "task": "Your files: web/index.html and a new test web/tests/page-meta.test.mjs. Lines 7, 15 and 21 (description, og:description, twitter:description) still say '1 IMD for 1-4 events, 1.5 IMD for 5-9, or 2 IMD for 10-14' and 'Paid research is paused until the release is authorized': those were the old escrow's tiers. The checkout now charges what IMD.fun's Intake quotes when the customer pays, plus Ethereum gas.",
            "more": "Reword the three so they state no fixed price and no claim that research is open or paused: select games, pay in IMD through IMD.fun, the Swarm researches, receive a report with probability estimates and cited sources; analysis, not a guarantee. Line 10 names https://imd-picks-you-select-the-ga-e617.imd.site/ as canonical: make it https://imdpicks.com/, and og:url the same if the file has one. Change nothing else in the file. The test reads the file and fails on the old tier wording or the old canonical address. If a test outside your files asserts the old wording, name it with file and line."
          },
          "scope": [
            "web/index.html",
            "web/tests/page-meta.test.mjs"
          ]
        }
      ],
      "minutes": 75,
      "output": {
        "format": "markdown",
        "maxBytes": 24000
      }
    },
    {
      "name": "native-seams",
      "mode": "code",
      "brief": "IMDPicks' site is this repository's web/ (Vite, React, viem): a customer selects games, pays IMD.fun's own Intake from their wallet, and the page follows the order to its report. A repair wave (batch native-repair) is meant to have merged just before this one: eight items that could not see each other changed web/src/swarm.ts, pages.tsx, checkout.tsx, native/client.ts, native/view.tsx, native/payment.ts, native/body.ts and their tests. Begin your result with the commit you start from (git rev-parse HEAD) and whether web/tests/native-cards.test.mjs and web/tests/native-view.test.mjs exist; if they do not, that wave has not merged: say so first, then do your work on what is there. From web/: `npm ci`, `npx tsc --noEmit`, `node --test tests/*.test.mjs` with TMPDIR set to a folder inside test/scratch, `node scripts/i18n-check.mjs`, `npx vite build` with an outDir inside test/scratch. Add no dependency, change no package or build file, add no site contract, extra transfer or signing key, and never show paid or complete on less confirmation than the code asks now. {{task}} {{more}} Your result, in Markdown, must contain: the commit and the two markers; each change with file and line and why; each command with its exit code and test counts before and after; every failure left, with file, line and message; what stays unproven. No live payment is made.",
      "items": [
        {
          "key": "fit",
          "vars": {
            "task": "Your files: web/src/native/**, web/src/swarm.ts, web/src/pages.tsx, web/src/checkout.tsx, every web/tests/native-*.test.mjs except native-i18n.test.mjs, and web/tests/fixtures/**. Make the repaired parts fit: typecheck, build and every test but tests/native-i18n.test.mjs must pass (the other item of this wave translates). Mend source only where two repairs do not fit or one is missing, each change small; mend a test only where it asserts what the repairs changed on purpose (reason codes shown as sentences; 'awaiting-receipt' for an unmined transaction; the job id kept while later reads wait). In tests/native-merged.test.mjs the two TODO cases (job id lost while /result is 404; confirmed refusal after admission) become ordinary passing cases, and you add cases that run the real modules together, only wallet, RPC, API and artifact bytes simulated:",
            "more": "(a) a paid order whose verified report.json has three games (a pick, a no-pick, a probability-only game) with five sources each shows, through the real fetchNativeReport and ReportView, both probabilities, the arguments with their links as anchors and five source anchors in every game's card, and no 'Void'; (b) a completion one block deep keeps the paid badge and the job id; (c) a wallet holding exactly the quoted gas completes approval and request when the simulated chain uses 46,964 gas for approve and 40 a byte for request; (d) a snapshot naming another job shows no 'Verified' sentence; (e) a wallet error with no hash leaves the selection payable again. Add no new customer-facing sentence; quote any you cannot avoid."
          },
          "scope": [
            "web/src/native/**",
            "web/src/swarm.ts",
            "web/src/pages.tsx",
            "web/src/checkout.tsx",
            "web/tests/native-merged.test.mjs",
            "web/tests/native-ui.test.mjs",
            "web/tests/native-client.test.mjs",
            "web/tests/native-checkout.test.mjs",
            "web/tests/native-checkout-ui.test.mjs",
            "web/tests/native-body.test.mjs",
            "web/tests/native-report.test.mjs",
            "web/tests/native-cards.test.mjs",
            "web/tests/native-view.test.mjs",
            "web/tests/fixtures/**"
          ]
        },
        {
          "key": "strings",
          "vars": {
            "task": "Your files: web/src/i18n-ui/** and web/tests/native-i18n.test.mjs. The repairs added English sentences in web/src/checkout.tsx, pages.tsx, swarm.ts and web/src/native/*. Find every customer-facing sentence with no entry in fr, es, ru, ja, zh, pt, it, th and pcm: `node scripts/i18n-check.mjs --list` covers files directly under src/, tests/native-i18n.test.mjs covers checkout.tsx and src/native, and read by hand the table of reason sentences in native/view.tsx and the report issues written in swarm.ts's fetchNativeReport.",
            "more": "Add them in a new catalogue web/src/i18n-ui/repair.ts built like checkout.ts (one list of keys, one aligned row a language, placeholders kept), register it in index.ts before the existing spreads so existing wording wins, and extend the test to cover it. IMD, Intake, Swarm, Ethereum and file names stay as they are. Done when the i18n check exits 0 and tests/native-i18n.test.mjs passes. List in the result each key added and the count a language."
          },
          "scope": [
            "web/src/i18n-ui/**",
            "web/tests/native-i18n.test.mjs"
          ]
        }
      ],
      "minutes": 150,
      "output": {
        "format": "markdown",
        "maxBytes": 32000
      }
    },
    {
      "name": "native-verify",
      "mode": "code",
      "brief": "IMDPicks' site is this repository's web/ (Vite, React, viem): a customer selects games, pays IMD.fun's own Intake on Ethereum Mainnet (0xa43e6f75ee006411f79ac1c84120606c2330de82, action job.open@job-1) from their wallet, and the page follows the order at https://api.imd.fun to its report. This is the check after two waves, native-repair then native-seams, are meant to have merged here. Work in test/scratch and change no file but one your task names. Begin your result with the commit you tested (git rev-parse HEAD) and whether web/tests/native-cards.test.mjs, web/tests/native-view.test.mjs and web/src/i18n-ui/repair.ts exist: they mark the two waves; test what is there either way. Send no Mainnet transaction, pay nothing, publish nothing. {{task}} {{more}} Your result, in Markdown, must contain: the commit and the three markers; one table row a check with what was done, what was expected, what was seen (page text or values), pass or fail, and live or simulated; each defect with file and line and what should happen; the commands and scripts to repeat it; what this run cannot prove.",
      "items": [
        {
          "key": "suite",
          "vars": {
            "task": "From web/: `npm ci`; `npx tsc --noEmit`; `node --test tests/*.test.mjs` with TMPDIR set to a folder inside test/scratch; `node scripts/i18n-check.mjs`; `npx vite build` twice into folders inside test/scratch, once with VITE_PAID_RESEARCH_OPEN=true and once without it. Give each exit code; tests run, passed, failed, todo and skipped; every failing or todo test with file, name and message; the i18n counts. For the build without the switch show that checkout offers no payment (web/src/native/policy.ts; say how you checked the built script).",
            "more": "Say which build variables web/src/native/ and web/src/checkout.tsx read, and confirm by search that neither refers to VERIFIER_PRIVATE_KEY, the escrow contract or a settlement Worker. Then write docs/NATIVE_VERIFICATION.md, the one file you may change: a dated record of exactly these commands and counts, the commit they ran on, and the sentence 'No live payment was made; the owner's acceptance run in docs/IMD_NATIVE_FLOW.md is still to do.'"
          },
          "scope": [
            "docs/NATIVE_VERIFICATION.md"
          ]
        },
        {
          "key": "browser-sale",
          "vars": {
            "task": "Simulated sale in a browser. Build web/ with VITE_PAID_RESEARCH_OPEN=true into test/scratch and walk it in headless Chromium (Playwright installed inside test/scratch; if no browser starts, say why and drive the same modules in Node with a static render). Serve the built files from a static file server you start; answer every other request (ESPN schedule, Ethereum JSON-RPC, api.imd.fun, artifact and IPFS hosts) from fixtures and inject a scripted EIP-1193 wallet. Steps: select three games; checkout quotes the Intake price and gas; approve and pay (the wallet must see one exact approve, one request to the Intake with job.open@job-1 and no callback, nothing else); no receipt; receipt one block deep; three deep but the Intake entry is 404; entry for another amount; paid, not admitted;",
            "more": "admitted (the page moves to the job address); completion claimed with its log one block deep; completion confirmed with report.json bytes altered; the true bytes; reload; Back; the same selection again; another browser with empty storage opening the job address. At each step give the status line and whether 'Payment confirmed by IMD' and 'Report ready' show: neither before its confirmation, and the paid badge never disappears once shown. At 'Report ready' each game's card (the fixture has a pick, a no-pick and a probability-only game, five sources each) must show both probabilities, arguments with links as anchors, five source anchors and no 'Result Void'; the agents the fixture states are stated; no reason code stands alone as the message; Back leaves the job page."
          },
          "scope": []
        },
        {
          "key": "browser-failures",
          "vars": {
            "task": "Simulated failures in a browser. Build web/ with VITE_PAID_RESEARCH_OPEN=true into test/scratch and walk it in headless Chromium (Playwright installed inside test/scratch; if no browser starts, say why and drive the same modules in Node). Serve the built files from a static file server you start; answer every other request from fixtures and inject a scripted EIP-1193 wallet. One case each, from a fresh browser context: (1) the wallet declines the approval; (2) approval mined, the wallet declines the request: the sentence about approving first must go and Pay work again; (3) the request fails in the wallet with no hash (too little ETH): a second try is offered, not 'The earlier request still needs confirmation'; (4) the request reverts; (5) Intake entry refused;",
            "more": "(6) entry failed after payment; (7) job fails after admission; (8) confirmed refusal after admission; (9) API 429 with Retry-After, two 500s, then recovery with no click; (10) checkout reopened for the same selection while research runs: Pay disabled, only the earlier order offered; (11) report.json with a wrong hash; (12) a snapshot naming another job: no 'Verified' sentence; (13) #/job/<uuid> with no transaction; (14) a hash that never appears; (15) a reverted transaction sent to another contract: not shown as a failed order; (16) the interface in French: reason sentences and a body-size error in French. For each give the visible text, the wallet calls counted, and whether a paid badge or 'Report ready' showed; neither may without its confirmation."
          },
          "scope": []
        },
        {
          "key": "live-replay",
          "vars": {
            "task": "Live and read-only: GET requests and Ethereum read calls only. Bundle web/src/native/client.ts, fetchNativeReport and ReportView from the checkout for Node and run them against Mainnet public RPCs and https://api.imd.fun. (1) Completed order 0xe881aee29502a10dd88ec2217e5c8b0fbea9a281f2cf68e485b0f77f6fcfa267: expect paid, phase verifying, job 3be0bfc6-0c5d-429d-b70e-1a4c89fe2c2a; fetchNativeReport verifies report.md (44,037 bytes, SHA-256 c46e9a75d490b7c9fdf413fd34d10df63ec9f58bea4624f0c7389a6635a02380) and ReportView's static markup shows 14 of 14 fights with both probabilities, a league label and source anchors; that delivery has no report.json, so complete is false and the issue must say so without 'shown as text only'. (2) Blocked order 0x271193f4599cb83d9d2f6b97e586ca25847eb3a8607f732acea9d4c25d29b2cf: blocked, paid, job 3075901d-fa05-4596-b659-1ada4de7dc49.",
            "more": "(3) 0x191d76dc2bfd758f43fdad3811910263a53dafbb1fb94cb9aa3bfdaa5a34792c, paid through another contract: pending, unpaid, 'unsupported-transaction'. (4) 0x4a94111a874a4b82f8aae04b4ceede15566d28ce167eea6eaec918397f8d039c, an unrelated revert: pending, unpaid, not failed. (5) A hash that does not exist: pending, unpaid, 'awaiting-receipt'. Space the API reads to stay clear of HTTP 429 and read once more if you meet it. For each case give the snapshot returned, the status and size of each API answer, and the verdict. Then POST once to https://api.imd.fun/requests/check (IMD's free check: no payment, no job) the body nativeJobBody builds for three upcoming games from the site's own loadGames, as {action: 'job.open', input: <that body parsed>}: expect 200 and no blockers."
          },
          "scope": []
        },
        {
          "key": "fork-pay",
          "vars": {
            "task": "Simulated on a fork. Start Foundry's anvil (installed inside test/scratch) as a fork of Ethereum Mainnet from a public RPC and drive the checkout's real modules (nativeJobBody, quoteNativePayment, submitNativePayment, built with VITE_PAID_RESEARCH_OPEN=true) in Node with a viem wallet over anvil's impersonated accounts; give a fresh payer IMD (token 0xD34a99Bc0f67aE1bbd63C660e6d0b0dd03E263B7) and ETH with anvil's cheat calls, on the fork only, and route the modules' own public client to the fork. For bodies of 1, 5 and 14 real upcoming games: (1) ample funds: the quote equals priceOf(job.open@job-1, IMD); one approve of exactly that; one request; one Requested log whose body is the body sent, zero callback; one IMD transfer from the payer to payTo(); no other token or ETH movement;",
            "more": "(2) ETH exactly the site's own gas estimate: approval and request are both mined (before the repair the 14-game case approved and then could not pay); give the estimate against gas used; (3) ETH one wei under the estimate: refused before any wallet call; (4) make the request fail in the wallet with no hash (ETH taken away after the approval), give ETH back and try again: the second try sends the request, not 'The earlier request still needs confirmation'; (5) the same selection again: reopened, no wallet call; (6) a body over 16,384 bytes: refused before any wallet call. Give every amount in wei and gas units, and the fork's block."
          },
          "scope": []
        }
      ],
      "minutes": 120,
      "output": {
        "format": "markdown",
        "maxBytes": 48000
      }
    }
  ],
  "read": [
    "native-verify/suite",
    "native-verify/browser-sale",
    "native-verify/browser-failures",
    "native-verify/live-replay",
    "native-verify/fork-pay",
    "native-seams/fit",
    "native-seams/strings",
    "native-repair/report-reader",
    "native-repair/report-view",
    "native-repair/tracking",
    "native-repair/status-view",
    "native-repair/payment",
    "native-repair/checkout-ui",
    "native-repair/guide",
    "native-repair/page-meta",
    "native-proof/historical-replay",
    "native-proof/state-census",
    "native-proof/fork-payment",
    "native-proof/body-precheck",
    "native-browser/purchase-to-report",
    "native-browser/failures-and-recovery",
    "native-mend/merged-flow-test",
    "native-flow/tracking-client",
    "native-mend/checkout-strings",
    "native-evidence/body-browser-contract",
    "native-evidence/historical-proof",
    "native-evidence/release-source",
    "repo-facts/signing-keys",
    "protocol-facts/status-routes",
    "protocol-facts/intake-contract"
  ],
  "cancel": [],
  "wake": {
    "batches": [
      "native-repair",
      "native-seams",
      "native-verify"
    ],
    "afterMinutes": 1200
  },
  "finish": false
}
