Record human review as a decision about a specific artifact revision, by an authenticated reviewer with the required authority. Keep that decision separate from any later action so investigators can tell what was approved and what the system actually did.
A decision can become stale
A reviewer approves answer revision V1. An automated rewrite then creates V2 before the application acts. Reusing the V1 approval for V2 silently changes the reviewed material. Bind the decision to the relevant artifact revision and re-evaluate when consequential content changes.
Record the minimum useful decision context
- Keep a stable review case identifier and protected artifact reference.
- Record the authenticated reviewer, applicable role or permission context, decision, and timestamp.
- Preserve an appropriate rationale or reason code without copying unnecessary sensitive content.
- Record the resulting action and its outcome separately from the approval event.
Check artifact agreement
The runnable example accepts an approval for the same case and revision, rejects a newer revision, and rejects a different case. It deliberately does not model authentication, separation of duties, or legal sufficiency of review. Those depend on the actual workflow and reviewer responsibilities.
Make review operational
Test an expired review, a reviewer who loses permission, conflicting decisions, and an action that fails after approval. A queue with a review button is not enough if no responsible person receives the case or the application proceeds before the required decision. Record unresolved and canceled cases rather than presenting them as approved.
Run the worked example
Save the synthetic Node.js example and run node record-human-review-decisions.mjs with Node.js 22 or newer. The assertions check the illustrated records and calculations; they do not test a deployed provider, SDK, or access control. No credentials or network connection are needed.
// Synthetic teaching fixture. No credentials, network calls, or production verification.
import assert from 'node:assert/strict';
const review = { caseId: 'case-1', revision: 'v1', reviewer: 'synthetic-reviewer', decision: 'approve' };
const mayProceed = artifact => review.decision === 'approve' &&
artifact.caseId === review.caseId && artifact.revision === review.revision;
assert.equal(mayProceed({ caseId: 'case-1', revision: 'v1' }), true);
assert.equal(mayProceed({ caseId: 'case-1', revision: 'v2' }), false);
assert.equal(mayProceed({ caseId: 'case-2', revision: 'v1' }), false);
console.log('Review applies only to the approved case and artifact revision.');
References and further reading
Maintained by DriftRail. AI assisted the October 2026 content and template revision. Examples are illustrative; they are not measured product benchmarks. Suggest a correction.