Skip to content

Phase 11: experimental ML pipeline for phishing-transaction classification (shadow mode) - #1

Open
Apostal322 wants to merge 92 commits into
mainfrom
feature/ml-pipeline
Open

Apostal322 wants to merge 92 commits into
mainfrom
feature/ml-pipeline

Conversation

@Apostal322

@Apostal322 Apostal322 commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Adds an optional, experimental ML subsystem (src/cryptoguard/ml/, ml extra). It is shadow mode only: scores are returned for review and monitored for drift, never written as findings, and off by default. Core install and existing findings are unchanged (a new test asserts identical snapshot findings with ML shadow on and off).

Full data card, method and decision log: ML.md. Generated results: ML_EVALUATION.md.

Data

  • Labels: PTXPhish (NDSS 2025): 18,555 expert-reviewed transaction hashes. Verified to contain only hashes and categories, so features come from the chain.
  • Poison-Hunter and Forta: parsed for the data card only. Poison-Hunter's benign class is popular addresses (a selection-bias trap) and its sample CSV is column-shifted; Forta has 7,233 duplicate addresses.
  • No overlap with CryptoGuard's data: none of the labelled addresses or transactions appear in CryptoGuard's recorded fixtures, so its own detectors cannot be scored on these labels.
  • Sources are pinned to commits and SHA-256. The two unlicensed sources are fetched locally, never committed.
  • Chain data: a deterministic stratified sample of 2,701 transactions, of which 2,527 were collected from eth.drpc.org under the approved hard cap. 11,953 of 12,000 requests were used, counting retries.

Leakage controls

  • Study window: only blocks where both classes occur (15.0M to 18.9M), because benign transactions span 2017 to 2024 and phishing ones 2022 to 2023.
  • Time-ordered splits: train, validation and test in block order, with no shared block.
  • Per-account purge: validation and test rows sharing a sender, target, spender or recipient with an earlier split are dropped (199 validation and 176 test rows).
  • Registry-only exemptions: only a curated list of public infrastructure is exempt from the purge.
  • Point-in-time features: no block number or identifiers as features, and state is read at the previous block.

Results (test set: 129 phishing, 43 benign)

Model Test AP [95% CI] ROC-AUC Recall FPR
Majority 0.750 0.500 1.000 1.000
Best rule (phishing-shaped call) 0.845 [0.797, 0.891] 0.694 0.411 0.023
CryptoGuard-signal proxy 0.750 0.500 0.047 0.047
LightGBM (selected) 0.999 [0.996, 1.000] 0.995 0.977 0.163 [0.056, 0.273]
LightGBM without identity features 0.991 0.976 0.977 0.209
  • Gate passed. The model closed 96% of the validation AP gap over the best baseline, and its test AP interval lies above the best rule's test AP.
  • Reproducible. The run is deterministic: a re-run gave identical metrics and a byte-identical model file. It takes 34 to 44 s and peaks at 197 MiB on CPU.

Limitations and failure modes (please read before relying on it)

  • One labelled source. The benign class is transactions of prominent accounts, not ordinary users. The 16% false-positive rate is measured on only 43 benign rows. On real traffic most alerts would be false, which is why this stays in shadow mode.
  • Plain token transfers are the blind spot. 5 of 7 false positives and 2 of 3 misses are single transfer() calls. Telling them apart needs wallet history, which is exactly what CryptoGuard's poisoning detector uses, so the two are complementary.
  • It recognises phishing operations, not risky approvals. Labelled phishing transactions are often the attacker's draining calls, so this is not a pre-signing warning.
  • Decisions revised after seeing data (all before the final run, documented in ML.md): the study window, the hub rule (a degree rule leaked scam contracts with many victims, caught by a new test), the promotion gate (the first version was unsatisfiable), and log-loss selection.

Verification

  • Locally on Windows: 430 backend tests passed (27 of them new ML tests); ruff, format and mypy clean; zizmor, actionlint and schema validation clean for the workflow.
  • CI: now installs the ml extra from the wheel. CI results are on this PR.
  • Release untouched: main and v0.1.0 are unchanged. No release, no public visibility change.

Phase 11.1 update: generalization audit and hardening (c11e5fb, 9e1bf6e)

Decision: research-only; independent data required. The model is reproducible and its metrics are computed correctly, but the benchmark cannot establish generalization. The API no longer scores with it. Details: ML_GENERALIZATION_AUDIT.md; generated tables: ML_AUDIT_TABLES.md; frozen baseline: docs/ml/baseline-phase11.json. No RPC requests were made in this phase.

Reproduction

  • ml build and ml train reproduced every model's metrics and a byte-identical model file.
  • Metrics recomputed independently from the stored model match the recorded values.

What the audit found

  • The test split is a development benchmark, not a holdout. It was viewed before the promotion gate, the selection metric and the hub rule were revised.
  • The negatives are tiny and clustered. The 43 benign test rows come from 12 senders. The false-positive rate is 7/43 = 0.163, with a cluster-bootstrap interval of 0.043 to 0.364. Bounding it below 1% needs about 300 independent benign rows.
  • The base rates make it unusable for warnings. At 1% phishing prevalence, precision would be 0.057.
  • The model learns how transactions are sent.
    • transferFrom appears in 445 phishing rows and 1 benign row.
    • EIP-1559 fee fields are present in 95% of benign rows and 67% of phishing rows.
    • Four transaction-type features alone reach ROC-AUC 0.875.
    • The benign class is about 60 prominent accounts, so ordinary users are not represented.

Defects fixed, with tests

  • Chain: scoring skipped chain verification; it now verifies the chain and accepts mainnet only.
  • Missing receipt: it used to be scored as a failed transaction; it is now incomplete.
  • Approval: the API scored without evidence from an untouched holdout. Approval levels (research_only / shadow_approved) now gate it.
  • Request budget: it could be lost on a crash or overspent by concurrent collectors. Every attempt is now reserved first in a locked, atomic ledger. A thread-race test also found a Windows lock bug, now fixed.
  • Registry: it trusted a path from its JSON file. Run IDs are now validated, cards schema-checked, and file size and library versions verified. LightGBM is stored as text, not pickle; scores are identical on the real rows.
  • Intervals: they resampled rows despite account clustering; they now resample account groups.

New

  • cryptoguard ml audit.
  • Wallet-history features: infrastructure only, no accuracy claim, because no labelled data with wallet histories exists here.
  • Monitoring outcomes, latency and score distribution.

Verification

  • Locally on Windows: 475 backend tests passed (45 new); ruff, format and mypy clean.
  • The training run took 700 s of wall time under load from other workloads (34–44 s of computation when idle). It was over the 2-minute limit and is documented.
  • CI results for 9e1bf6e are on this PR.

Next: collect a dataset of outgoing payments from ordinary wallets, with histories and a holdout frozen in advance. The cost estimate is in audit section 16, and it needs a new RPC budget decision.


Phase 11.2 update: wallet-centric poisoning research platform

No new RPC requests were made in this phase. The remaining 364 requests of the pilot cap are unused. No model was trained for the new task: its label gate fails (0 verified positives, 0 verified negatives).

Defects fixed

  • Pilot data loss (P0). The pilot read fixture.transactions; the field is wallet_transactions. A broad except hid the error, and three completed recordings were lost. Pilot records are now typed and versioned (ml/pilot.py). A schema mismatch raises instead of reading as zero. Lost values migrate as unknown: request counts and signed-transaction counts were recovered from the log, payment counts were not.
  • Overstated conclusion (P0). The "0.069 upper bound" applies only to the 52 least active, completely checked rows. It has been corrected in the proposal and in ML_PILOT_AUDIT.md.
  • Ledger lock race (P1). The stale-lock break could let two processes hold the lock at once. It now uses an OS file lock with fsynced writes; tests cover two processes and a holder that dies.
  • PSI defects (P1).
    • Mostly-constant features fell into one bin, so a 0→40 shift showed PSI 0. Fixed for new references, versioned so Phase 11 cards show no false drift.
    • An empty batch gave a large number; it now gives no PSI.
    • NaN values were binned silently; they are now excluded and reported.
  • Task isolation (P1). Model cards carry task, and the scorer refuses other tasks.

New (src/cryptoguard/ml/)

  • events.py: the poisoning event schema, with victim-event identity, campaign groups (public infrastructure exempt), grouped temporal splits, label tiers that keep weak, verified and conflicting labels apart, outcome records separate from labels, quality gates and a deterministic manifest.
  • poison_hunter.py: typed parser with field provenance.
    • 149 rows valid, 1 quarantined (direction to; 2+1 hex characters of similarity).
    • 143 distinct victim-events.
    • The header is aligned, with 2 unnamed trailing fields; it is not "shifted".
  • payments.py: offline payment verifier. It requires a reviewed token, a successful receipt and a matching Transfer log; otherwise the result is unresolved. Fake tokens and spoofed transferFrom are never counted as losses.
  • candidates.py: structural candidate generator, independent of the detector, plus point-in-time event features. Tests cover future events, same-block ordering, input order and unknown history.
  • review.py: export and import of review packets. Packets carry no model score, and label history is kept.
  • planner.py and cryptoguard ml plan-collection: cost estimates that never collect.
  • cryptoguard ml poisoning-report: regenerates every number from local artifacts.

Offline results (ML_POISONING_TABLES.md)

  • Pilot reconstructed exactly. 2,636 requests = 70 smoke/probe + 1,521 yield + 1,044 cost + 1 chain check.
  • Pilot outcomes: 0 confirmed, 52 with no payment observed under complete declared coverage, 46 unresolved, 51 not evaluated.
  • Candidate generator on the 4 recorded incidents. The harmful lookalike is a candidate before the theft in all 4. These incidents were used during detector development and are not untouched data.
  • Background windows: 9 recorded windows give about 0.30 candidates per wallet-day, unlabelled.
  • Planner, under the pilot's conservative assumptions, for 120 wallets × 7 days:
    • free endpoint: 237,360 requests;
    • a provider with 2,000-block log ranges: 111,240. Nonce bisection dominates.

Verification

  • Local: ruff, format and mypy clean (107 files); full backend suite results are in the commit message.
  • CI: see this PR.

Phase 11.2 follow-up: cross-check with Tsuchiya et al. payoffs (2a78397)

