feat: require concrete evidence for progress claims

This commit is contained in:
Eve
2026-04-23 15:22:02 +08:00
parent 17449fa519
commit 180619cf87
3 changed files with 59 additions and 13 deletions

View File

@@ -30,6 +30,17 @@ const EVIDENCE_FIELDS = Object.freeze({
'verificationEvidence',
'checkpointArtifactEvidence',
]),
progressEvidence: Object.freeze([
'progressEvidence',
'progressEvidence.sessionKey',
'progressEvidence.runId',
'progressEvidence.modified_files',
'progressEvidence.verificationResult',
'sessionKey',
'runId',
'modified_files',
'verificationResult',
]),
});
const GATE_REQUIREMENTS = Object.freeze({
@@ -53,6 +64,11 @@ const GATE_REQUIREMENTS = Object.freeze({
acceptedFields: EVIDENCE_FIELDS.executionEvidence,
requiredValue: 'tool call, dispatch, file change, verification output, or checkpoint artifact evidence',
}),
progressEvidence: Object.freeze({
evidenceKey: 'progressEvidence',
acceptedFields: EVIDENCE_FIELDS.progressEvidence,
requiredValue: 'sessionKey, runId, modified_files, verification result, or equivalent concrete progress evidence',
}),
});
function fail(code, message) {
@@ -164,6 +180,16 @@ function hasExecutionEvidence(input) {
});
}
function hasProgressEvidence(input) {
return EVIDENCE_FIELDS.progressEvidence.some((fieldPath) => {
const value = getPathValue(input, fieldPath);
if (hasNonEmptyString(value)) return true;
if (Array.isArray(value)) return value.length > 0;
if (value && typeof value === 'object') return Object.keys(value).length > 0;
return false;
});
}
function claimsProgressionWithoutEvidence(input) {
const progressionClaim = EVIDENCE_FIELDS.progressionClaim
.map((fieldPath) => getPathValue(input, fieldPath))
@@ -171,7 +197,7 @@ function claimsProgressionWithoutEvidence(input) {
if (!hasNonEmptyString(progressionClaim)) return false;
return !hasExecutionEvidence(input);
return !(hasProgressEvidence(input) || hasExecutionEvidence(input));
}
function evaluateGate(input) {
@@ -215,8 +241,8 @@ function evaluateGate(input) {
if (claimsProgressionWithoutEvidence(input)) {
failed = true;
reasons.push('claimed progression without concrete execution evidence is forbidden');
requiredEvidence.push(describeRequirement(GATE_REQUIREMENTS.executionEvidence));
reasons.push('claimed progression without concrete progress evidence is forbidden');
requiredEvidence.push(describeRequirement(GATE_REQUIREMENTS.progressEvidence));
allowedResponseModes.push('evidence_preserving_follow_up');
}

View File

@@ -66,11 +66,12 @@ async function main() {
'reason=silent long-task cannot continue without externalized checkpoint path',
'reason=claimed execution requires evidence of a concrete next action',
'reason=owner decision flow must end in button-path, not plain text',
'reason=claimed progression without concrete execution evidence is forbidden',
'requiredEvidence=executionEvidence',
'reason=claimed progression without concrete progress evidence is forbidden',
'requiredEvidence=progressEvidence',
'requiredValue=sessionKey, runId, modified_files, verification result, or equivalent concrete progress evidence',
'HARD_GATE: Block any plain-text handoff or silent-continuation claim when externalized checkpoint evidence is missing.',
'HARD_GATE: Block any reply path that says you already moved into the next task or are advancing the next step without concrete execution evidence.',
'HARD_GATE: Do not say you are already on the next task, already dispatched follow-up work, or already progressing in background unless you can point to actual tool execution, file changes, emitted messages, or checkpoint records.',
'HARD_GATE: Block any reply path that says you already moved into the next task or are advancing the next step without concrete progress evidence.',
'HARD_GATE: Do not say you are already on the next task, already dispatched follow-up work, or already progressing in background unless you can point to a sessionKey, runId, modified_files record, verification result, actual tool execution, file changes, emitted messages, or checkpoint records.',
'ENFORCEMENT: Forbidden path: plain-text handoff that pretends the long task is already continuing without an externalized checkpoint.',
'ENFORCEMENT: Forbidden path: stating you have already entered the next task/step when the record only contains planning language and no concrete execution evidence.',
];
@@ -98,7 +99,7 @@ async function main() {
'[LONG_TASK_GATE_LOCK]',
'gateStatus=degraded',
'gateRequired=unknown',
'HARD_GATE: Evaluator unavailable is not permission to claim silent continuation or next-task progression without verifiable evidence.',
'HARD_GATE: Evaluator unavailable is not permission to claim silent continuation or next-task progression without verifiable progress evidence.',
'HARD_GATE: Fall back to a non-silent, evidence-preserving follow-up if you cannot prove checkpoint state or concrete execution.',
];