Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/resources/extensions/gsd/auto-post-unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,6 @@ export async function postUnitPreVerification(pctx: PostUnitContext, opts?: PreV
if (safetyConfig.evidence_cross_reference && s.currentUnit.type === "execute-task") {
try {
const actual = getEvidence();
const bashCalls = actual.filter(e => e.kind === "bash");
if (sMid && sSid && sTid && isDbAvailable()) {
const taskRow = getTask(sMid, sSid, sTid);
if (taskRow?.status === "complete") {
Expand All @@ -1027,10 +1026,13 @@ export async function postUnitPreVerification(pctx: PostUnitContext, opts?: PreV
}
}

if (claimedEvidence.length > 0 && bashCalls.length === 0) {
logWarning("safety", "task claimed verification command evidence but no execution tool calls were recorded");
const missingCommandMismatches = mismatches.filter((mismatch) => (
mismatch.severity === "warning" && mismatch.actual === null
));
if (missingCommandMismatches.length > 0) {
logWarning("safety", `evidence mismatch: ${missingCommandMismatches.length} claimed command(s) not found in bash calls`);
ctx.ui.notify(
`Safety: task ${sTid} claimed command evidence but no execution tool calls were recorded`,
`Safety: task ${sTid} claimed ${missingCommandMismatches.length} command(s) not found in recorded bash calls`,
"warning",
);
}
Expand Down
Loading