Downloaded with approval: payoff_transfers_ethereum.csv only (KiltHub DOI 10.1184/R1/29212703.v1, CC BY-NC-ND 4.0, 482,397 bytes; MD5 matches KiltHub's). It stays local and is never committed. 0 RPC requests.

  • Code.
    • ml/tsuchiya.py: a typed parser that quarantines bad rows. The hash is pinned there rather than in ml/sources.py, so fetch-sources never downloads it unasked.
    • The cross-check joins the file against the Poison-Hunter rows, their pilot outcomes and the incidents, and outputs only aggregates and line numbers.
    • ml poisoning-report runs it whenever the file is present.
  • The file: 1,738 victim-to-lookalike token payoffs (USDT 1,154, USDC 543, DAI 36, other 5; no ETH), in blocks 16.06M–20.21M. The declared affix counts equal affix_match on every row.
  • No pilot contradiction: none of the 52 complete-coverage rows has any payoff in the file.
  • 97 unchecked rows: 76 are within the file's coverage, and none shows a payoff to that row's lookalike.
    • Line 74: the victim paid about $5,032 to a competing lookalike of the same address, about 1.6 days after the planting.
  • Line 87: the row's lookalike had been paid by another victim before this planting, which independently corroborates the row.
  • Labels unchanged. Missing from the file is weaker evidence than "no payment": the file covers only lookalikes the study detected, has no ETH, and ends in mid-2024.
  • Tests: 18 new; the full backend suite passes locally (546).

Phase 11.3: large-scale dataset integration and cross-dataset validation (800e682..76acf7e)

The 2.32 GB attempt archive, README and notebook were downloaded with approval (KiltHub 10.1184/R1/29212703.v1, CC BY-NC-ND 4.0). Size and MD5 match the published values, SHA-256 is pinned, and the gzip CRC was verified. They stay local and are never committed. 0 RPC requests. No model trained.

Ingestion (ml/fetch.py, ml/tsuchiya_archive.py)

  • The archive is a PostgreSQL 16 plain dump: CREATE DATABASE, \connect, one table and one COPY block. It is streamed and never executed.
    • Statements are whitelisted, the schema and COPY columns are checked, lines are bounded, rows are type-checked and rejections counted.
    • Distinct counts are exact with bounded memory, using spill files.
    • A target subset goes to SQLite and is renamed only after a complete pass.
  • Result: 34,905,969 rows, 0 malformed. All ten of the publisher's reference counts reproduce exactly: 17,365,954 poisoning transfers, 1,691,529 transactions, 1,330,948 victims, 6,492,215 lookalikes, and so on.
  • Cost: peak RSS 279–287 MiB, 22–32 minutes per pass, 972 MiB of temporary spill. Two passes gave identical output.

Reconciliation (ml/reconcile.py, ml/cross_dataset.py)

  • Poison-Hunter: 89 of the 105 rows that meet Tsuchiya's 3+4 lookalike rule match an archive transfer exactly (same transaction, victim and lookalike), and the subtype agrees in all 89.
    • The 44 rows below the rule cannot appear by construction. For 37 of them, the archive shows the same victim targeted by other lookalikes.
    • In 4 batched rows the sources disagree on which address is the lookalike.
  • Payoffs: 1,635 of 1,738 have an earlier attempt from the same lookalike to the same victim. The median gap is 19,953 blocks.
    • 62.6% of payoffs had a rival lookalike imitating the same address.
    • In 1,007 linked payoffs from 852 victims, the paid lookalike was the most recent attempt 724 times (324 expected by chance) and the most similar 629 times (483 expected, ties included). These are observational only.
  • Outcome levels are kept separate:
    • attempt: 0;
    • victim: 1 (line 74, a competing lookalike);
    • address before planting: 1 (line 87);
    • campaign: 0.
  • Review queue: 1,469 payoff-linked attempt events, exported locally for independent review. No labels are assigned.

Defects fixed

  • P1: payoff amounts are float4, so 1,644 of 1,738 are approximations (Phase 11.2 reported 41).
  • P1: a killed scan's stale SQLite journal could be replayed into the next run's database.
  • P1: spill files were reopened on every flush (about 5× slower).
  • P1: the similarity comparison ignored ties.
  • P2: spill size was measured before the final flush.

Decision gates

  • Data integrity passes.
  • Event identity, temporal integrity and leakage control are partial.
  • Label validity, independent evaluation, baseline comparability and operational usefulness fail.
  • The archive's categories are the source's own heuristics (every poisoning row meets its 3+4 rule, so lookalike-predicate agreement is automatic), and no source has verified negatives. No valid supervised benchmark is possible yet.

Verification

  • Local: ruff, format and mypy clean (113 files); 622 passed, 4 deselected (gpu/slow), 0 failed.
  • 76 new tests:
    • parser safety (no SQL execution, unsupported statements, truncation);
    • row validation;
    • the spill counter;
    • manifest corruption;
    • killed-run recovery;
    • idempotence;
    • download range handling and integrity;
    • match levels;
    • temporal categories;
    • lines 74 and 87 as regression cases;
    • tie-aware comparisons;
    • review packets;
    • shadow isolation (the pipeline loads neither the database nor the API layer);
    • an end-to-end synthetic report.
  • CI never downloads the archive.

Docs: ML_CROSS_DATASET_VALIDATION.md, generated ML_CROSS_DATASET_TABLES.md, and updates to ML.md, ML_POISONING_DATASET.md, ML_PILOT_AUDIT.md, ML_RESEARCH_PLAN.md, the proposal, CHANGELOG.md and README.md.

Frozen review sample (a273f8a, 84ac3c0)

  • cryptoguard ml freeze-review-sample drew, once and before any review, 60 of the 1,469 payoff-linked packets.
    • One per campaign group (1,395 groups).
    • Strata: subtype × year × rival lookalike (15 strata). Quotas: fake token 24, spoofed transferFrom 24, dust 9, zero-value 3.
    • Keyed SHA-256 ranking, ordered reserves and design weights.
  • It writes a blinded reviewer sheet and a separate unblinding key. Rerunning it only verifies the frozen files; a changed queue or a different draw is refused.
  • The files stay local. SHA-256 commitments for the queue, selection, sheet, key and manifest are in ML_CROSS_DATASET_VALIDATION.md §26. The protocol and pre-specified analysis plan are in docs/ml/review-protocol.md.
  • 11 new tests (633 passed locally). 0 RPC requests; no labels assigned.

Phase 11.4: independent annotation and benchmark validation (5f0fc80..59c8207)

Status: review-ready; no human decision exists yet. 0 RPC requests. No model trained.

Frozen sample

  • All five §26 hashes re-verified from the raw bytes. The selection was recomputed and redrawn identically. No frozen file changed.
  • The design audit (cryptoguard ml review audit) passes every check: unique items, one per campaign and per victim, strata partition, allocation reproduced, reserve order, exact weights summing to 1,395.
  • 1,401 vs 1,395 explained: 1,401 came from an exploratory script that linked only victim, lookalike and transaction. The frozen design also links the imitated address (12 groups merge into 6). The 1,401 figure was never committed.

Protocol amendment 1 (written before any review; sample unchanged)

  • Campaign-level primary estimand. The attempt level is reported as bounds only, because 74 non-representative attempts could never be selected.
  • Design-based intervals. The earlier 0.94 and 0.86 bounds assumed simple random sampling; the all-confirmed design bound is 0.929 overall.
  • A pre-specified collapse rule for the four single-item strata.
  • Structured evidence and exposure fields.

Workflow (cryptoguard ml review package|serve|status|replace|unblind)

  • Per-reviewer packages hold only the blinded sheet.
  • Local review app: loopback only, session token, Host check, strict CSP, text-only rendering. Keyboard, autosaved drafts, resume, and works at phone width.
  • Hash-chained, atomically written reviewer store with finalization.
  • Replacements only for technical inaccessibility, in frozen reserve order.
  • Kappa is reported as undefined (never 0) where it has no value; Gwet's AC1 alongside.
  • Adjudication by a third person is kept separate from the two reviews.
  • The unblinding gate has no override flag and logs every key access.

Benchmark readiness

  • Not a benchmark yet: no human decisions and no verified negatives.
  • A guard refuses training data that touches the review holdout.
  • The negative-data plan (120 wallet-weeks, about 237k requests on the free endpoint used in the pilot) needs a separately approved cap.

Verification

  • Locally: ruff, format and mypy clean (121 files); 695 passed, 4 deselected (gpu/slow), 0 failed.
  • 73 new tests: hash tampering, estimator unbiasedness by enumeration, collapse rule, store crash and tamper cases, blinding (every response searched for key-only values), token and Host checks, gate refusals, replacements, holdout guard.
  • Browser check on a synthetic sample.

Docs: ML_ANNOTATION_AUDIT.md, ML_BENCHMARK_READINESS.md, docs/ml/reviewer-guide.md, protocol amendment 1, and updates to the validation, plan, ML, README and CHANGELOG docs.

Blocked on people: two distinct human reviewers (not model sessions) must review the 60 items.

Phase 11.5: offline hard-negative discovery and benchmark contract (6287f4e..9887446)

Status: offline groundwork done. 8,877 unlabeled candidates; a second 35-item cohort is frozen; no human review yet. 0 RPC requests, 0 downloads, no model trained.

Candidate generator (candidates/2)

  • A counterparty now counts as "chosen" only with a verified wallet signature (P2: unknown-signer transfers could become the imitated address).
  • Generation is a single pass instead of a per-transfer rescan.
  • Output is identical on all 13 recorded windows, and the published tables are unchanged.

Hard-negative pool (ml hard-negative-extract, ml hard-negative-study)

  • 8,651 "uncategorized" archive transfers. This is the publisher's count, from two streaming passes: 734 s and 2,350 s, peak 280 MiB.
  • 226 generator candidates on the recorded wallet windows.
  • Every item is unlabeled_candidate, with structural categories A-H.

Contamination screen

  • Every candidate is checked against every local known positive (archive, payoffs, Poison-Hunter, incidents), with match levels.
  • 3,632 of 8,651 archive candidates (42%) overlap known attacks and are excluded. The 111 potential overlaps are kept as a stratum.
  • Only the archive counts as screening coverage, so candidates after 2024 are insufficient_information.

Typed grouping: never links events through USDT, USDC, DAI or routers. It always links through counterfeit tokens, shared signers and lookalikes.

Matching and separability

  • Strict coarsened exact matching pairs 17 of 1,409 positives; relaxed matching pairs 806.
  • Source separability: value alone separates the frames (AUC 1.000); everything except value gives 0.993. Naive negatives would teach the model the source's own rules.

Second cohort (hard-negative-candidates/1)

  • 35 items, frozen at a clean c68d3a4, with hashes registered.
  • A first draw on an uncommitted tree was set aside before any package was issued. The redraw selected the same 35 items, with a byte-identical sheet.
  • It runs in the same review app. Packages name no cohort, and items carry a neutral title and pre-cutoff context.

Evaluation contract (ml/evaluation.py)

  • Seven layers are kept apart.
  • Features may not carry outcome or label fields; missing values stay None.
  • The metrics refuse to compute precision, FPR or AUC without verified legitimate examples, and never count weak, unknown or unlabeled examples as negatives.

Readiness gates: A and J pass, B passes for implemented features, E passes as identified but not resolved. C, D, F and H are blocked by missing evidence, G fails, I is not yet evaluated. Supervised training is not justified.

Verification

  • Locally: ruff, format and mypy clean (130 files); 736 passed, 4 deselected, 0 failed.
  • One earlier full run had a lease-concurrency failure under parallel load; that test passed 3 of 3 times alone, and no database code changed.
  • 41 new tests. The wheel contains the new modules and no data files.

Docs: ML_HARD_NEGATIVE_STUDY.md, generated ML_HARD_NEGATIVE_TABLES.md, readiness gates in ML_BENCHMARK_READINESS.md §8, and updates to the annotation audit, plan, ML docs, README and CHANGELOG.

Blocked on people: two human reviewers for both cohorts (60 + 35 items, about 16 reviewer-hours, no RPC).

Phase 11.6: human validation readiness (3774c70..4fc9d94)

State: REVIEW_READY: HUMAN ANNOTATION PENDING. 0 finalized human submissions, 0 of 95 real items reviewed, 190 planned decisions. 0 RPC requests, 0 downloads, no model trained.

Integrity

  • Both frozen cohorts re-verified byte for byte.
  • Cohort B's superseded first draw audited: same items, reserves, strata and sheet bytes; only 3 screening statuses changed; no package had been issued.

Evidence packets (ml review build-evidence, protocol amendment 2)

  • Deterministic and offline. They read the sheet, never the key, and contain no source flags, intended address, payoffs or similarity scores.
  • Strictly pre-cutoff. Metamorphic tests check that future rows and labels never change them.
  • Built at a clean 240ba9b and registered by hash. Cohort A: 60/60 candidate transfers found, median 22 earlier wallet rows. Cohort B: 19 archive items have no local history.
  • On the real served state, 0 of 60 payoff transactions and no source labels appear.

Review app

  • An evidence panel with coverage warnings, a cutoff banner and a checklist.
  • Reason codes and evidence citations.
  • New exposure fields: later payment seen, third-party-label influence, offline-panel use.
  • Sessions expire after 12 hours.
  • A synthetic training cohort that can never be unblinded.
  • Checked in the browser on synthetic data, including phone width.

Annotation quality

  • review check-submission reports every problem in a submission.
  • review agreement needs no key: kappa (undefined, never 0), AC1 and per-reviewer rates.

Benchmark

  • A label policy with seven statuses and strict binary eligibility.
  • An inactive pre-registered experiment spec: it needs 30 reviewed labels per class from 5 campaign groups each.
  • FPR power planning: 73 reviewed legitimate events for FPR below 5% with 0 errors, more with clustering.
  • Both cohorts are one protected holdout, and source and dataset identifiers are refused as features.

Reliability

  • The lease-contention flake was not reproduced (16 rounds under CPU and disk load).
  • The mechanism found: a locked DB raised a raw OperationalError. It now raises a retryable LeaseBusyError, with diagnostic and deterministic tests.
  • candidates/2 suffix bucketing (exact): 10,000 transfers in 0.13 s instead of 13 s, identical output.

Gates:

  • PASS: A integrity, G temporal correctness, K isolation.
  • PASS WITH LIMITATIONS: B evidence, C independence, F source bias, H splits.
  • BLOCKED BY MISSING HUMAN EVIDENCE: D, E, J.
  • FAIL: I statistical adequacy.

Verification

  • Locally: ruff, format and mypy clean (136 files); 764 passed, 4 deselected, 0 failed.
  • The wheel contains the new modules and no data files.

Docs: ML_HUMAN_VALIDATION_READINESS.md, docs/ml/reviewer-handoff.md (invitation draft, eligibility, workload assumption, maintainer checklist), protocol amendment 2, and the updated reviewer guide.

Next: two independent human reviewers do the training package, then both cohorts. No new data, RPC or authorization needed.

Phase 11.7: evidence completion and review hardening (1d6f2a0..3a2f94b)

State unchanged: REVIEW_READY: HUMAN ANNOTATION PENDING. 0 finalized human submissions, 0 of 95 items reviewed. 0 RPC requests, 0 downloads, no model trained.

Evidence

  • An offline recovery pass over the local archive (1,369 s, 256 MiB) gives all 19 Cohort B archive items that had no local wallet history some pre-cutoff rows (median 0 → 18). The rows are still source-selected.
  • Packets v2 (amendment 3, before any review) count same-block rows of unknown order and word coverage explicitly, so missing history never reads as novelty.
  • Leak checks on the real packets: no payoff transaction, no source label and no post-cutoff row.
  • Remaining gap: signers unknown for 85 items, receipts for 95, 28 unreviewed tokens. No local source has them. About 292 RPC calls could close it; this is a proposal only.

Diagnostics (label-free, aggregate)

  • On signer-less archive data, candidates/2 re-emits 6 of 1,409 source positives (0.4%), or 51 (3.6%) with an optimistic signer assumption. Its main planting rule needs the signer.
  • PTXPhish vs Tsuchiya: 207 of 214 PTXPhish poisoning transactions are Tsuchiya payoffs. Attack methods agree for 81.5% of those linked to an attempt, and for 11 of 11 linked Cohort A items. This corroborates losses and methods, not the plantings.
  • Generator invariance holds on 13 of 13 recordings. Scalability is preserved.

Statistics: exact FPR bounds by sample size. 35 negatives cannot show FPR below about 8%; a 1% claim needs about 300 effectively independent negatives.

Hardening

  • The review server refuses negative or non-numeric Content-Length (a negative one read until the client closed) and foreign Origins.
  • New tests: an independent reference implementation of candidates/2, an end-to-end synthetic review workflow with failure injection, and a corrupt lease database.

Reproducibility

  • ml verify-research reports every source, derived file, frozen cohort and evidence set as PASS. Human review and experiment activation are BLOCKED.
  • The experiment spec is exported to docs/ml/experiment-spec.json, with fairness rules, label stages and a source-proxy-free ablation.

Gates:

  • PASS: A integrity, C historical correctness, K isolation, L engineering.
  • PASS WITH LIMITATIONS: B evidence, D independence, G source bias, H splits.
  • BLOCKED BY HUMAN REVIEW: E, F, J.
  • FAIL: I statistical adequacy.

Verification: locally, ruff, format and mypy clean (138 files); 776 passed, 4 deselected, 0 failed.

Docs: ML_EVIDENCE_COMPLETION.md, protocol amendment 3, and updates to the reviewer guide and handoff.

Next: two independent human reviewers. Optionally, approve the small signer and receipt request first.

Next experiment: independent review of a stratified sample (about 60) of the payoff-linked review packets, plus matched legitimate look-alike negatives. The negatives need victims' wallet histories, which means a new, separately approved RPC cap sized with ml plan-collection. Details: ML_CROSS_DATASET_VALIDATION.md §25.


Phase 12.1: temporal and graph signals for lookalike prioritization

Commits: 999794a protocol → 12f09a1 code and pre-outcome fixes → b552c2d → 3153dcf report.

The study was pre-registered in docs/ml/protocol-12.1.md. Fixes and deviations are in docs/ml/protocol-12.1-deviations.md; F1, F2, D1 and D2 were committed and pushed before any outcome was computed.

Task: retrospective and payoff-conditioned. For 1,068 victims who later paid one of k ≥ 2 source-flagged lookalikes, rank the candidates at the block before the payoff, using only point-in-time data. This is not detection: no precision, FPR, recall or AP is estimated.

Primary results (test split, 428 episodes, 427 groups; top-1 against the unchanged production similarity score B0, 0.300; random 0.199):

Test Method Δ top-1 [95% CI] Holm p Decision
P-H1 B3 recipient history −0.053 [−0.096, −0.014] 0.007 reversed
P-H2 T0 recency +0.318 [0.262, 0.372] 0.0004 supported
P-H3 G1 graph reuse −0.094 [−0.132, −0.057] 0.0004 reversed (G1 equals random)
P-H5 H_fixed hybrid +0.162 [0.123, 0.203] 0.0004 supported, through its temporal component only

Checks:

  • Coverage symmetry: paid and rival lookalikes are 100% targeted, and all their planting rows are present. The old subset covered 0.2% of rivals, a selection leak that is now avoided.
  • Leakage: adding future rows produced 0/100 mismatches.
  • Shuffle controls: both G1 shuffles score at random.
  • Negative control: NC is slightly anti-informative, a token and campaign confound that is documented.
  • Frozen items: the 95 are excluded. Rows of their wallets never become graph edges. One test episode overlaps through an entity, and without it every decision is unchanged.
  • Robustness: recency holds with the cutoff a day earlier (0.649 against B0's 0.310), in every year and k bin, and among the episodes whose paid lookalike last planted more than 30 days earlier (0.487 against random's 0.205; post-hoc).
  • Learned model (exploratory): conditional logit 0.591, which does not beat T0 alone.

Fixed:

  • rows of frozen wallets entered the graph index;
  • the archive scanner maintained indexes during inserts, journalling gigabytes. The first pass died at 32%, and its partial output was discarded.

Cost: archive pass 58 min at 344 MiB; study 2 h 16 min at 744 MiB. The 2-minute experiment budget was overrun (D3) because of graph lookups on a shared HDD. 0 RPC requests, no downloads.

Validation: ruff, format and mypy clean (140 files); 816 passed, 4 deselected. CI on 12f09a1 failed only at Format; the fix is in b552c2d.

Report: ML_TEMPORAL_GRAPH_RESEARCH.md. Nothing is integrated, the production detector is unchanged, and no warning is suppressed.

Next experiment (not started): pre-register recency-first ordering of lookalike warnings on a population not used here.


Phase 12.2: is recency a source-selection artifact?

Commits: 03f1c1d protocol (frozen before any 12.2 outcome) → 623b36d preload and analysis code (committed before it ran) → ff9f2e3 → c0e1012 report.

Status: every archive result re-examines the episodes whose outcomes Phase 12.1 saw. These are retrospective sensitivity analyses, not independent validation. No untouched outcome population exists locally: the independence gate is blocked by data. Top-1 is retrospective ranking among source-flagged candidates; it is not precision, recall, FPR or a prevented loss.

Test Population Baseline New Δ top-1 [95% CI] Holm p Decision
H1: the source's confirmation rule ("poisoning between the intended and the payoff transfer") applied to rivals too 1,059 episodes, 1,050 groups B0 0.300 T0 0.682 +0.382 [0.347, 0.417] 0.0002 survives (attenuation 0.2%)
H2: ordering the unchanged production detector's own warnings 1,057 episodes, 1,049 groups severity, then similarity: 0.267 severity, then recency: 0.502 +0.235 [0.208, 0.263] 0.0002 survives
H3: recorded incidents (descriptive) withdrawn, see Phase 12.3 3 with ≥ 2 warnings first in 1 of 3 first in 3 of 3 — — n = 3
  • Manipulation check: 100% of paid lookalikes satisfy the rule, but so do 99.4% of rivals. As written, the rule is not selective. The stricter reading (95.9% of paid, 61.1% of rivals) still leaves +0.339 [0.300, 0.379].
  • Robustness: recency holds under symmetric 30-, 90- and 180-day lookbacks, without immediate copies, with ±7-day timestamp jitter, and in every year, k bin, activity tertile and token class. It also holds in the newest-candidate-age bins. 96% of episodes are spoofed-transfer poisoning.
  • Controls: the within-episode permutation scores at random (0.227), and oldest-first scores 0.057. The negative-control anomaly is mostly explained by token-class mixing and its correlation with recency (median within-episode ρ −0.44). Within one token class it is close to random.
  • Operational fidelity: the production detector warns on 99.2% of both paid and rival lookalikes in the archive replay. That replay has no signers and is source-selected.

Experimental ranker ml/warning_rank.py (poisoning-warning-rank/1):

  • orders warnings by severity tier, then by the latest planting signal at or before the cutoff;
  • never removes, re-tiers or modifies a warning (tested);
  • is not imported by any production path; off by default.

Performance:

  • Profile: 96 ms per lookalike lookup and 512 ms per transaction lookup (one random page read per row on a shared HDD), against 13 s to scan all 1.3M rows.
  • Fix: a single-pass preload that reproduces the full Phase 12.1 report exactly (result hash 1dbc763f7058f8c4).
  • Result: 8,157 s → 179 s, 744 → 485 MiB. The whole Phase 12.2 study takes 38 s.

Validation:

  • ruff and format clean; mypy clean (142 files); 832 passed, 4 deselected.
  • Frozen cohorts pass ml verify-research, with 0 human submissions.
  • 0 RPC requests, no downloads. No change under detectors/, services/ or risk/.

Deviation D1: H2 was not repeated without the 1 overlap episode. Its effect is at most 0.001.

Next experiment (not started): pre-register recency on the 13,683 unconfirmed archive payoffs. They were never examined and never confirmed. It needs two offline passes (about 2 hours), with no RPC.

Phase 12.2 addendum: the source's unconfirmed payoffs

Commits: 8590366 protocol (frozen before either pass) → 89998d5 code (committed before any U row existed) → b3f66ae results.

  • Passes: two offline passes. The first (12 min) found exactly 13,683 unconfirmed rows. The second (22 min) collected 1,362,584 rows touching the 507 U victims. 0 RPC requests.
  • Result: inconclusive by the pre-registered rule. Only 7 of 507 victims are rankable:
    • recency T0 scores 0.714, B0 0.024 and random 0.256;
    • p = 0.064, with 7 groups;
    • all 7 paid lookalikes fail the source's confirmation rule.
  • Why so few (post-hoc, labelled): in 488 of the 499 excluded victims, the paid address never planted to the victim at all, though in 489 cases it imitates an earlier recipient. The confirmation step therefore mainly requires a prior planting by the paid address, which the study's eligibility already requires symmetrically. It doesn't select on rival timing.
  • Validation: ruff, format and mypy clean (143 files); 836 passed, 4 deselected.
  • Still not independent validation. The remaining test is newly recorded incidents, which need an approved RPC budget.

Phase 12.3: independent incident benchmark (data-limited)

Commits: f0e4dc1 audit and protocol (frozen before discovery) → 57273fd benchmark code (committed before it ran) → f3477f5 cohort-exclusion fix → c9e328e report.

  • Phase 12.2 follow-up audit:
    • the attrition is a complete partition (616 senders → 507 victims → 499 + 1 + 7);
    • B0's 0.024 is (1/6)/7, under the same tie-averaged metric as recency;
    • the exact p is 0.0625 (128 patterns), and the sign test gives 0.219;
    • the decision is unchanged.
  • Discovery (bounded: 7 searches, 7 page reads): 10 candidate incidents.
    • The only new case with complete verbatim identifiers (Aug 2026, counterfeit USDT) is after the local archive ends. It needs an RPC recording of about 500–1,400 requests, which is not authorized.
    • The other new candidates lack identifiers.
  • A protection defect, found by the overlap audit:
    • frozen Cohort B holds 2 items in each of the 4 recorded incident windows;
    • frozen addresses appeared among the competing warnings in 3 incidents;
    • 3 of the 9 background windows are protected.
    • Phase 12.2 H3 ("3 of 3") and E14 are withdrawn (amendment). No label existed and nothing was tuned.
    • Exclusion is now enforced in every replay, and run computes only the cases verify admitted.
    • A corrected 12.2 re-run shows every archive result (H1, H2, E1–E13) unchanged.
  • Delivered: cryptoguard ml incident-benchmark verify / run / report. It is offline and protocol-bound, rejects oracle candidate lists, and is tested end to end on a synthetic incident.
  • Classification: data-limited. No Level I or II case is evaluable, and the 4 Level III cases are excluded.
  • Validation:
    • ruff, format and mypy clean (144 files); 846 passed, 4 deselected;
    • frozen cohorts PASS verify-research, with 0 submissions;
    • 0 RPC requests, no downloads.
  • Next (not started): an approved, capped RPC budget to record about 10 newly sourced incident windows, pre-registered before recording. That is about 7,000–14,000 requests, measured.

Incident recording: Stage 0 (61ad1af) and Stage 1 pilot (0aa1892)

  • Stage 0 (0 RPC requests):
    • Fixed: replay record, sample-background and record-background had no total request cap. They now reserve every attempt, retries included, in the durable ledger. They require --ledger and --cap, and fail closed with no partial fixture.
    • Added: replay locate, ml incident-benchmark prepare, and Level I bookkeeping with an on-chain identifier check.
    • The pilot case was pre-registered (preregistration).
  • Stage 1 pilot (result):
    • Requests: 475 of an approved 2,000 (locate 3 + record 472) on eth.drpc.org, with no restart. The 1,525 left over do not carry over.
    • Verification: the Aug 2026 counterfeit-USDT case is the first Level I case. The harm transfer and the planting are confirmed on chain, the planting is inside the window, and there is no overlap with any reference set or frozen cohort.
    • Detector: on pre-theft data only, it recovered the theft recipient as a candidate and warned 48 blocks (576 s) before the theft.
    • Ranks: k = 6 warnings, all lookalikes of the same intended address. OP1 (recency) rank 2.0, OP0 4.0, random 3.5.
    • Descriptive only. No rates, and no claim of independent ML validation. Under the frozen §10 rule the labels are G 1 of 1 and H PASS WITH LIMITATIONS (n = 1). This was first reported as "not decided" and is corrected in 95a7740.
    • Limitations:
      • a single public source;
      • 3-day history, with pre-window history unobserved;
      • delayed-cutoff variants have k = 0, because the swarm arrived within 66 blocks of the harm.
    • Deviation: a light unrelated Python job was running. The user replaced the idle-machine rule with a bounded resource preflight.
  • Validation:
    • ruff and format clean; mypy src clean (145 files);
    • 859 passed, 4 deselected;
    • CI on 61ad1af and 0aa1892 passed (9 of 9 jobs).
  • Next (not approved): Stage 2, 9 user-sourced cases under a 14,000 cap.

Incident recording: Stage 1 audit and Stage 2 preparation (95a7740, no RPC)

  • Audit:
    • CI for 0aa1892 passed (9 of 9 jobs).
    • The lead time is measured from recorded block-header timestamps: 48 blocks, 576 s.
    • The pilot case is frozen by a regression test that pins its hashes and its result.
    • The Gate G and Gate H labels are corrected to the frozen §10 rule.
  • Discovery (bounded: 8 searches, 12 page reads): no new case with fully verbatim identifiers.
    • Three near-misses were deduplicated offline against every reference set, including both frozen cohorts. None overlaps.
    • The Pink Drainer case lies in the compressed archive's range, which was not scanned.
  • Shortlist (doc):
    1. Scam Sniffer, $763k, Feb 2025: two full addresses.
    2. Webacy, 6.88M USDT, Sep 2025: a full victim, prefix-only lookalikes.
    3. Pink Drainer: deferred (native ETH, possible archive overlap, circular resolution).
  • Budget (proposed, from measured costs; not approved):
    • Stage 2a: per-case caps of 2,300 and 3,540, total 5,840, about 2,250 expected;
    • Stage 2b (user-sourced): 14,000, about 6,800 expected.
  • Statistical review:
    • Ten cases are a feasibility threshold only. Sign-test power at n = 10 is 0.15–0.74 for true win rates of 70–90 %.
    • Proposed pre-outcome amendment: DESCRIPTIVE below 6 untied cases, a cluster-level sign test, normalized ranks, censored lead times, and a count of cases dropped at the cap.

Incident recording: Stage 2 Step 0 (fdffc05, no RPC)

  • Amendment 12.3-A1 (doc), frozen before any Stage 2 request:
    • R1, identifier resolution: a frozen per-case on-chain rule that uses only the source's addresses and dates. No similarity is scored, and attacker-signed "from victim" transfers are never taken as the theft.
    • R2, Gate H: DESCRIPTIVE below 6 untied clusters, replacing PASS WITH LIMITATIONS. Cases sharing a planting signer form one cluster with one vote, and the sign test is exact and one-sided.
    • R3, added measures: normalized ranks, a censoring flag, and a count of pre-registered cases not recorded.
    • Level I is summarized with and without resolved cases.
  • Tools:
    • replay find-transfers: under the ledger and cap; finds UTC-day block bounds by header-timestamp bisection; reads receipts of the first 10 matches.
    • ml incident-benchmark resolve;
    • verify and prepare merge candidates.json and stage2-resolved.json.
  • Unchanged: the detector, OP0 and OP1. The frozen Stage 1 case reproduces exactly, and under A1 it is DESCRIPTIVE (normalized ranks: OP0 0.6, OP1 0.2).
  • Stage 2a pre-registered (doc): Scam Sniffer $763k and Webacy 6.88M USDT, with caps of 2,400 / 3,600 (6,000 total). Approved and run afterwards; see the next section.
  • Validation: ruff, format and mypy src clean; 866 passed, 4 deselected. CI passed on 95a7740.

Incident recording: Stage 2a result (72cfaf3, 1,433 of an approved 6,000 RPC requests)

  • Scam Sniffer $763k (Feb 2025): the harmful transfer was resolved by the frozen rule (275 requests), then the window was recorded (645).
    • It is Level I, tier A, with no overlap.
    • The detector missed it (post_incident_only). The theft recipient's first record in the window is the theft itself, while two other lookalikes of the same reference address were warned before the harm.
    • This is a coverage miss: the planting channel was not observed. An unrecorded incoming native-ETH dust transfer is a hypothesis only.
    • The case is frozen by a hash-and-result test.
  • Webacy 6.88M USDT: eth_getLogs was rejected twice (72 + 441 requests), so the stop rule made it not evaluable: RPC. No third attempt and no other endpoint were used.
  • Level I (pilot + this case):
    • 2 tier A cases, warned before the harm in 1 of 2, 1 rankable;
    • Gate H is DESCRIPTIVE under A1 (PASS WITH LIMITATIONS under the original §10).
    • No rates, and no claim of independent ML validation.
  • Resources: a bounded resource preflight passed before each case; no unrelated process was touched. 4,567 requests are unused and do not carry over.
  • Validation: ruff, format and mypy src clean; 867 passed, 4 deselected. CI passed on fdffc05.
  • Result.

Phase 12.4: observation completeness and candidate discovery (3a79b74..53ddd95, 0 RPC)

Commits: protocol frozen first (3a79b74), then the implementation committed before the study (3917957), then the report (53ddd95). Report.

  • The Stage 2a miss: cause not identifiable from local data. The paid address appears only in the theft records.

    • observation/1 never observed inbound native ETH, zero-value native, internal transfers or ERC-1155.
    • It also discarded ERC-721-shaped and malformed Transfer logs it had fetched, without keeping their counts.
    • Native dust remains a hypothesis. Two requests would discriminate (proposed, not issued).
  • observation/2, opt-in (replay record --observation 2):

    • native ETH received, by exact balance bisection, for plain EOAs;
    • unattributed credits, with the sender unknown and never invented;
    • ERC-721 records and malformed-log counts;
    • per-category coverage: complete / partial / not_collected / unsupported / …

    Existing fixtures keep their bytes and hashes.

  • Shadow poisoning-candidate-discovery/1:

    • C0 is frozen;
    • C1 is C0's rules over every observed class. On synthetic cases it recovers native-dust and ERC-721 lookalikes that C0 cannot see.
    • C2 adds abstention and a payment-time screen. The screen flags both known thefts. Those are development cases, so this is not validation. It flags 0 of 12 screened unlabelled payments, which is not an FPR.
  • Latent defect: wallet-history/1 reported unobserved inbound activity as zeros (109 values). Fixed in the versioned wallet-history/2-scoped; no published number used them.

  • Hypotheses:

    • H1, H3, H4 and H6 supported;
    • H2 supported on synthetic cases and blocked by data on real windows (no /2 window exists; there C1 = C0);
    • H5 not evaluated, as pre-declared.
  • Unchanged: the detector, its findings, OP0/OP1 and C0. The frozen cohorts and both Level I results are unchanged.

  • Validation:

    • ruff, format and mypy src clean (149 files);
    • 893 passed, 4 deselected;
    • 26 new tests: synthetic cases A–L with hand-written oracles, invariance, a mock-node recorder end to end, and detector isolation.
  • Study: 0.17 s, peak RSS 68 MiB, 0 RPC, 0 downloads.

  • Q1 (99f553b, 2 approved RPC requests): the paid address's nonce was 0 before the window and 1 before the theft.

    • It signed exactly one transaction ever before the theft, inside the window.
    • That transaction emitted no ERC-20 Transfer with the victim.
    • Its content is unknown: a native send, an NFT/1155 log, or something unrelated.
  • Q1b (d9ca60c, 17 approved RPC requests: 1 failed while outbound connectivity was down, 16 on the one restart; receipt skipped at the cap): the miss is explained.

    • The transaction: the paid lookalike's only pre-theft transaction was a native ETH dust transfer, 10¹² wei, to the victim at block 21,890,540. That is 357 blocks (4,320 s) before the theft and before both fake-token plantings.
    • Classification: a confirmed observation/1 omission (inbound native ETH).
    • Reconstruction: in memory, with the frozen fixture unchanged, C1 flags the paid address 357 blocks early; C0 does not.
    • Not validation: the record was found by an outcome-directed query, so this is a development-case regression.
    • Still unchanged: the production detector does not read native inbound.
  • Next (not approved):

    • an observation/2 re-recording of this window (about 1,100 requests), to show the wallet-centric path finds the same transfer blindly;
    • any production use of native inbound, which needs its own evaluation, including the zero-value volume risk.

Phase 12.4 final validation of observation/2 (368f652, 0 RPC)

  • Balance-bisection audit:
    • Fixed: success was inferred whenever sums matched exactly. observation/2 now reads a receipt for every nonzero inbound.
    • 12 adversarial tests: several inbound transfers in one block, an inbound then an equal spend, an internal credit beside an inbound, reverted and successful inbound together, the reverted-plus-equal-credit trap, a missed own block, truncation, own transactions at the window edges, a self-transfer, out-of-window inbound, the minimum cost, and a seeded randomized oracle.
  • Zero-value floods: in C2, the warning-facing variant, native inbound counts only when its sender imitates the wallet's own reference, and there is one candidate per lookalike. In a test, 1,000 zero-value strangers produce 0 candidates. C1 stays a coverage measurement. The production detector reads no native inbound.
  • replay record-window: outcome-blind recording from the wallet, chain and block window only.
  • Blind observation/2 replay (c090814, 1,299 of an approved 2,500 RPC requests):
    • Requests: 596 on a first attempt stopped by a provider rate limit, with no fixture written, then 703 on the one restart.
    • Input: only the victim, chain and window.
    • Result: it independently recorded the native dust planting, with its identity, sender, block, index, value and success read from the receipt. V1–V5 all passed.
    • C0 finds the 2 fake-token lookalikes, the same as on the frozen fixture. C1 adds exactly the paid address, 357 blocks (4,320 s) before the theft. C2 keeps it. The production detector output is identical.
    • Classification: a development-case regression, not validation.
  • Decision: observation/2 is sufficient for offline research within its scope: nonzero native inbound to wallets without code.
    • Before production: untouched incidents recorded blind, a C2 volume study on /2 background windows, and a separately approved detector change.
    • Still unverified: zero-value native, internal transfers, ERC-1155, wallets with code, and busy-wallet cost.
  • Validation: ruff and mypy clean; 909 passed, 4 deselected.

Phase 12.5: ML-driven candidate discovery and evidence-aware ranking (16586a5..82d54a3, 0 RPC)

Commits: protocol frozen first (16586a5), code committed before the outcome run (0dd8a23), a performance fix with identical outputs (8fbc3a1), then the report. Report.

  • Primary pre-registered ML test, not supported. It predicts a victim's next planting mechanism from their planting history: a self-supervised proxy on 1,067 archive episodes, using Phase 12.1's temporal group split.
    • The fixed logistic regression scores test log loss 1.945, against 0.200 for victim-prefix frequency. Its macro-F1 is higher (0.323 against 0.284).
    • Cause: strong temporal covariate shift. The 90th-percentile planting history is 163 in training and 2,481 in test, and count features extrapolate. 91 % of the loss comes from 17 % of test rows.
  • Semantic channel (exploratory, development split): −0.009 [−0.022, +0.005] against recency, so no gain. Recency reproduces 12.1's development score exactly (0.730).
  • MAD temporal anomaly: analytically equivalent to recency (1,056 of 1,056 episodes).
  • Development cases: recency puts the native-dust paid address 3rd of 3, while similarity puts it 1st. The pilot is the reverse. n = 2, descriptive only.
  • Not forced:
    • PU learning, because positives are one per episode by construction and SCAR is violated;
    • wallet self-supervision, because there are about 100 events;
    • graph models, because 12.1 was null and the wallet-centric data have 0 links.
  • Added: poisoning-candidate-features/1, with value/status pairs that are never zero for unobserved data, and an offline shadow ranking poisoning-candidate-ranking/1, research CLI only.
  • Fixed: a quadratic scan. Ranking 1,000 flood candidates went from 424 s to about 2 s, with identical outputs.
  • Robustness: losing signer information removes every spoofed-transfer candidate. No transform ever adds a candidate.
  • Validation: ruff, format and mypy src clean; 924 passed, 4 deselected. The study reruns in 27 s at 336 MiB peak RSS. The frozen cohorts are unchanged.
  • Next (not started; needs approval and user-sourced incidents): pre-registered B4-vs-B3 ranking on at least 10 untouched observation/2 incident windows, with a cap of about 15,000 RPC requests.

Phase 12.6: candidate reliability and signer provenance (c060ccc..f4caf5a, 0 RPC)

Commits: protocol frozen first (c060ccc), code committed before the measured run (8e59c9d), then the report. Report.

  • Signer audit: real recordings have complete outgoing-signer coverage, 18 of 18 with 0 skipped. Phase 12.5's "signer loss removes every spoof" came from masking.
  • R-SIG: an outgoing event absent from a code-less wallet's complete signed set (nonce bisection) was not signed by the wallet. The signer's address is never guessed.
    • It matches the looked-up signer in 18 of 18 cases, including 8 spoofs.
    • With every signer masked, the real windows lose 0 candidates.
  • candidate-evidence/1 (research):
    • one group per (chain, victim, lookalike) that keeps every record: the pilot's 9, where C2 kept 6;
    • typed provenance, where the event sender is never taken as the signer;
    • non-probabilistic levels, where missing data lowers support and never raises suspicion.
    • Under S1–S5 masking: 0 unsafe inferences, against 5 for C1, which calls an unknown token untrusted. No candidate is ever added and no level is ever raised.
  • 12 adversarial scenarios:
    • 1,000 zero-value strangers produce 0 groups;
    • one strong candidate stays rank 1 among 2,001;
    • an unknown-signer spoof that C1 misses is recovered;
    • the bounded summary discloses totals, truncation and hidden identities, and deletes nothing.
    • Cost: linear, 10,000 groups in 1.8 s (16.6 MiB traced).
  • H5 failed (pre-registered): under cheap verified dust spam, a support-first order keeps 3 of 6 real pilot candidates in the top 10. Similarity keeps 6 of 6 and recency 0. Support is not suspicion; the support-first order is not adopted.
  • H6 (exploratory, development split only): log-scaled proxy features beat raw ones, log loss 0.238 against 0.271 [CI −0.068, −0.006]. The sub-split has only mild shift, so the Phase 12.5 conclusion stands.
  • Production: the detector is unchanged. R-SIG is eligible for a separately approved production change; it is not integrated here.
  • Validation:
    • ruff, format and mypy src clean;
    • 950 passed, 1 failed, 4 deselected, in an 18-minute run on a loaded machine. The failure was a load-sensitive lease test, untouched by this phase, that passes 3 of 3 alone.
    • The cohort hashes are unchanged.

Phase 12.6.1: signer-recovery safety, bounded summaries, research reliability (5a5e876..5e37788, 0 RPC)

Commits: code, tests and amendment (5a5e876), then the report (§30–§39). The study was run on 5a5e876 itself: 92 s, 623 MiB peak.

  • Correction to 12.6: R-SIG proves only that the wallet did not directly sign a transaction, never that it did not authorize the movement (allowance, permit, EIP-7702 delegation).
    • Value-moving foreign-signed transfers are now foreign_initiated_out with authorization = unknown; only zero-value ones are spoofed_out.
    • Real windows: 6 value-moving untrusted-token events are relabelled; groups and levels are unchanged. C1 still makes 6 such spoof claims.
  • absence_guard: the inference requires a complete, count-consistent, nonce-contiguous signed set, and code 0x at every sample up to the cutoff (no EIP-7702 designator or contract code). Otherwise the signer stays unknown.
    • 20 conditions are tested.
    • R-SIG still agrees 18 of 18 on the real windows; the guard allows it on 9 of 9.
  • Bounded summary: 6.8 KB at 1,000, 10,000 and 100,000 candidates, where the 12.6 summary was 915 KB at 10,000. Digest-checked page() and group_records() reach all evidence; nothing is deleted.
  • Support is not suspicion: the presentation order (affix, recency, address) reads no support level.
    • Masking receipts, tokens or signers moved 0 kept candidates on the real windows.
    • H5 is reproduced unchanged. The new order is not validated: the pilot is development data.
  • Adversarial suite with 10,000-event floods:
    • the strong candidate is rank 1 in 8 of 9 scenarios, and reachable by page in all 9;
    • output is deterministic, at about 2 s and 17 MiB per build;
    • with equal affixes, recency decides (rank 10,001; still listed and reachable).
  • Lease test: the 12.6 failure could not be attributed, because only the test's name was logged. I fixed three test defects: ambiguous child exit codes, an unbounded join, and wall-clock expiry checks. A new boundary test confirms no instant has two owners. The test passed 15 of 15 runs under CPU contention; production lease code is unchanged.
  • Validation:
    • ruff, format and mypy src are clean;
    • 999 passed, 0 failed, 4 deselected;
    • uv build and the artifact inspection are OK;
    • the cohort hashes are unchanged;
    • CI #49, run 42596942020: 9 of 9 jobs passed.
  • Production: the detector is unchanged. Integration is blocked by:
    • no independent validation;
    • unobserved authorization;
    • intent-settlement false positives of unmeasured volume;
    • the detector's own spoof rule, which needs the same authorization split.

Phase 12.7: adversarial candidate exposure and robust top-K selection (9263dba..073019c, 0 RPC)

Commits: protocol frozen first (9263dba), code committed before the measured run (7ac195f), then post-hoc checks (541c2d2), the post-hoc P1b fix (0968ff8) and the report. The rerun at 0968ff8 reproduces every registered number exactly.

  • P1, work-weighted group-discounted selection (research only): priority 4·affix − 4·j per victim-reference bucket, with keyed-hash ties. It never reads time, the support level or the oracle.
    • Provable group displacement bound, independent of the decoy count: 0 violations.
    • Every selector is a permutation, so nothing is deleted; the bounded summary adds the order label, a config hash and bucket sizes.
  • Pre-registered synthetic grid (16 families × decoys 0–10,000 × K 1–50): H1 supported.
    • Mean Exposure@K: P1 0.773, B0 0.525, recency-first 0.304. P1 is ≥ B0 in 16 of 16 families.
    • H2: target-group coverage never below B0 (0 of 480 cells).
    • H3 confirmed: weaker floods never displace the target under B0 or P1, while recency-first falls at m ≥ K.
    • H4: the 10-seed tolerance was not met; a 200-seed post-hoc check matches K/(m+1).
  • Negative controls exposed benchmark bias. Oldest-first (0.986) and mechanism round-robin (0.839) each fall to 0.111 once an adaptive attacker plants older decoys or reuses the target's mechanism (post hoc). P1 is unaffected.
  • P1b (post hoc): P1's tie rule favoured flooded buckets; bucket-hash ties fix it, giving 0.813.
  • Identifiability limit: an equal-affix flood on the same reference still hides the target's address (≈ K/(m+1)), but not the reference bucket.
  • Learning to rank (12.1 development split; test split never computed): +0.289 top-1 over B0, but +0.029 over recency alone (CI includes 0), and −0.169 adversarially. It learned recency (weight 2.42). Gate G FAIL.
  • Development cases: blind ScamSniffer rank 1 under B0, P1 and P1b; pilot rank 3 (B0) vs 3–5 (P1, seed-dependent). Development-case analysis, not validation.
  • Cost: P1 orders 100,000 groups in 3.8 s (29 MiB traced); the summary stays at about 7.7 KB; the whole study takes 196 s at a 432 MiB peak.
  • Validation:
    • ruff, format and mypy src are clean;
    • 1,051 passed, 0 failed, 4 deselected;
    • the package build and artifact inspection are OK;
    • the cohort hashes are unchanged.
  • Independent validation: BLOCKED BY DATA. The production detector is unchanged.
  • CI: #50 failed in the backend type check on Ubuntu (ctypes.windll is absent from Linux typeshed). Fixed in 073019c with a sys.platform guard; CI #51 (run 42616989227) passed 9 of 9 jobs.

🤖 Generated with Claude Code

pRstislav and others added 30 commits October 29, 2026 08:13
Experimental, optional 'ml' extra (scikit-learn, LightGBM, pandas,
pandera, openpyxl); core install unchanged.

- sources: three public label sets pinned to commits with SHA-256
  (PTXPhish NDSS'25, Poison-Hunter CCS'24, Forta). The two without a
  license are fetched locally on request, never redistributed.
- labels: PTXPhish's wide sheet parsed into one pandera-validated row
  per transaction; address lists parsed for the data card only.
- collect: deterministic stratified sample; budgeted, resumable chain
  collection (tx, receipt, sender nonce and target code at the previous
  block) with a hard cap on total RPC attempts, recorded after every
  transaction.
- features: point-in-time transaction features; block number and raw
  identifiers never used as features.
- dataset/splits: validated table with input-hash manifest; study
  window where both classes occur; time-ordered splits; per-account
  purge with hubs from training rows only.
- train/report: trivial, rule and learned baselines (LR, RF, LightGBM),
  selection on validation log loss, test scored once, bootstrap CIs,
  promotion gate, run ledger, hash-pinned model card, ML_EVALUATION.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Shadow scoring (CRYPTOGUARD_ML_SHADOW=shadow, off by default): POST
  /api/v1/ml/transactions/score and GET /api/v1/ml/status; 409
  feature_disabled when off, 503 ml_unavailable without the extra or a
  promoted model; only a transaction hash is accepted; never findings.
  CLI: ml promote / score / monitor.
- Registry: promotion only if the run's gate passed; the pickled model
  loads only when its SHA-256 matches its model card.
- Monitoring: population stability index of shadow-scored features
  against per-bin training shares (ties handled).
- Splits: hubs are now a curated public-infrastructure registry only.
  The degree-based rule let a scam contract with many victims count as
  public infrastructure, so its later victims reached the test split
  (caught by a new leakage regression test). Over-linking only costs
  evaluation rows; under-linking leaks.
- Gate: requires closing half of the validation AP gap to 1.0 (the first
  version, +0.05 AP, was unsatisfiable above a 0.95 baseline); model and
  hyperparameter selection by validation log loss (AP saturates).
- Collector: request ledger written after every transaction.
- Tests: features (point in time), labels, source integrity, sampling,
  split leakage, collector cap/resume, deterministic training smoke run,
  registry refusals, PSI, API opt-in and findings isolation; CI installs
  the ml extra from the wheel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ML.md: verified contents, label-quality findings and licenses of the
  three sources; collection budget and its accounting; features, study
  window, splits and purge; models and gate; results of run
  20261029T055343Z-41bb2f56 with failure modes (plain token transfers
  are the blind spot, complementary to the wallet-history poisoning
  detector); measured runtime, memory and reproducibility; decisions
  revised after seeing data; limitations.
- ML_EVALUATION.md generated by that run.
- README, CHANGELOG, SECURITY (pickle loading), .env.example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Defects found by the audit, each with regression tests:
- Scoring skipped chain verification (raw client): now verify_chain()
  and mainnet only, the chain the model was trained on.
- A mined transaction without a receipt was scored as 'failed, no
  logs': now status incomplete, never scored or checkpointed as done.
- The API scored with a model that had no untouched-holdout evidence:
  approval levels research_only / shadow_approved; the API needs the
  latter, promotion to it needs a passed untouched holdout in the card.
- Request budget counted attempts after the fact (an interrupted run
  lost its count; concurrent collectors could overspend): every HTTP
  attempt now reserves a unit first in a locked, atomically replaced,
  fail-closed ledger; cut-off checkpoint tails are repaired. A thread
  race test found and fixed a Windows lock error.
- Registry trusted a path from registry.json: validated run ids inside
  the runs root, card schema, size limit, library-version check.
  LightGBM models are now stored as LightGBM text (no pickle).
- Bootstrap resampled rows although PTXPhish rows cluster by account:
  intervals now resample account groups. Runs store per-row
  predictions and are keyed on table and split hashes.
- Monitoring: outcomes, latency, score distribution, schema mismatches,
  bounded log reads.

New: ml/audit.py (cryptoguard ml audit: recomputed metrics, Wilson and
cluster intervals, prevalence arithmetic, fixed-hyperparameter shortcut
experiments, hub-policy sensitivity, duplicates, calibration, errors)
and ml/history.py (point-in-time wallet-history features with an
explicit zero-versus-unknown contract; infrastructure, no accuracy
claim). Scoring is bounded (one at a time, 30 s timeout) and labelled
as an uncalibrated ranking score, post-inclusion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ML_GENERALIZATION_AUDIT.md: reproduction, label provenance (benign =
  about 60 prominent accounts; phishing expanded from 101 reports), sample
  accounting, holdout timeline (the test split was viewed before the
  gate, selection metric and hub rule were revised: a development
  benchmark), leakage, temporal boundary (post-inclusion), shortcut
  experiments, cluster-bootstrap uncertainty (FPR 7/43 from 12 senders,
  0.043 to 0.364), base-rate arithmetic (precision 0.057 at 1%),
  errors, wallet-history design, calibration, security fixes, budget,
  next dataset and experiment.
- ML_AUDIT_TABLES.md generated by audit b90137901e25 (deterministic: a
  second run gave the same id).
- docs/ml/baseline-phase11.json: frozen baseline with dataset, config and
  model hashes, versions, metrics and reproductions; LightGBM text form
  scores identical to the pickle on the real rows.
- ML.md, README, CHANGELOG, SECURITY: status and corrections; Phase 11
  history kept and marked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pilot used 2,636 of its 3,000-request cap on eth.drpc.org. It found:
- 0 confirmed payments to the attacker in 52 resolved Poison-Hunter rows
  (Wilson 95% upper bound 0.069);
- about 1,500-2,500 requests per ordinary wallet-week (extrapolated from
  three 1-day recordings);
- drpc's free plan limits eth_getLogs to under 250 blocks;
- throughput of about 4 requests/s.
Option B is not viable as costed. Raw pilot data stays local in the
git-ignored data/ml/pilot/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ledger's lock file was treated as stale after 60 s. Two processes
waiting on a crashed holder could both break it, and both would then
hold the lock. Changes:
- use an OS file lock (msvcrt/flock), which the OS releases when the
  holder dies;
- fsync each reservation before the atomic replace;
- make threads of one process queue on a blocking in-process lock, so
  none starves while polling under load.

New mock-only tests cover:
- two processes sharing a cap;
- a process killed while holding the lock;
- a live holder (times out, the lock is not broken);
- a zero budget;
- rate limits and timeouts;
- the cap reached during retries;
- five async workers;
- a truncated ledger file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PSI fixes:
- Reference bins put a value equal to a decile edge in the upper bin,
  so a mostly-constant feature fell into one bin and a 0 to 40 shift
  gave PSI 0. New references use closed="left". Phase 11 cards keep
  their original binning, so they show no false drift.
- An empty batch gave a large PSI; it now gives None.
- NaN values were binned silently; they are now excluded and reported
  as missing_share.

Task isolation: model cards record a task identifier, and the
transaction scorer refuses cards for any other task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds task poisoning-attempt/1, kept separate from the PTXPhish
transaction classifier:
- events: the event schema, victim-event identity, campaign groups
  (public infrastructure exempt), grouped temporal splits, label tiers
  that keep weak, verified and conflicting labels apart, outcome
  records separate from labels, quality gates and a deterministic
  manifest;
- poison_hunter: typed parser with field provenance; failing rows are
  quarantined with reasons, never dropped;
- pilot: versioned pilot records. Fixes the pilot data loss: the
  post-processing read a non-existent 'transactions' field. A schema
  mismatch now raises instead of reading as zero, and legacy lines
  migrate with lost values set to None;
- payments: offline payment verification. A loss needs a reviewed
  token, a successful receipt and a matching log; otherwise the result
  is unresolved;
- candidates: structural candidate generation, independent of the
  detector, plus point-in-time event features;
- review: score-free review packets and append-only label import;
- planner: collection cost planning that never collects;
- poisoning_report: the offline report.
New CLI commands: ml poisoning-report and ml plan-collection.
No RPC calls anywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ML_PILOT_AUDIT.md: the pilot reconstructed from its raw outputs.
  The request accounting matches the ledger exactly (2,636). The 0.069
  payment bound is corrected to a conditional bound on the 52 least
  active rows. The data-loss root cause is recorded, with what was
  recovered and what was lost.
- ML_POISONING_DATASET.md: task definition, event schema, label tiers,
  Poison-Hunter field provenance, and the quarantined row.
- ML_RESEARCH_PLAN.md: issue register, candidate-generation results,
  collection cost model, external sources (none downloaded) and the
  next experiment.
- ML_POISONING_TABLES.md: generated by `ml poisoning-report`.
- The proposal, ML.md and CHANGELOG are corrected and updated.

Verification:
- ruff, format and mypy (107 files) clean;
- ML suites: 97 passed;
- full backend suite: 527 passed and 1 failed. The failure was a
  thread-starvation timeout in the ledger test, fixed in 4928030;
  that file then passed 19/19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The outer tracemalloc measurement in build() was reset by the nested
measurements in candidate generation and replay(), so the report showed
0.0 MiB. Per-window generation memory, measured correctly, stays in the
JSON report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parse Tsuchiya et al.'s payoff_transfers_ethereum.csv (KiltHub DOI
10.1184/R1/29212703.v1, CC BY-NC-ND 4.0) with a typed, quarantining
schema and join it against the Poison-Hunter rows, their pilot outcomes
and the replay incidents. The file stays local and is pinned by hash in
ml/tsuchiya.py rather than ml/sources.py, so fetch-sources never
downloads it unasked. Only aggregates and line numbers are reported.

