Skip to content
Astera Technology

Separate a tool’s data value from its declared status channel

A text value containing completed is confused with a structured operation status.

Download complete case notes and answer keys ↓

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.

  1. Read explicit status channel
  2. Keep data text in its separate channel
  3. Return state or unresolved disposition

Unknown statuses need contract review; note text is never a fallback.

Use the filled cases

Original synthetic input and literal answer key
CaseSupplied inputExpected structured outputDecision 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.
Download editable CSV ↓

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

Save as .mjs and run with Node.js; supplied fixtures only
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)}));
Download runnable example ↓

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.

Related resources