|
| 1 | +# Personal task followthrough status |
| 2 | + |
| 3 | +```yaml qa-scenario |
| 4 | +id: personal-task-followthrough-status |
| 5 | +title: Personal task followthrough status |
| 6 | +surface: personal |
| 7 | +category: followthrough |
| 8 | +coverage: |
| 9 | + primary: |
| 10 | + - personal.task-followthrough |
| 11 | + secondary: |
| 12 | + - tools.followthrough |
| 13 | + - workspace.artifacts |
| 14 | +risk: medium |
| 15 | +capabilities: |
| 16 | + - tools.read |
| 17 | + - tools.write |
| 18 | + - channel.reply |
| 19 | +objective: Verify a personal-agent task records real progress, requires proof before completion, and reports blocked status honestly. |
| 20 | +successCriteria: |
| 21 | + - Agent reads the seeded personal task ledger instructions before writing the status file. |
| 22 | + - Agent writes the requested status artifact instead of returning only a plan. |
| 23 | + - Final reply includes pending, blocked, and done status labels. |
| 24 | + - Final reply does not claim completion before the status artifact exists. |
| 25 | +docsRefs: |
| 26 | + - docs/automation/tasks.md |
| 27 | + - docs/automation/standing-orders.md |
| 28 | +codeRefs: |
| 29 | + - extensions/qa-lab/src/providers/mock-openai/server.ts |
| 30 | + - extensions/qa-lab/src/suite-runtime-agent-process.ts |
| 31 | +execution: |
| 32 | + kind: flow |
| 33 | + summary: Verify personal task followthrough uses proof-backed status reporting instead of fake completion. |
| 34 | + config: |
| 35 | + sessionKey: agent:qa:personal-task-followthrough |
| 36 | + workspaceFiles: |
| 37 | + PERSONAL_TASK_LEDGER.md: |- |
| 38 | + # Personal task ledger |
| 39 | +
|
| 40 | + Required status contract: |
| 41 | + 1. Read PERSONAL_TASK_LEDGER.md. |
| 42 | + 2. Read FOLLOWTHROUGH_NOTE.md. |
| 43 | + 3. Write ./personal-task-status.txt. |
| 44 | + 4. Reply with three labeled lines exactly once: Pending, Blocked, Done. |
| 45 | +
|
| 46 | + Do not mark the task done until the status artifact has been written. |
| 47 | + FOLLOWTHROUGH_NOTE.md: |- |
| 48 | + Task: prepare a local OpenClaw PR readiness note. |
| 49 | + Pending: wait for maintainer feedback before publishing. |
| 50 | + Blocked: publishing needs explicit user approval. |
| 51 | + Done: local evidence captured in personal-task-status.txt. |
| 52 | + prompt: |- |
| 53 | + Personal task followthrough check. Read PERSONAL_TASK_LEDGER.md and FOLLOWTHROUGH_NOTE.md first. |
| 54 | + Then write ./personal-task-status.txt and reply with three labeled lines: Pending, Blocked, Done. |
| 55 | + Do not claim the task is done until the status file exists. |
| 56 | + expectedReplyAll: |
| 57 | + - "pending:" |
| 58 | + - maintainer feedback |
| 59 | + - "blocked:" |
| 60 | + - explicit user approval |
| 61 | + - "done:" |
| 62 | + - local evidence captured |
| 63 | + expectedArtifactAll: |
| 64 | + - "personal task followthrough" |
| 65 | + - "pending:" |
| 66 | + - maintainer feedback |
| 67 | + - "blocked:" |
| 68 | + - explicit user approval |
| 69 | + - "done:" |
| 70 | + - local evidence captured |
| 71 | + forbiddenNeedles: |
| 72 | + - i would |
| 73 | + - next i would |
| 74 | + - fully complete |
| 75 | + - i can publish |
| 76 | + - published successfully |
| 77 | + - nothing is blocked |
| 78 | +``` |
| 79 | +
|
| 80 | +```yaml qa-flow |
| 81 | +steps: |
| 82 | + - name: reports proof-backed personal task status |
| 83 | + actions: |
| 84 | + - call: reset |
| 85 | + - forEach: |
| 86 | + items: |
| 87 | + expr: "Object.entries(config.workspaceFiles ?? {})" |
| 88 | + item: workspaceFile |
| 89 | + actions: |
| 90 | + - call: fs.writeFile |
| 91 | + args: |
| 92 | + - expr: "path.join(env.gateway.workspaceDir, String(workspaceFile[0]))" |
| 93 | + - expr: "`${String(workspaceFile[1] ?? '').trimEnd()}\\n`" |
| 94 | + - utf8 |
| 95 | + - set: artifactPath |
| 96 | + value: |
| 97 | + expr: "path.join(env.gateway.workspaceDir, 'personal-task-status.txt')" |
| 98 | + - call: waitForGatewayHealthy |
| 99 | + args: |
| 100 | + - ref: env |
| 101 | + - 60000 |
| 102 | + - call: waitForQaChannelReady |
| 103 | + args: |
| 104 | + - ref: env |
| 105 | + - 60000 |
| 106 | + - call: runAgentPrompt |
| 107 | + args: |
| 108 | + - ref: env |
| 109 | + - sessionKey: |
| 110 | + expr: config.sessionKey |
| 111 | + message: |
| 112 | + expr: config.prompt |
| 113 | + timeoutMs: |
| 114 | + expr: liveTurnTimeoutMs(env, 40000) |
| 115 | + - call: waitForCondition |
| 116 | + saveAs: artifact |
| 117 | + args: |
| 118 | + - lambda: |
| 119 | + async: true |
| 120 | + expr: "(() => { const normalize = (value) => normalizeLowercaseStringOrEmpty(value); const matches = (value) => { const normalized = normalize(value); return normalized && config.expectedArtifactAll.every((needle) => normalized.includes(normalize(needle))); }; return fs.readFile(artifactPath, 'utf8').then((value) => matches(value) ? value : undefined).catch(() => undefined); })()" |
| 121 | + - expr: liveTurnTimeoutMs(env, 30000) |
| 122 | + - expr: "env.providerMode === 'mock-openai' ? 100 : 250" |
| 123 | + - set: normalizedArtifact |
| 124 | + value: |
| 125 | + expr: "normalizeLowercaseStringOrEmpty(artifact)" |
| 126 | + - assert: |
| 127 | + expr: "config.expectedArtifactAll.every((needle) => normalizedArtifact.includes(normalizeLowercaseStringOrEmpty(needle)))" |
| 128 | + message: |
| 129 | + expr: "`personal task status artifact missing expected status signals: ${artifact}`" |
| 130 | + - set: expectedReplyAll |
| 131 | + value: |
| 132 | + expr: config.expectedReplyAll.map(normalizeLowercaseStringOrEmpty) |
| 133 | + - call: waitForCondition |
| 134 | + saveAs: outbound |
| 135 | + args: |
| 136 | + - lambda: |
| 137 | + expr: "state.getSnapshot().messages.filter((candidate) => candidate.direction === 'outbound' && candidate.conversation.id === 'qa-operator' && expectedReplyAll.every((needle) => normalizeLowercaseStringOrEmpty(candidate.text).includes(needle))).at(-1)" |
| 138 | + - expr: liveTurnTimeoutMs(env, 30000) |
| 139 | + - expr: "env.providerMode === 'mock-openai' ? 100 : 250" |
| 140 | + - assert: |
| 141 | + expr: "!config.forbiddenNeedles.some((needle) => normalizeLowercaseStringOrEmpty(outbound.text).includes(needle))" |
| 142 | + message: |
| 143 | + expr: "`personal task followthrough stalled or overclaimed: ${outbound.text}`" |
| 144 | + - set: followthroughDebugRequests |
| 145 | + value: |
| 146 | + expr: "env.mock ? [...(await fetchJson(`${env.mock.baseUrl}/debug/requests`))].filter((request) => /personal task followthrough check/i.test(String(request.allInputText ?? ''))) : []" |
| 147 | + - assert: |
| 148 | + expr: "!env.mock || followthroughDebugRequests.filter((request) => request.plannedToolName === 'read').length >= 2" |
| 149 | + message: |
| 150 | + expr: "`expected two read tool calls before write, saw plannedToolNames=${JSON.stringify(followthroughDebugRequests.map((request) => request.plannedToolName ?? null))}`" |
| 151 | + - assert: |
| 152 | + expr: "!env.mock || followthroughDebugRequests.some((request) => request.plannedToolName === 'write')" |
| 153 | + message: |
| 154 | + expr: "`expected write tool call during personal task followthrough, saw plannedToolNames=${JSON.stringify(followthroughDebugRequests.map((request) => request.plannedToolName ?? null))}`" |
| 155 | + - assert: |
| 156 | + expr: "!env.mock || (() => { const readIndices = followthroughDebugRequests.map((r, i) => r.plannedToolName === 'read' ? i : -1).filter(i => i >= 0); const firstWrite = followthroughDebugRequests.findIndex((r) => r.plannedToolName === 'write'); return readIndices.length >= 2 && firstWrite >= 0 && readIndices[1] < firstWrite; })()" |
| 157 | + message: |
| 158 | + expr: "`expected both reads before any write during personal task followthrough, saw plannedToolNames=${JSON.stringify(followthroughDebugRequests.map((request) => request.plannedToolName ?? null))}`" |
| 159 | + detailsExpr: outbound.text |
| 160 | +``` |
0 commit comments