Define the local evaluation task
A synthetic interface shows several version IDs. Staff annotate a deictic instruction with either a supplied pointer ID or null when no pointer is observed. Null returns every visible distinct candidate and leaves resolution false, even if one candidate happens to be last. A pointer outside the visible set is invalid.
- Retain the visible version set
- Read the observed pointer or null
- Return resolved choice or full candidate list
An invalid pointer is not silently replaced by the nearest visible item.
Use the filled cases
| Case | Supplied input | Expected structured output | Decision and reason |
|---|---|---|---|
| Two versions, no pointer | {"visible":["A","B"],"pointer":null} | {"candidates":["A","B"],"resolved":false,"selected":null} | Both remain candidates; proximity is not a supplied tie rule. |
| Observed pointer to B | {"visible":["A","B"],"pointer":"B"} | {"candidates":["A","B"],"resolved":true,"selected":"B"} | The observed pointer selects B without deleting A from the candidate evidence. |
| Pointer names unseen version | {"visible":["A","B"],"pointer":"C"} | {"error":"pointer-not-visible"} | C is not among the supplied visible versions; review the annotation. |
Work the invisible-pointer case. Which output is required, and why?
Show the worked answer
{"error":"pointer-not-visible"} — C is not among the supplied visible versions; review the annotation.
Run the self-contained evaluator
import assert from 'node:assert/strict';
function evaluate(x){
const candidates=[...new Set(x.visible)].sort();if(x.pointer===null)return {candidates,resolved:false,selected:null};
return candidates.includes(x.pointer)?{candidates,resolved:true,selected:x.pointer}:{error:'pointer-not-visible'};
}
const cases = [
{
"id": "no-pointer",
"input": {
"visible": [
"A",
"B"
],
"pointer": null
},
"expected": {
"candidates": [
"A",
"B"
],
"resolved": false,
"selected": null
}
},
{
"id": "explicit-pointer",
"input": {
"visible": [
"A",
"B"
],
"pointer": "B"
},
"expected": {
"candidates": [
"A",
"B"
],
"resolved": true,
"selected": "B"
}
},
{
"id": "invisible-pointer",
"input": {
"visible": [
"A",
"B"
],
"pointer": "C"
},
"expected": {
"error": "pointer-not-visible"
}
}
];
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 instruction with this grounding annotation. The resolver consumes supplied observations; a resolved pointer alone grants no write or publication authority.