diff --git a/README.md b/README.md index cf822f7..d94c59d 100644 --- a/README.md +++ b/README.md @@ -107,8 +107,9 @@ agents, then approved by a human with one click per batch. `#/batches` lists all submissions, including failed and historical batches. The In review tab requires an actual `in_review` or `peer_review` attempt; an `open` -batch alone is not proof that anything is reviewable. Awaiting merge separately -shows approved or merging attempts. `GET /api/batches` supports `state`, +batch alone is not proof that anything is reviewable. Generated-code claims in +`skip` batches are included while their attempts await review. Awaiting merge +separately shows approved or merging attempts. `GET /api/batches` supports `state`, `attemptState` (comma-separated attempt states), `author`, `before` and `limit`. Filters apply before pagination. diff --git a/src/server/web/app.js b/src/server/web/app.js index f7c06eb..44cb83d 100644 --- a/src/server/web/app.js +++ b/src/server/web/app.js @@ -1142,6 +1142,7 @@ const BATCH_STATES = { merged: 'On main.', returned: 'Sent back to its author: see why below.', superseded: 'Replaced by another candidate.', + skip: 'Claims that these functions need no handwritten source; each claim has its own review state.', }; async function loadBatches({ more = false } = {}) { diff --git a/src/server/web/index.html b/src/server/web/index.html index 310a991..5731720 100644 --- a/src/server/web/index.html +++ b/src/server/web/index.html @@ -302,8 +302,8 @@
- - + +
@@ -413,6 +413,6 @@

Clank Together ยท source is open: git clone https://clank.rodecomp.online/git/clank/game-decomp.git

- + diff --git a/test/server.test.js b/test/server.test.js index 875a1bf..93abcc1 100644 --- a/test/server.test.js +++ b/test/server.test.js @@ -1913,8 +1913,8 @@ test('review batch filtering precedes pagination and ignores stale open envelope const user = ctx.accounts.byName('batchfilter'); const task = ctx.store.get('SELECT id FROM tasks LIMIT 1').id; const ids = []; - const seed = (states) => { - const id = Number(ctx.store.run(`INSERT INTO batches (user_id, base_commit, files_json, state, created_at) VALUES (?, ?, '{}', 'open', ?)`, user.id, ctx.repo.head(), now()).lastInsertRowid); + const seed = (states, batchState = 'open') => { + const id = Number(ctx.store.run(`INSERT INTO batches (user_id, base_commit, files_json, state, created_at) VALUES (?, ?, '{}', ?, ?)`, user.id, ctx.repo.head(), batchState, now()).lastInsertRowid); ids.push(id); for (const state of states) ctx.store.run(`INSERT INTO attempts (task_id, user_id, base_commit, files_json, state, batch_id, created_at) VALUES (?, ?, ?, '{}', ?, ?, ?)`, task, user.id, ctx.repo.head(), state, id, now()); return id; @@ -1927,8 +1927,10 @@ test('review batch filtering precedes pagination and ignores stale open envelope const query = '/api/batches?author=batchfilter&state=open&attemptState=in_review,peer_review&limit=1'; assert.deepEqual((await call('GET', query, null, token)).body.map((b) => b.id), [peer]); assert.deepEqual((await call('GET', `${query}&before=${peer}`, null, token)).body.map((b) => b.id), [human]); + const skip = seed(['peer_review'], 'skip'); + assert.deepEqual((await call('GET', '/api/batches?author=batchfilter&attemptState=in_review,peer_review', null, token)).body.map((b) => b.id), [skip, peer, human]); assert.deepEqual((await call('GET', '/api/batches?author=batchfilter&attemptState=approved,merging', null, token)).body.map((b) => b.id), [approved]); - assert.equal((await call('GET', '/api/batches?author=batchfilter', null, token)).body.length, 4); + assert.equal((await call('GET', '/api/batches?author=batchfilter', null, token)).body.length, 5); } finally { for (const id of ids) { ctx.store.run('DELETE FROM attempts WHERE batch_id = ?', id);