From 82b6c9475bda0029f52829c52acc4cbf101ca82a Mon Sep 17 00:00:00 2001 From: Relayflow Lead Date: Sat, 29 Aug 2026 17:13:00 -0400 Subject: [PATCH] drive: cloud run 51422f20 Work produced by cloud run 51422f20-a45d-4b5b-b1d3-6e97d8834ac8 in a workflow sandbox and delivered from this host, because a sandbox has no remote and no GitHub token. Verification and adversarial review ran in-run; see ops/reviews/ in the diff. --- sdk/src/backlog-picker.ts | 13 +++++++------ sdk/tests/backlog-picker.test.ts | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sdk/src/backlog-picker.ts b/sdk/src/backlog-picker.ts index 8ffbfbbc8..cccf9e17b 100644 --- a/sdk/src/backlog-picker.ts +++ b/sdk/src/backlog-picker.ts @@ -15,9 +15,11 @@ /** First bold top-level bullet: `- **Title** rest`. */ const ENTRY = /^- \*\*(.+?)\*\*\s*(.*(?:\n .*)*)/m; -const ACTION_TITLE = +/** Work describes a change or a required outcome; reference notes do not. */ +const WORK_INTENT = + /\b(?:add|build|change|close|create|document|fix|implement|must|persist|refuse|release|remove|rename|replace|sharpen|touch(?:es|ing)?|update|validate|verified by|wire)\b/i; +const IMPERATIVE_TITLE = /^(?:add|build|change|close|create|document|fix|implement|persist|refuse|release|remove|rename|replace|sharpen|update|validate|wire)\b/i; -const NOTES_TITLE = /^(?:notes?|release notes|upstream issues)\s*(?:\(|:|$)/i; export interface BacklogEntry { title: string; @@ -122,11 +124,10 @@ export function packageFromEntry(entry: BacklogEntry): Record { const explicitChecks = (entry.body.match(/`[^`]+`/g) || []) .map((candidate) => candidate.slice(1, -1)) .filter((candidate) => /\s/.test(candidate)); - const definitionOfDone = NOTES_TITLE.test(entry.title) - ? [] - : explicitChecks.length > 0 + const definitionOfDone = + explicitChecks.length > 0 && WORK_INTENT.test(`${entry.title} ${entry.body}`) ? explicitChecks - : ACTION_TITLE.test(entry.title) + : IMPERATIVE_TITLE.test(entry.title) ? [entry.title.replace(/[.:]\s*$/, '')] : []; return { diff --git a/sdk/tests/backlog-picker.test.ts b/sdk/tests/backlog-picker.test.ts index b38e479b0..2d3af35e7 100644 --- a/sdk/tests/backlog-picker.test.ts +++ b/sdk/tests/backlog-picker.test.ts @@ -108,9 +108,9 @@ describe('work package validation', () => { }); }); - it('refuses a dated notes blob even when identifiers look actionable', async () => { + it('refuses an observations blob even when identifiers look actionable', async () => { const work = packageFromEntry({ - title: 'Upstream issues (2026-08-27):', + title: 'Incident observations', body: 'relay#1620 (`--daemon` crash + `worker status` blind). Acceptance: `regressions/`.', });