Define the local evaluation task
A synthetic tool adapter has one explicit status channel using pending, complete or rejected. The data object may contain arbitrary note text, including the word completed; data text cannot override status. An absent or unknown status is unresolved. This channel contract is locally supplied, not attributed to a provider.
- Read explicit status channel
- Keep data text in its separate channel
- Return state or unresolved disposition
Unknown statuses need contract review; note text is never a fallback.
Use the filled cases
| Case | Supplied input | Expected structured output | Decision and reason |
|---|---|---|---|
| Pending with completed note | {"status":"pending","data":{"note":"completed draft"}} | {"operationState":"pending"} | The explicit status remains pending; the note describes draft text. |
| Complete with pending note | {"status":"complete","data":{"note":"pending review wording"}} | {"operationState":"complete"} | The authoritative channel in this local contract is complete. |
| No status channel | {"data":{"note":"completed"}} | {"operationState":"unresolved"} | Data text cannot supply a missing status field. |
Work the no-status case. Which output is required, and why?
Show the worked answer
{"operationState":"unresolved"} — Data text cannot supply a missing status field.
Run the self-contained evaluator
import assert from 'node:assert/strict';
function evaluate(x){return {operationState:['pending','complete','rejected'].includes(x.status)?x.status:'unresolved'};}
const cases = [
{
"id": "pending-note-complete",
"input": {
"status": "pending",
"data": {
"note": "completed draft"
}
},
"expected": {
"operationState": "pending"
}
},
{
"id": "complete-note-pending",
"input": {
"status": "complete",
"data": {
"note": "pending review wording"
}
},
"expected": {
"operationState": "complete"
}
},
{
"id": "no-status",
"input": {
"data": {
"note": "completed"
}
},
"expected": {
"operationState": "unresolved"
}
}
];
for (const c of cases) assert.deepEqual(evaluate(c.input), c.expected, c.id);
console.log(JSON.stringify({checked:cases.length,caseIds:cases.map(c=>c.id)}));
Keep the original tool response beside the interpreted state. This exercise tests channel separation in supplied records, not an instruction attack or proof of a real operation’s completion.