{
  "schema": "article-experiment-source/v1",
  "description": "Verbatim same-day analysis source; no new experiment executed during Production.",
  "sourceSha256": "a388f8040c8a0f1383fcceae5129233640e779d8f409d9f937761b6e34176148",
  "language": "python",
  "source": "\"\"\"Fresh source-derived probes; not upstream benchmark or full-system reproduction.\"\"\"\nimport sys, pathlib, json, hashlib, math, random, statistics, platform, datetime\nB=pathlib.Path(__file__).resolve().parent\ndef sha(p): return hashlib.sha256(p.read_bytes()).hexdigest()\ndef write(name,x): (B/name).write_text(json.dumps(x,ensure_ascii=False,indent=2),encoding='utf8')\nsources={p.name:sha(p) for p in (B/'inputs/sources').glob('*') if p.is_file()}\nprovenance=dict(date='2026-11-03',executedAt=datetime.datetime.now(datetime.timezone.utc).isoformat(),python=sys.version,platform=platform.platform(),sourceHashes=sources,reusedMeasurements=False)\n# CANO Appendix A.1 and C.2: independent implementation of published equations.\nV,L,kappa,delta,mu,sigma,N=1.4,.2,.01,.05,1,.35,20\ndef cap(q): return mu+math.sqrt(3)*sigma*(2*q-1)\ndef profit(m,q,coupled=False):\n    if m==0:return -L\n    S=q if coupled else 1-(1-q)**m\n    return (V+L+delta-cap(q))*S-L-kappa*m-delta*m*q\ndef plan(coupled=False):\n    best=(-L,0,0)\n    for m in range(1,N+1):\n        for i in range(10001):\n            q=i/10000\n            v=profit(m,q,coupled)\n            if v>best[0]:best=(v,m,q)\n    return dict(profit=best[0],m=best[1],q=best[2],cap=cap(best[2]) if best[1] else None)\nind=plan(); coupled=plan(True)\nm,q=ind['m'],ind['q']\ndef payoff(K,m,q):return -L-kappa*m if K==0 else V-cap(q)-kappa*m-delta*(K-1)\nexact=sum(math.comb(m,K)*q**K*(1-q)**(m-K)*payoff(K,m,q) for K in range(m+1))\nrng=random.Random(20261103)\nn=100000\nvalues=[]; ks=[]\nfor _ in range(n):\n    K=sum(rng.random()<q for _ in range(m)); ks.append(K);values.append(payoff(K,m,q))\nse=statistics.stdev(values)/math.sqrt(n)\ncontrols=[]\nfor mm,qq in [(0,0),(1,0),(1,1),(5,1),(14,.15097)]:\n    observed=profit(mm,qq)\n    expected=-L if mm==0 else (-L-kappa*mm if qq==0 else V-cap(1)-kappa*mm-delta*(mm-1) if qq==1 else .518956)\n    controls.append(dict(m=mm,q=qq,observed=observed,expected=expected,error=observed-expected))\nassert abs(exact-ind['profit'])<1e-12\nassert abs(statistics.mean(values)-exact)<4*se\nassert all(abs(c['error'])<1e-6 for c in controls)\nwrite('experiment-cano.json',dict(**provenance,topic='SIG-20261103-005',question='At fixed marginal acceptance, can correlated commitments erase an independence-planned concurrency benefit?',method='Source-equation reimplementation, exhaustive 0.0001 q grid, exact binomial enumeration, seeded simulation, and perfect-correlation counterexample; not original code or full factorial replication.',inputs=dict(V=V,L=L,kappa=kappa,delta=delta,mu=mu,sigma=sigma,N=N,seed=20261103,orders=n),independentPlan=ind,perfectCorrelationPlan=coupled,independentPlanUnderPerfectCorrelation=profit(m,q,True),exactEnumeration=exact,simulation=dict(mean=statistics.mean(values),standardError=se,fulfillment=sum(K>0 for K in ks)/n,duplicateProbability=sum(K>=2 for K in ks)/n,expectedExcess=statistics.mean(max(K-1,0) for K in ks)),controls=controls,limits=['Perfect correlation is a constructed boundary control, not the paper Gaussian-copula rho=.7 experiment.','No LLM, seller, payment, cancellation or commitment enforcement executed.','Grid optimum is discrete; parameters are normalized simulated market assumptions.','AutoMARS timing and accuracy were not rerun; paper-specific code/prompts and traces not identified in admitted Reading.']))\n# CX Appendix G.3: audit aggregate paired counts, then test event matching contract.\ncx=(B/'inputs/sources/source-04.txt').read_text(encoding='utf8')\nassert '12 tasks pass under both modes' in cx and '13 pass only under mediated-submit' in cx\nb,c=13,10\np=min(1,2*sum(math.comb(b+c,i) for i in range(min(b,c)+1))/2**(b+c))\ndef permitted(draft,confirmation,submitted):\n    return confirmation is not None and confirmation['hash']==hashlib.sha256(json.dumps(draft,sort_keys=True).encode()).hexdigest() and all(submitted[k]==draft[k] for k in ['target','amount'])\ndraft=dict(target='account-A',amount=100)\nconfirmation=dict(hash=hashlib.sha256(json.dumps(draft,sort_keys=True).encode()).hexdigest())\ncases=[]\nfor name,conf,sub,expected in [('matching',confirmation,draft,True),('no-confirmation',None,draft,False),('wrong-target',confirmation,dict(target='account-B',amount=100),False),('wrong-amount',confirmation,dict(target='account-A',amount=101),False)]:\n    observed=permitted(draft,conf,sub);assert observed==expected;cases.append(dict(name=name,allowed=observed,expected=expected))\nwrite('experiment-cx.json',dict(**provenance,topic='SIG-20261103-004',question='Does the supplied paired-count evidence retain a large submission-mode difference under matched scoring, and does draft matching alone imply all-process pass?',method='Exact paired-count audit plus explicitly synthetic specification-derived matching controls; no original grader or traces executed.',inputs=dict(both=12,mediatedOnly=13,directOnly=10,neither=85),pairedMcNemarP=p,directMinusMediatedPP=100*(c-b)/120,originalGapPP=100*(1-25)/120,excludedChecksGapPP=100*(22-25)/120,matchingControls=cases,counterexample=dict(matchingDraft=True,requiredDisclosure=False,processPass=False),limits=['Aggregate counts are source-reported input, not independently observed trajectories.','Synthetic matcher is our minimal contract model, not cxbench implementation or legal validation.','Bank-World tasks, graders and full trajectories private; 780/800 judge packets clipped; no clipping-effect experiment possible on available inputs.','Cannot infer causal benefit or benchmark accuracy from rescoring audit.']))\nprint(json.dumps(dict(cano=ind,simulationMean=statistics.mean(values),standardError=se,perfectCorrelation=coupled,oldPlanCoupled=profit(m,q,True),cxP=p)))\n"
}
