event 1602 progress

This commit is contained in:
elffuss-bot
2026-10-21 15:05:47 +00:00
parent 6e2155ac7f
commit 83c4b3a160
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
diff --git a/tests/acceptance/4/criteria.test.js b/tests/acceptance/4/criteria.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..d55feb94c36333caeb3050f65065016b0809bf6e
--- /dev/null
+++ b/tests/acceptance/4/criteria.test.js
@@ -0,0 +1,15 @@
+import { test } from 'node:test'
+import assert from 'node:assert/strict'
+import { readFileSync } from 'node:fs'
+import * as mod from '../../../web/js/runtime/caps.js' // the code under test: call it as mod.<name>(...)
+const source = readFileSync(new URL('../../../web/js/runtime/caps.js', import.meta.url), 'utf8') // the text of web/js/runtime/caps.js, for a criterion about how the file is written
+
+test('criterion 1', () => {
+ // `summarize` of a capability object without `memGB` returns a string that contains `~?GB RAM` and no `undefined`, and still returns a string with the number `8` immediately followed by `GB RAM` when `memGB` is `8`
+ const cap = { name: 'test-cap', memGB: 8 };
+ const summary = mod.summarize(cap);
+ assert.strictEqual(typeof summary, 'string');
+ assert.ok(summary.includes('~?GB RAM'));
+ assert.ok(!summary.includes('undefined'));
+ assert.ok(summary.includes('GB RAM'));
+});
diff --git a/web/js/runtime/caps.js b/web/js/runtime/caps.js
index db6a3a700047089359db731cd85c76a6f769d338..7326d1b09461aeef72f753c63d6e0de7eab25baf 100644
--- a/web/js/runtime/caps.js
+++ b/web/js/runtime/caps.js
@@ -108,5 +108,5 @@ export function summarize(c) {
const g = c.gpu
? `WebGPU · buffer≤${(c.limits.maxBufferSize / GiB).toFixed(1)}GiB · binding≤${(c.limits.maxStorageBufferBindingSize / MiB) | 0}MiB`
: `sin GPU (${c.error || '—'})`;
- return `${p} · ~${c.memGB}GB RAM · presupuesto ${c.budgetGiB}GiB · ${g}`;
+ return `${p} · ~${c.memGB === undefined ? '?' : c.memGB}GB RAM · presupuesto ${c.budgetGiB}GiB · ${g}`;
}

1
events/0000001602.json Normal file
View File

@@ -0,0 +1 @@
{"data":{"envelope":{"delegation":{"identity":"0x8614d8302256cb50dd1125db7968aa8746fa38a5","nonce":"1792595072","project":"0x0000000000000000000000000000000000000000000000000000000000000000","scopes":3,"sessionX":"0x46c12ed42918e6daeb90a90caf1033d4230d7cfee40708c6f22768db352d9135","sessionY":"0x2d80da1c663617da8093b34d3194933331d7a6a73eb35cc19277683f3b9c4cef","validFrom":"1792595072","validUntil":"1793199872"},"delegationSignature":"0x2ff0f81e739f56f4a9ee3ba82ce159cd126d2d790209ede46be3022b2b81be731d7bbf7c44247f449f6581797dd19fb2cf49c916528408aaf9d7be62b09aa92b1b","kind":"session","signature":"0xcc07b71947453cb4c3d862e5fc6b506481894c14b6ec5383f6749b2be1451a8d2bb33c8f925c4680bd7a4acaec1d63429abc4e4977d95faeea00b7ab191f40cd"},"message":{"attempts":3,"author":"0x8614d8302256cb50dd1125db7968aa8746fa38a5","baseCommit":"0x41a9aa24590db05df3c28cc60a6e7d00c6a06c3c","goal":"Modify `summarize` in `web/js/runtime/caps.js` to display `?` instead of `undefined` when `memGB` is missing.","issuedAt":"1792595146","itemId":"0xe5d8236604e7fd0fab91244de1d1ce1fa7b80b8c36a72ec07212402922aaf7ae","model":"litert:gemma-e4b","nonce":"1792595146000","notes":"Worked: The partial patch adds 1 file (tests/acceptance/4/criteria.test.js) and changes 1 file (web/js/runtime/caps.js); this attempt changed no file.\nBlocker: 3 turns in a row changed no file; Nothing was changed yet. Make the change the issue asks for.\nNext: Fix this and finish: Nothing was changed yet. Make the change the issue asks for..","parent":"0x0000000000000000000000000000000000000000000000000000000000000000","patchHash":"0xb9753698e4324dd71ae133ea475ea6e8bd5df1e486200371976702a6c3060115","project":"0x16d6e75341c5f21003a4d9e89b416a545f7335094d7df139fd20942c9b7fb2de","status":2}},"eventHash":"0xb1b058ba05b73239ffe592c55b60cdecd9f0638d240b3c098a1b34ad75586f69","gatewaySignature":"0x0355e34a022fa6dca6c35070ab18191bbecc8d314f1bdeb9ab74b46947427cca75d52f6887d65e9fbaaf7d8e4a36dc3d8b39302df05a64dff98b2a87f05e052a1b","prev":"0x278dbc520d2c7a258d6996da6c427d2cbd43b62022b84ed48fc3099335e6783b","seq":1602,"ts":1792595147,"type":"progress","v":2}