yzzhao commited on
Commit
1450770
·
verified ·
1 Parent(s): 53042a5

Restore cost totals and per-task accounting after Dataset migration

Browse files

Resolve cost-record evidence paths using the same pinned Dataset root as episode data in both current and archived views. Restore totals, task costs, per-task means and CSV exports while preserving signature validation, experiment results and Dataset evidence.

Files changed (5) hide show
  1. app.js +1 -1
  2. history-app.js +1 -1
  3. history.html +1 -1
  4. index.html +1 -1
  5. manifest.json +6 -6
app.js CHANGED
@@ -497,7 +497,7 @@ document.querySelectorAll('[data-result-file]').forEach(link=>{link.href=resultU
497
  const r=await fetch(resultURL('data.json'));if(!r.ok)throw Error('HTTP '+r.status);data=resolveEvidence(await r.json());
498
  const ir=await fetch(resultURL('measured-instructions.json'));if(!ir.ok)throw Error('Instruction evidence unavailable');measuredInstructions=resolveEvidence(await ir.json());
499
  const nr=await fetch(resultURL('instruction-audit.json'));if(!nr.ok)throw Error('Instruction audit unavailable');catalogInstructionAudit=resolveEvidence(await nr.json());
500
- try{const c=await fetch(resultURL('cost-data.json'));if(c.ok)UsageMetrics.init(await c.json());}catch{UsageMetrics.init({episodes:{},sources:[]});}
501
  for(const task of data.tasks){
502
  if(task.family==='task02'){
503
  const {suite_name,task_id}=task.native_identity;
 
497
  const r=await fetch(resultURL('data.json'));if(!r.ok)throw Error('HTTP '+r.status);data=resolveEvidence(await r.json());
498
  const ir=await fetch(resultURL('measured-instructions.json'));if(!ir.ok)throw Error('Instruction evidence unavailable');measuredInstructions=resolveEvidence(await ir.json());
499
  const nr=await fetch(resultURL('instruction-audit.json'));if(!nr.ok)throw Error('Instruction audit unavailable');catalogInstructionAudit=resolveEvidence(await nr.json());
500
+ try{const c=await fetch(resultURL('cost-data.json'));if(c.ok)UsageMetrics.init(resolveEvidence(await c.json()));}catch{UsageMetrics.init({episodes:{},sources:[]});}
501
  for(const task of data.tasks){
502
  if(task.family==='task02'){
503
  const {suite_name,task_id}=task.native_identity;
history-app.js CHANGED
@@ -490,7 +490,7 @@ document.querySelectorAll('[data-result-file]').forEach(link=>{link.href=resultU
490
  const r=await fetch(resultURL('data.json'));if(!r.ok)throw Error('HTTP '+r.status);data=resolveEvidence(await r.json());
491
  const ir=await fetch(resultURL('measured-instructions.json'));if(!ir.ok)throw Error('Instruction evidence unavailable');measuredInstructions=resolveEvidence(await ir.json());
492
  const nr=await fetch(resultURL('instruction-audit.json'));if(!nr.ok)throw Error('Instruction audit unavailable');catalogInstructionAudit=resolveEvidence(await nr.json());
493
- try{const c=await fetch(resultURL('cost-data.json'));if(c.ok)UsageMetrics.init(await c.json());}catch{UsageMetrics.init({episodes:{},sources:[]});}
494
  for(const task of data.tasks){
495
  if(task.family==='task02'){
496
  const {suite_name,task_id}=task.native_identity;
 
490
  const r=await fetch(resultURL('data.json'));if(!r.ok)throw Error('HTTP '+r.status);data=resolveEvidence(await r.json());
491
  const ir=await fetch(resultURL('measured-instructions.json'));if(!ir.ok)throw Error('Instruction evidence unavailable');measuredInstructions=resolveEvidence(await ir.json());
492
  const nr=await fetch(resultURL('instruction-audit.json'));if(!nr.ok)throw Error('Instruction audit unavailable');catalogInstructionAudit=resolveEvidence(await nr.json());
493
+ try{const c=await fetch(resultURL('cost-data.json'));if(c.ok)UsageMetrics.init(resolveEvidence(await c.json()));}catch{UsageMetrics.init({episodes:{},sources:[]});}
494
  for(const task of data.tasks){
495
  if(task.family==='task02'){
496
  const {suite_name,task_id}=task.native_identity;
history.html CHANGED
@@ -9,7 +9,7 @@
9
  <link rel="icon" href="icon.svg" type="image/svg+xml">
10
  <link rel="stylesheet" href="style.css?v=30978a82c360">
11
  <script src="usage-metrics.js?v=330e92f8eb96" defer></script>
12
- <script src="history-app.js?v=5c596822748d" defer></script>
13
  <link rel="stylesheet" href="policy.css">
14
  </head>
15
  <body>
 
9
  <link rel="icon" href="icon.svg" type="image/svg+xml">
10
  <link rel="stylesheet" href="style.css?v=30978a82c360">
11
  <script src="usage-metrics.js?v=330e92f8eb96" defer></script>
12
+ <script src="history-app.js?v=31a39183c663" defer></script>
13
  <link rel="stylesheet" href="policy.css">
14
  </head>
15
  <body>
index.html CHANGED
@@ -9,7 +9,7 @@
9
  <link rel="icon" href="icon.svg" type="image/svg+xml">
10
  <link rel="stylesheet" href="style.css?v=bd1a59147e1d">
11
  <script src="usage-metrics.js?v=330e92f8eb96" defer></script>
12
- <script src="app.js?v=0d713716a219" defer></script>
13
  <link rel="stylesheet" href="policy.css">
14
  </head>
15
  <body>
 
9
  <link rel="icon" href="icon.svg" type="image/svg+xml">
10
  <link rel="stylesheet" href="style.css?v=bd1a59147e1d">
11
  <script src="usage-metrics.js?v=330e92f8eb96" defer></script>
12
+ <script src="app.js?v=07f7896f4cd0" defer></script>
13
  <link rel="stylesheet" href="policy.css">
14
  </head>
15
  <body>
manifest.json CHANGED
@@ -15,8 +15,8 @@
15
  "sha256": "841e3cf4bad28e94696efe819b48c0b6fbf7448ee1d9a4e03f16fda4a8a8f48d"
16
  },
17
  "app.js": {
18
- "bytes": 94504,
19
- "sha256": "4440e73cdb5c07d2ab36c9186ba105228521681592230e8be11c30c9c984b45d"
20
  },
21
  "assets/anthropic-logo.svg": {
22
  "bytes": 352,
@@ -47,12 +47,12 @@
47
  "sha256": "be65ec2dbbd2449a0236c9636a112e3b6112e40699c8820d44a159c30ee536dd"
48
  },
49
  "history-app.js": {
50
- "bytes": 87065,
51
- "sha256": "5c596822748d3ce40893c62803019e19b20c1e3b1985862c7ef1b5a5b5c84502"
52
  },
53
  "history.html": {
54
  "bytes": 3298,
55
- "sha256": "d382c93e88a786a898f7ba74704f57b8c6b3be871e61ace13d0cc40fa891b9c8"
56
  },
57
  "icon.svg": {
58
  "bytes": 725,
@@ -60,7 +60,7 @@
60
  },
61
  "index.html": {
62
  "bytes": 3248,
63
- "sha256": "3a75e3821ee63ee6a1e033b4294ee2d1b32c8519ed441dff22d9e29b23c4b5db"
64
  },
65
  "policy.css": {
66
  "bytes": 1067,
 
15
  "sha256": "841e3cf4bad28e94696efe819b48c0b6fbf7448ee1d9a4e03f16fda4a8a8f48d"
16
  },
17
  "app.js": {
18
+ "bytes": 94521,
19
+ "sha256": "07f7896f4cd07f54b8ba5c616d075ac0b3fb0328d49a1321bdb305ec9dd6a11f"
20
  },
21
  "assets/anthropic-logo.svg": {
22
  "bytes": 352,
 
47
  "sha256": "be65ec2dbbd2449a0236c9636a112e3b6112e40699c8820d44a159c30ee536dd"
48
  },
49
  "history-app.js": {
50
+ "bytes": 87082,
51
+ "sha256": "31a39183c6636b5cb9f21e209d1f834757967983d1d0a6e1e59a0bae5ef7a2f8"
52
  },
53
  "history.html": {
54
  "bytes": 3298,
55
+ "sha256": "8b0691838063224bce2a991d7bb0672897ef8f51bbc39ce38afb4a67cb6e39d0"
56
  },
57
  "icon.svg": {
58
  "bytes": 725,
 
60
  },
61
  "index.html": {
62
  "bytes": 3248,
63
+ "sha256": "f022be45669e0eae5b3db57f5886c1bb10cf3b49d6f5546ff178dc088faf73b7"
64
  },
65
  "policy.css": {
66
  "bytes": 1067,