pbakaus/impeccable · warning
[impeccable] apply returned no verified edits:
Error message
[impeccable] apply returned no verified edits:
What it means
The impeccable live-mode browser script logs this warning when the POST to the local server's /manual-edit-commit endpoint succeeds (HTTP 2xx) but the response contains no verified applied edits — result.applied is empty/not an array and result.cleared is 0. It is a sanity check that the commit actually changed the source; the server may have journal-cleared entries without writing them, or returned an unexpected shape. A toast tells the user no edits landed and the full server response is dumped to the console for diagnosis.
Source
Thrown at skill/scripts/live-browser.js:4145
const errBody = await res.json().catch(() => ({}));
throw new Error(errBody.error || ('HTTP ' + res.status));
}
const result = await res.json();
if (res.status === 202 || result.status === 'started') {
waitForSseCompletion = true;
return;
}
const remaining = remainingManualEditCount(result);
updatePendingCounter(remaining);
if (result.failed && result.failed.length > 0) {
console.warn('[impeccable] some copy edits failed:', result.failed);
showToast('Applied ' + (result.applied?.length || 0) + ', ' + result.failed.length + ' failed - see console', 5000);
} else {
const n = Array.isArray(result.applied) ? result.applied.length : (result.cleared || 0);
if (n > 0) {
showToast('Applied ' + n + ' edit' + (n === 1 ? '' : 's'), 2500);
} else {
console.warn('[impeccable] apply returned no verified edits:', result);
showToast('No edits applied - see console', 4000);
}
}
} catch (err) {
console.error('[impeccable] commit failed:', err);
showToast('Apply failed - see console', 4000);
} finally {
if (waitForSseCompletion) return;
const remainingCount = parseInt(pendingPillEl?.dataset.count || '0', 10) || 0;
if (remainingCount > 0) setPendingApplyLoading(false);
else hidePendingApplyDock();
}
}
async function onPendingTrashClick() {
const count = parseInt(pendingPillEl?.dataset.count || '0', 10);
if (count <= 0 || pendingApplyInFlight) return;
const ok = confirm('Discard ' + count + ' copy edit' + (count === 1 ? '' : 's') + ' on this page?');View on GitHub (pinned to 2bc2879276)
Solutions
- Open the browser console and inspect the logged result object to see what the server actually returned (status, cleared, failed).
- Refresh the page so the pending count re-syncs from the server's /manual-edit-stash endpoint, then retry the apply.
- Re-pick the element and redo the copy edit if the stash contained edits pointing at DOM that no longer exists.
- Check that the impeccable engine/server version matches the in-page script version (mismatched shapes cause empty applied arrays).
Example fix
// before: applying possibly stale stash blindly
await fetch('.../manual-edit-commit?async=1', { method: 'POST' });
// after: check stash is non-empty and server response is sane before committing
const pre = await fetch('.../manual-edit-stash?...').then(r => r.json());
if (!pre.count) { showToast('No pending edits to apply'); return; }
const result = await fetch('.../manual-edit-commit', { method: 'POST' }).then(r => r.json());
if (!(result.applied?.length || result.cleared)) console.warn('no verified edits:', result); Defensive patterns
Strategy: validation
Validate before calling
const pre = await fetch('/manual-edit-stash?...').then(r => r.json()).catch(() => null);
if (!pre || !pre.count) return; // nothing to apply; skip commit
// after commit, before trusting UI:
const applied = Array.isArray(result.applied) ? result.applied.length : (result.cleared || 0);
if (applied === 0) console.warn('commit verified no edits:', result); Type guard
function hasVerifiedEdits(result) {
return Array.isArray(result?.applied) && result.applied.length > 0
|| (typeof result?.cleared === 'number' && result.cleared > 0);
} Try / catch
try {
const result = await commitRes.json();
if (!hasVerifiedEdits(result)) {
console.warn('[impeccable] apply returned no verified edits:', result);
// surface non-blocking toast, keep stash for retry after refresh
}
} catch (err) {
console.error('[impeccable] commit failed:', err);
} Prevention
- Refresh the page before applying a long-lived stash so DOM references are re-validated.
- Check /manual-edit-stash count before committing to avoid empty commits.
- Keep the engine/server and in-page script versions in lockstep.
- Use a single browser tab per project during live sessions.
When it happens
Trigger: Clicking the pending-changes pill in live mode and confirming 'Apply N copy edits to source' when the /manual-edit-commit response parses but yields applied.length === 0 and cleared === 0; e.g. the server verified zero ops because stashed edits were stale, already consumed, or filtered out as unsafe before any write.
Common situations: Stale stash from a previous page whose entries were cleared server-side; edits the server rejected as unsafe-to-write (removed elements, changed DOM); a server version mismatch where the response shape changed; two browser tabs sharing the same stash so one tab already committed the edits.
Understand the failure class
Background: "empty response", "returned no data", "empty embeddings": what HTTP 200-with-empty-body errors mean across libraries — this error's family across 36 libraries.
Related errors
- [impeccable] skipped unsafe copy edit DOM restore for
- [impeccable] The live server has no record of session
- Status failed: ${res.status} ${res.statusText}
- Poll failed: ${res.status} ${res.statusText}
- Live browser script part missing: ${part.name} (${part.path}
AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08).
Data as JSON: /api/errors/9ebf02f8c36411a6.
Report an issue: GitHub.