Results (0 RPC requests): no complete-coverage pilot row is contradicted;
76 of the 97 unchecked rows fall in the file's coverage with no payoff
to their lookalike; one victim (line 74) paid a competing lookalike of
the same address; one row's lookalike (line 87) was paid by another
victim. Labels are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tsuchiya et al.'s payoff amounts come from a PostgreSQL real (float4),
which holds integers exactly only up to 2^24 base units (about 16.8
USDT). Phase 11.2 used the float64 limit and reported 41 inexact
amounts; 1,644 of 1,738 are approximations. Each payoff now keeps the
verbatim source text, a precision class, a human amount only for tokens
with known decimals, the source's USD valuation unchanged, a stable
payoff_id (chain, tx, token, payer, recipient) and file provenance
(tsuchiya-payoff/2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ml fetch-file: verified, resumable download of one approved, pinned
  file (206 + matching Content-Range to resume, 200 restarts, size/MD5/
  SHA-256/gzip checks before rename, disk reserve). No default caller.
- ml scan-archive: streaming reader for Tsuchiya et al.'s PostgreSQL
  dump. Never executes SQL; whitelisted statements, schema and COPY
  column checks, bounded lines, typed rows with counted rejections,
  exact distinct counts with bounded memory (spill buckets), a target
  subset in SQLite renamed only after a complete pass; killed-run
  leftovers (including the SQLite journal) are cleared first.
  Real archive: 34,905,969 rows, 0 malformed, all ten publisher counts
  reproduced, peak RSS 287 MiB, two passes identical.
- ml cross-dataset-report: match levels for Poison-Hunter rows,
  payoff-to-attempt linkage, separate attempt/victim/address/campaign
  outcomes, temporal categories, tie-aware competing-lookalike
  comparison, decision gates, and a local review queue (packets v2 with
  competing lookalikes and payment evidence; no labels assigned).
- Candidate rules are shared through candidates.transfer_methods so the
  archive evaluation uses the generator's own logic.
- ml bench-archive: seeded synthetic scaling benchmark.

0 RPC requests. Third-party data stays in the git-ignored data/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ML_CROSS_DATASET_VALIDATION.md documents provenance, licence, the actual
archive format, the streaming parser, performance, record counts,
Poison-Hunter and payoff overlap, outcome levels, competing lookalikes,
temporal handling, selection bias, rule dependence, label quality,
decision gates (no supervised benchmark is possible yet), audit issues
13-20 and the next experiment. Existing ML docs, the proposal, the
changelog and the README point to it; earlier conclusions are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cryptoguard ml freeze-review-sample` draws, once and before any review, a
stratified sample of the payoff-linked review packets: one representative
per campaign group (victim, lookalike, planting tx, imitated address),
strata subtype x year x rival lookalike, fixed subtype quotas (60 in all)
split proportionally with at least one per cell, keyed SHA-256 ranking,
ordered reserves, design weights. Writes a blinded reviewer sheet, a
separate unblinding key and a manifest with a selection hash; refuses to
re-draw once frozen. Offline, 0 RPC requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Records the frozen review-sample/1 draw (60 of 1,469 packets, 15 strata,
one per campaign group) with SHA-256 commitments for the input queue,
selection, reviewer sheet, unblinding key and manifest, made before any
review. Adds the review protocol and pre-specified analysis plan. The
sample files themselves stay local (CC BY-NC-ND derived addresses).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
verify_frozen checks the five committed hashes (raw bytes, plus the
selection hash recomputed from the manifest) and never writes. The
design audit recomputes groups, strata, allocation, exact inclusion
probabilities and weights from the queue, explains the 1,401 versus
1,395 group count (exploratory links without the imitated address),
and adds a stratified estimator with collapsed-strata variance,
design-effect Wilson intervals, nonresponse bounds and attempt-level
bounds. Corrects the year-boundary comment (values unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Structured decisions with evidence and exposure fields; a hash-chained,
atomically written reviewer store with finalization; a loopback-only
review app (session token, Host check, strict CSP) that serves only the
blinded sheet; per-reviewer packages; replacements in frozen reserve
order; kappa (undefined, never 0) and Gwet's AC1; and an unblinding gate
with no override and a key-access log. Commands: cryptoguard ml review
verify|audit|package|serve|status|replace|unblind. Offline, 0 RPC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Versioned benchmark manifest, the ten readiness criteria (built on
events.quality_gates), and a guard that refuses training events sharing
an event, wallet, lookalike or planting tx with the reviewed holdout;
development use is recorded permanently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k readiness

Amendment 1 was written before any review and leaves the frozen sample
unchanged: campaign-level primary estimand, design-based intervals (the
0.94/0.86 figures assumed simple random sampling; all-confirmed design
bound 0.929), collapse rule, structured evidence and exposure. Adds the
reviewer guide, maintainer checklist and negative-data collection plan
(not authorized).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cohort.py generalizes the frozen-sample design (one representative per
group, stratified keyed-hash selection, reserves, hash-committed
manifest) with its own version, seed and directory per cohort; the
Phase 11.4 sample is untouched. Reviewer packages name no cohort: the
server identifies it by the sheet hash, so a cohort's purpose never
reaches reviewers. Sheet v2 adds a neutral description, a coverage note
and pre-cutoff context, rendered as text only. Unblinding takes the
cohort, reads both key formats and adds an all-reviewers-legitimate
estimand; subgroup names come from the manifest design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…valuation contract

candidates/2: a counterparty counts as chosen only with a verified
wallet signature (candidates/1 also used unknown-signer transfers), and
generation is one pass instead of one history scan per transfer;
identical output on all 13 recorded windows. Adds the archive's
uncategorized-row extraction (two streaming passes, never executes SQL),
the hard-negative pool with structural categories (every item
unlabeled_candidate), a contamination screen against every local known
positive with match levels and statuses, typed campaign grouping that
never links through common tokens, coarsened exact matching with balance
diagnostics, source-separability diagnostics, a benchmark data contract
and metrics that refuse unverified negatives, a data inventory, and the
hard-negative-study command. Offline, 0 RPC requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the inventory

Commits the five hashes of hard-negative-candidates/1 (frozen at
c68d3a4, clean tree, before any review) to review_sample.COHORTS so
verify, package, serve and unblind recognise it; the Phase 11.4 sample's
hashes are unchanged. The inventory no longer lists __pycache__ files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ted tables

Documents the offline hard-negative pool (8,877 unlabeled candidates),
the contamination screen (42% of the archive's uncategorized rows
overlap known attacks), matching and source-separability results
(value alone separates the frames), the frozen 35-item cohort and its
first, superseded draw, and the readiness gates. ML_POISONING_TABLES.md
is regenerated with candidates/2: only the commit line changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When other writers kept SQLite locked past the driver's busy timeout,
LeaseStore.acquire let a raw OperationalError escape: indistinguishable
from a crash (HTTP 500), and the most plausible way a contender exits
non-zero under heavy I/O. It now raises LeaseBusyError (503, retryable);
'held' still returns None and at most one owner wins. The contention
test reports each child's outcome or exception and asserts safety (never
two owners) separately from liveness; a deterministic test holds a write
lock and checks the busy path. The original flake was not reproduced in
16 rounds under CPU and fsync-heavy disk load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hort, label policy

evidence.py builds deterministic pre-cutoff packets from local data only
(sheet in, never the key; no flags, intended address or payoffs; no
similarity computed so reviewers identify the counterparty themselves);
the review app serves them only when their hash is registered.
Amendment-2 decisions record later-payment and third-party-label
exposure, offline-panel use, reason codes and evidence citations.
Adds a synthetic training cohort, sessions that expire, submission
checks and a key-free agreement report, the label policy (seven statuses,
strict binary eligibility), an inactive pre-registered experiment spec,
FPR power planning, both cohorts as one protected holdout, and source
identifiers refused as features. candidates/2 now buckets chosen
counterparties by suffix (exact): 10,000 transfers in 0.13 s instead of
13 s, identical output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pRstislav and others added 30 commits November 4, 2026 18:29
…dust planting (17 approved RPC requests)

The paid lookalike's only pre-theft transaction (nonce 0) was a plain
native transfer of 1e12 wei to the victim at block 21,890,540, 357
blocks (4,320 s) before the theft and before both fake-token plantings.
observation/1 does not record inbound native ETH, so the Phase 12.3 miss
is a confirmed recorder omission. In an in-memory reconstruction with
that one record, C1 flags the paid address (lookalike_in, affix 4+6 to
the reference) 357 blocks early; C0 does not. The record was found by an
outcome-directed query: a development-case regression, not validation.
The frozen fixture and the Phase 12.3 result are unchanged.

Ledger: 1 failed request (outbound connectivity down) + 16 on the one
restart; receipt skipped to stay within the cap of 17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… RPC)

- native_inbound: read_receipts; observation/2 now observes the status of
  every nonzero inbound instead of inferring it from an exact sum (which
  a reverted inbound plus an equal internal credit would fool).
- Adversarial locator tests (12, incl. a seeded randomized oracle).
- C2 safeguards: native candidates require a lookalike of the wallet's
  own reference (zero-value / stranger native transfers alone never
  become candidates); one candidate per lookalike with an event count.
  C1 unchanged (coverage measurement). Production detector untouched.
- replay record-window: outcome-blind recording from wallet, chain,
  window and collection settings only; never overwrites; needs a cap.
- Pre-register the blind observation/2 replay of the Stage 2a window
  (verification V1-V5 fixed in advance; cap 2,500 requested, not
  approved). The frozen fixture and the original C0 miss are unchanged.
- 909 passed, 4 deselected; ruff and mypy clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… requests)

replay record-window, given only the victim, chain and block window,
recorded the Stage 2a window with observation/2 and independently found
the native dust planting (0xf4530315..., block 21,890,540, index 150,
1e12 wei, receipt status read). C0 = the 2 fake-token lookalikes
(identical to C0 on the frozen fixture); C1 adds exactly the paid
address 357 blocks (4,320 s) before the theft; C2 keeps it; production
detector output identical. Development-case regression, not
validation. The frozen fixture and original C0 miss are unchanged.

Ledger: 596 on a first attempt stopped by a provider rate limit (no
fixture written) + 703 on the one permitted restart.

Decision (ML_OBSERVATION_COMPLETENESS.md section 35): observation/2 is
sufficient for offline research within its scope; production use needs
untouched blind incidents, a C2 volume study and an approved detector
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e ranking)

Frozen before any outcome of the new tasks. Archive ranking questions are
answered by citing Phase 12.1 (its test split is used) plus exploratory
development-split analyses; the primary ML test is a new self-supervised
proxy task (next planting mechanism from the planting prefix) with
frequency and Markov baselines, a fixed logistic regression, the 12.1
temporal group split, log loss and a group-bootstrap CI. Wallet-centric
work: point-in-time candidate feature schema with value/status pairs,
an offline shadow ranking, robustness and cost tests. PU and wallet
self-supervised learning are audited, not forced. 0 RPC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…shadow ranking (no RPC)

Committed before the outcome-based run (protocol 12.5, 16586a5).

- ml/candidate_research.py: episode cache (protected wallets and every
  frozen-overlap episode removed; 12.1 groups and temporal split), the
  primary proxy task planting-mechanism-next/1 (prefix of strictly
  earlier blocks; global, victim-prefix and Markov baselines; fixed
  multinomial logistic regression; log loss; group-bootstrap CI), the
  RQ2 exploratory semantic-channel ranking on the development split,
  the H3a MAD-recency equivalence, wallet-centric coverage/volume,
  robustness transforms, development-case ranks and a synthetic flood.
- ml/candidate_features.py: poisoning-candidate-features/1 with
  (value, status) pairs, never zero for unobserved; offline shadow
  ranking poisoning-candidate-ranking/1 (B4 order; B3/B5/B6 alongside;
  research CLI only).
- CLI: ml candidate-research, ml candidate-ranking.
- Tests: 14 with hand-written oracles (proxy rows and same-block rule,
  baselines, single-class refusal, metrics, bootstrap, tie-averaged
  top-1, MAD equivalence, end-to-end C0/C1/C2 + features + ranking,
  point-in-time metamorphic checks, missingness, flood bound,
  robustness never adds candidates).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…an fixed)

The Phase 12.5 study found candidate_features rebuilding every
observation per candidate: 424 s to rank 1,000 flood candidates over
11,000 observations. A per-window context (observations, party and
signer indexes, references) is now built once. Outputs are identical on
both Level I cases, the blind observation/2 recording and a 2,200-event
flood; the full flood now ranks in 0.27 s. Regression test counts the
observation builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h (no RPC)

ML_CANDIDATE_DISCOVERY_RESEARCH.md: data audit (P1-P5, never pooled),
protected exclusions, C0/C1/C2 coverage and volume, the pre-registered
proxy test (H8 not supported: logistic log loss 1.945 vs 0.200 for
victim-prefix frequency under strong temporal covariate shift; post-hoc
diagnostic), RQ2 semantic channel (no gain, -0.009 [-0.022, 0.005]),
H3a analytic equivalence, robustness (signer loss removes all spoofed
candidates), cost, PU and self-supervised feasibility, decision gates,
and the next experiment. 924 passed, 4 deselected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…enance)

Frozen before the evidence model exists and before any H2-H7
measurement. Records the development audit (outgoing signer coverage
18/18 on eligible recordings; the 12.5 signer-loss result came from
masking) and the deterministic recovery rule R-SIG (an outgoing event
whose transaction is absent from the wallet's complete signed set was
not signed by a code-less wallet; 18/18 consistent with looked-up
signers). Hypotheses H1-H7, evidence levels, the ordering and summary
contract. No learned ranking model: no valid labels. 0 RPC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…G), bounded summary

Committed before the Phase 12.6 measurements (protocol c060ccc). Research
only; C0/C1/C2 and their published outputs are unchanged.

- ml/candidate_evidence.py (candidate-evidence/1): one group per
  (chain, victim, lookalike) keeping every distinct evidence record in
  chain order with typed provenance (signer status, event sender and
  recipient, emitter, receipt). Rule R-SIG: an outgoing event whose
  transaction is in the wallet's complete signed set was signed by the
  wallet; absent from it (code-less wallet) it was not - the signer's
  address is never guessed. Non-probabilistic levels (directly verified,
  supported, partially supported); unknowns lower support and are listed,
  never raise suspicion; unknown token identity is never "untrusted";
  unknown-signer outgoing lookalikes are kept as partially supported,
  never called spoofs. Order: level, affix strength (costly to forge),
  latest planting, address. Bounded summary discloses totals, truncation
  and hidden identities; nothing is deleted.
- ml/reliability_study.py + `ml reliability-study`: R-SIG consistency,
  S1-S5 masking with unsafe-inference counts (C1 vs evidence model),
  deduplication, 12 adversarial scenarios, spam stability of orderings,
  development-split robust proxy features, 10-10,000 scaling.
- Tests: 27 with hand-written oracles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ance (no RPC)

ML_CANDIDATE_RELIABILITY.md: signer-provenance audit (outgoing signer
coverage 18/18; the 12.5 result came from masking), R-SIG recovery
(18/18 consistent; 0 candidates lost with all signers masked), confirmed
defects (C2 dropped evidence records; no signer recovery; C1 calls an
unknown token untrusted), evidence groups, S1-S5 masking (0 unsafe
inferences vs 5 for C1), 12 adversarial scenarios, H5 negative (support
first loses to similarity under cheap verified spam), exploratory robust
proxy features, linear scaling, production-readiness decisions.
950 passed, 1 failed (load-sensitive lease test; passes 3/3 alone).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ministic lease test

candidate-evidence/2 (research only, detector unchanged):
- absence_guard: R-SIG infers "not signed by the wallet" only for a complete,
  count-consistent, nonce-contiguous signed set of an account whose code is 0x at
  every sample up to the cutoff (no EIP-7702 designator, no contract code); legacy
  fixtures must document the nonce bisection. Otherwise the signer stays unknown.
- A looked-up signer that contradicts the signed set is "conflicting": never a
  reference, never a spoof.
- Not signed is not unauthorized: a value-moving foreign-signed transfer is
  foreign_initiated_out with authorization unknown (allowance, permit, delegation
  or fabricated log); only zero-value ones are spoofed_out.
- Presentation order reads no support level (affix, recency, address); the
  pre-registered support-first order is kept as evidence_order_key for H5.
- Bounded summary (no hidden-identity list), digest-checked page() and
  group_records() offset/limit access.

reliability-study/2: signer guard matrix, real-window authorization audit,
separation checks, 10,000-event adversarial suite, summary scaling to 100,000.

Lease test: distinct child exit codes, explicit-clock expiry probes instead of a
conditional wall-clock check, a bounded join that kills a hung child, and a new
expiry-boundary test (no instant with two owners).

Amendment: docs/ml/amendment-12.6.1.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pages, lease test (no RPC)

ML_CANDIDATE_RELIABILITY.md sections 30-39 with the measured run on 5a5e876
(reliability-study/2, 92 s, 623 MiB peak, 0 RPC): 20-condition signer guard
matrix, real-window authorization audit (6 value-moving foreign events no longer
called spoofs; R-SIG 18/18), bounded summary 6.8 KB at 1k/10k/100k, separation
of support from order, H5 preserved, 10,000-event adversarial suite, lease-test
investigation. In-place notes mark the 12.6 statements this corrects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t top-K, LTR)

Threat model with an explicit work-factor model (2^(4(p+s)) key trials per
reference), identifiability limits L1-L4, baselines B0-B7, the proposed
work-weighted group-discounted selector P1 (lambda = 4 bits fixed a priori),
ablations, negative controls, a 16-family synthetic grid (m in 0..10,000,
K in 1..50, 10 seeds), hypotheses H1-H6 with decision criteria, and a
learning-to-rank study confined to the 12.1 development split. Frozen before
any selector, benchmark or LTR code exists. RPC budget 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chmark

- adversarial_ranking: baselines B0-B6 and negative controls, and the proposed
  work-weighted group-discounted selector P1 (priority = 4*affix - lambda*j per
  reference bucket, keyed-hash ties, no time, no support level, no oracle) with
  its ablations and a provable displacement bound independent of decoy count.
  select() returns a labelled permutation (method id + config hash).
- candidate_evidence: EvidenceResult carries its order and config hash; the
  digest covers them; summary/page report them and each item's reference bucket
  and bucket size. The default order and contract are otherwise unchanged.
- adversarial_benchmark: the 16 pre-registered families (m 0..10,000, K 1..50,
  10 seeds), Exposure@K, TGC@K, displacement, attack cost, H1-H4 checks,
  negative controls, the 12.1 development-split LTR study (test split dropped
  before features), development cases, performance, resource preflight.
- CLI: cryptoguard ml adversarial-ranking.

Committed before the measured run (protocol 12.7). 0 RPC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pre-registered negative controls flagged two design biases in the grid:
oldest-first (NC-revrec) scored 0.986 because targets are always older than
their decoys, and mechanism round-robin (B3) scored 0.839 because targets mostly
use a different mechanism from their decoys. posthoc_checks() varies those
choices as an adaptive attacker would (older decoys, decoys sharing the target's
mechanism, the target on each of the five references, a target address that
does not sort first) and reruns H4 with 200 seeds. Labelled post hoc and
exploratory; the pre-registered results are unchanged.
`cryptoguard ml adversarial-ranking --posthoc` writes posthoc-checks.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Debugging the measured run showed a design flaw in the registered P1: ties
between bucket leaders use the member's keyed hash, and a flooded bucket's
leader is the minimum of many hashes, so a lone target loses almost every tie
(rank 5 of 5 tied leaders in 10 of 10 seeds at m >= 100 in F7). P1b breaks
those ties with a keyed hash of the bucket, which does not depend on bucket
size. P1 stays exactly as registered and reproducible; P1b is a labelled
post-hoc amendment evaluated on the same grid. Test pins both behaviours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st top-K (no RPC)

ML_ADVERSARIAL_RANKING.md (35 sections and gate table). Registered results from
7ac195f, reproduced exactly at 0968ff8: H1 supported (P1 0.773 vs B0 0.525
mean Exposure@K, >= B0 in 16/16 families), H2 0/480 cells, bound 0
violations, H3 confirmed, H4 tolerance not met at 10 seeds (200-seed post-hoc
check matches K/(m+1)). Negative controls exposed attacker-controllable design
biases (oldest-first, mechanism round-robin -> 0.111 post hoc); P1 unaffected.
Post-hoc P1b fixes a tie rule that favoured flooded buckets (0.813). LTR on the
12.1 development split learns recency: no gain over recency, -0.169
adversarially (gate G FAIL). Independent validation BLOCKED BY DATA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI #50 failed in the backend type check on Ubuntu: ctypes.windll does not exist
in Linux typeshed. A sys.platform == "win32" guard is understood by mypy on
every platform; checked locally with mypy for Windows and --platform linux.
No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ealed manifest

Protocol 12.7.1 (falsification of P1b): frozen selectors (adversarial_ranking.py
sha256 2c0e65ae..., P1b config 8b3795e363aad678; verify_frozen refuses anything
else), an independent debiased generator (random addresses, references assigned by
the pipeline's _match, shuffled populations, oracle outside the groups; balanced age
and mechanism relations; 10 families incl. an exchangeable null control), the
sealed manifest (7,200 scenarios, 5,079,472 candidates, sha256 2e294aeb...),
template-cluster bootstrap, the pre-registered H1 classification, a bounded adaptive
attacker (48 attacks x 3 budgets, K1 public / K2 secret seed) and a counterexample
search with the 12.7 theorem's invariants. Committed before any selector has run
on the sealed scenarios. `cryptoguard ml adaptive-validation [--manifest-only]`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… RPC)

ML_ADAPTIVE_RANKING_VALIDATION.md (35 sections, gates). Sealed primary run on
d98a636 (manifest 2e294aeb... reproduced; 7,200 scenarios; run once): paired
P1b - B0 = -0.018 [-0.031, -0.004] over 225 templates, so the pre-registered
classification is "not supported after debiasing". P1b gains under other-group
floods (+0.14) and on reference-group exposure (+0.032 [0.024, 0.041]) and
loses under own-group equal floods (-0.12); reference round-robin B4 edges it.
Adaptive attacker: 10 equal-tier own-group lookalikes displace the target under
every method (H2 not supported). The 12.7 theorem holds (0 breaks in 20,000
trials). The 12.7 report gains a pointer to this result; its text is unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
…adiness)

Vocabulary and a five-dimension label ontology with evidence rules, the case and
collector contracts (outcomes sealed separately), data-quality severities,
per-mechanism observation eligibility, independence criteria, the blind flow with a
run-once ledger, task populations and denominators (T1-T9; end-to-end TopK counts
generation failures as misses), the failure taxonomy, the frozen baseline
registry (P1b comparison-only), group splits and leakage checks, paired
sample-size planning, the offline development analyses D1-D5 and the
public-repository safety scan. Frozen before any harness code exists. RPC 0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ng, repo safety scan

Protocol 12.8, research only (detector untouched):
- benchmark_contract: five-dimension label ontology with evidence rules, case and
  sealed-outcome records, a collector request type that cannot carry an answer,
  data-quality issues with severities, per-mechanism observation eligibility and
  independence checks against development artifacts.
- benchmark_eval: predict() without an outcome parameter, an outcome vault that
  opens only after sealing, a run-once ledger that records refused reruns, T1-T7
  scoring with one failure class per case, metrics with explicit denominators
  (end-to-end TopK counts generation failures as misses; FPR refused without
  verified negatives), group splits, leakage audit and the frozen baseline
  registry (P1b comparison-only).
- power: exact paired sign-test power and incident planning from stated
  assumptions (no hard-coded sample size).
- repo_safety: tracked-file and history scan that reports names and counts only.
- benchmark_readiness: inventory, window eligibility, leads, development
  regression, missingness sensitivity and the archive tie analysis.
- CLI: cryptoguard ml benchmark-readiness, cryptoguard ml benchmark-power.

Committed before the measured run. 0 RPC.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ch paths; lead event dates

Labelling only: three provenance prefixes were unregistered, and a lead's event date is
now read from its case id when present. No scoring logic changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ML_INDEPENDENT_BENCHMARK_READINESS.md (35 sections, gates G1-G13). Measured on
332dbfd (identical to 3b512d7): 16 local windows, 0 independent incidents, 0
verified negatives, 0 reviewer submissions, no all-mechanisms window; blind
development regression (not validation) classifies the known miss as
observation_unsupported; archive development split: the paid lookalike is the
newest among similarity-tied rivals in 79.0% of 423 episodes vs 33.5% by chance
(+0.454 [0.412, 0.495]). No model trained. Public-repository scan clean over
412 files and 112 commits; one reviewer-blinding risk documented. Readiness:
ready after new observation recordings and additional verified labels;
generalization evidence BLOCKED BY DATA.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…on, pilot gate)

Exposure channels and deterministic levels R0-R3/RU (R4 only from reviewer
evidence), artifact roles, cohort dispositions and the prospective reviewer
workflow with declarations; bounded public discovery (20 searches, 30 page reads,
verbatim identifiers, no explorer access), eligibility rules, hash-ordered pilot
selection (one per cluster, cap 10), anchor + record jobs with caps (5 + 2,500
per window), a separate approval record, the frozen B0-vs-B4 comparison with
reference-group exposure, and pilot stop rules S1-S6. Frozen before the audit,
the search and any classification. RPC 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d protocol

Protocol 12.9 Part I. `ml/review_blinding.py` audits the two frozen review
cohorts:
- Identifiers come from the blinded sheets only; the unblinding keys are hashed,
  never parsed.
- Channels: tracked files at HEAD, every line added in git history (with its
  first date), truncated prefixes, and documented provenance.
- Matches get artifact roles (outcome / context / neutral), which set the
  levels R0/R1/R2/R3/RU.
- R4 is assigned only from a reviewer declaration.
- Per-item mappings are written to the git-ignored research directory only.

Prospective workflow:
- whitelisted task payloads checked for outcome-bearing keys or wording;
- opaque task ids;
- ReviewerDeclaration (yes / no / unknown, never defaulted);
- review_exposure, adjudication_readiness and a guidance screen.

docs/ml/reviewer-blinding-protocol.md holds the neutral reviewer guidance, the
declaration form and the cohort dispositions (aggregates only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…T5g (no RPC)

Protocol 12.9 Parts II-III. `ml/incident_acquisition.py`:
- Lead schema: verbatim identifiers must be full, truncated ones keep their
  ellipsis, and a role is recorded only when stated.
- Identifiers live in a local vault. The public registry carries salted
  SHA-256 commitments and refuses any identifier, full or truncated.
- Development-overlap search over fixtures, registries, campaign expansion,
  archive extracts (indexed sqlite lookups), review packets, cohort sheets,
  kits and research outputs; unblinding keys are never opened.
- Union-find clusters; first-match eligibility rules; hash-ordered pilot
  selection with one lead per cluster, capped at 10.
- Anchor and record jobs, with only CollectorRequest fields reaching the
  collector.
- Budget caps (2,505 per window).
- ApprovalRecord / check_approval bound to the manifest hash and caps; general
  encouragement is refused.
- Pilot stop rules S1-S6. No network import and no runner.

benchmark_eval:
- T5g reference-group exposure, reported apart from T4;
- the bucket map is kept outside the prediction digest, so 12.8 ledgers stay
  valid.

CLI: `cryptoguard ml review-blinding` and
`cryptoguard ml incident-acquisition [--write-public]`.

Registry docs/ml/incident-benchmark/acquisition-12.9.json: 17 leads, 0 ready for
recording, 5 needing identifiers, 12 rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acquisition (no RPC)

- tests/test_ml_blinding_acquisition.py: 42 offline synthetic tests covering
  exposure levels, history dates, payload leaks, declarations, adjudication,
  eligibility rule order, duplicates and campaigns, pilot determinism, the
  overlap search, collector fields, caps, approval specificity, stop rules, the
  absence of network code and runners, identifier-free public files, and T5g.
- ML_INDEPENDENT_INCIDENT_ACQUISITION.md: 35 sections and gates G1-G14.
  - Cohort A is 60 x R3 (external).
  - Cohort B is 4 x R3, 30 x R2 and 1 x R1.
  - Reviewer exposure is unknown: no kit was sent.
  - 0 of 17 leads are ready for recording, so no RPC approval is requested.
  - Independent validation is BLOCKED BY DATA.
- CHANGELOG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The registry is written as bytes, so regenerating it on Windows leaves the tracked
file byte-identical. Content unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants