ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.
Python ai-agentsamdcomfyuidockerllama-cppllmlocal-ain8nnvidiaopen-webuiragself-hostedspeech-to-textstrix-halotext-to-speechworkflow-automation
import test from 'node:test';
import assert from 'node:assert/strict';
import {createHash} from 'node:crypto';
import * as fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import {createToolLoopGuard, WORKSPACE_PREVIEW_COMPLETE_REASON} from '../plugin/tool-loop-guard.mjs';
import {extractRequestedLiterals, missingRequestedText, requestedTextCheck, requestedTextInstruction,
requestedTextRevisionInstruction, requestedTextDeliveryNote, MAX_REQUESTED_LITERALS} from '../plugin/requested-literals.mjs';
// Owner prompts from ODS main qualification r049 (tower2 round 058).
const FLEET_CREATE = 'Create a polished responsive static event website in a new workspace directory fleet-qualification-4704eac67f72. Actually write files and publish a verified Pixel workspace preview. Page title and one h1 must be exactly "Night Garden FLEET-068aa1af7e". Include three event cards: Dawn jazz, River lantern walk, and Midnight sold-out concert. Initially hide the entire Midnight sold-out concert card. Provide an accessible button named exactly "Show sold out" that reveals that card when clicked. Mobile width 375px must not overflow horizontally. Use semantic HTML, attractive CSS, working JavaScript, no external libraries, no localStorage dependency. Include the preview URL in your final response. Do the work now.';
const FLEET_EDIT = 'Update that same website: change both page title and h1 to exactly "Night Garden FLEET-068aa1af7e Revised", change the accent to amber, add a visible footer "FLEET-068aa1af7e edited successfully". Preserve all three event cards and the working Show sold out behavior. Publish the updated preview and provide its new URL.';
const PT_CREATE = 'Crie um site de eventos responsivo no novo diretório jardim-noturno e publique a prévia. O título da página e um h1 devem ser exatamente “Jardim Noturno”. Inclua três cartões de evento: Jazz ao amanhecer, Caminhada das lanternas e Show esgotado da meia-noite. Adicione um botão chamado “Mostrar esgotados”.';
const DIRECTORY = 'fleet-qualification-4704eac67f72';
// Shape of the delivered tower2 artifact: renamed first card, comments that
// still carry the owner's wording, and a separate script.
function eventPage({title = 'Night Garden FLEET-068aa1af7e', h1 = title, dawn = 'Jazz at Dawn',
river = 'River Lantern Walk', midnight = 'Midnight Sold-Out Concert', button = 'Show sold out', footer = '',
comment = 'Dawn Jazz Event'} = {}) {
return `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>${title}</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="hero"><h1>${h1}</h1></header>
<main>
<!-- ${comment} -->
<article class="event-card"><span class="event-tag">Dawn</span>
<h3 class="event-title">${dawn}</h3>
<button aria-label="Register for ${dawn}">Register</button></article>
<!-- River Lantern Walk Event -->
<article class="event-card"><h3 class="event-title">${river}</h3></article>
<article class="event-card" id="midnight-concert-card" hidden><h3 class="event-title">${midnight}</h3></article>
<button id="show-sold-out-btn" aria-expanded="false">
${button}
</button>
</main>
<footer><p>© 2026 Night Garden. ${footer}</p></footer>
<script src="script.js"></script>
</body>
</html>
`;
}
const SCRIPT = `/**
* Night Garden FLEET-068aa1af7e
*/
(function () {
const button = document.getElementById('show-sold-out-btn');
button.addEventListener('click', () => { button.textContent = 'Hide sold out'; });
})();
`;
const site = (html, script = SCRIPT) => [{path: 'index.html', text: html}, {path: 'script.js', text: script}];
test('fleet create prompt yields the quoted exact strings and the counted card names', () => {
assert.deepEqual(extractRequestedLiterals(FLEET_CREATE).map(literal => ({...literal})), [
{text: 'Night Garden FLEET-068aa1af7e', match: 'exact', targets: ['page title', 'h1']},
{text: 'Show sold out', match: 'exact', targets: []},
{text: 'Dawn jazz', match: 'item', targets: ['heading'], list: 0},
{text: 'River lantern walk', match: 'item', targets: ['heading'], list: 0},
{text: 'Midnight sold-out concert', match: 'item', targets: ['heading'], list: 0},
]);
});
test('fleet edit prompt binds the revised title to both title and h1, and the footer text', () => {
assert.deepEqual(extractRequestedLiterals(FLEET_EDIT).map(literal => ({...literal})), [
{text: 'Night Garden FLEET-068aa1af7e Revised', match: 'exact', targets: ['page title', 'h1']},
{text: 'FLEET-068aa1af7e edited successfully', match: 'caseless', targets: []},
]);
});
test('Portuguese owner wording is extracted the same way', () => {
assert.deepEqual(extractRequestedLiterals(PT_CREATE).map(literal => ({...literal})), [
{text: 'Jardim Noturno', match: 'exact', targets: ['page title', 'h1']},
{text: 'Mostrar esgotados', match: 'caseless', targets: []},
{text: 'Jazz ao amanhecer', match: 'item', targets: ['heading'], list: 0},
{text: 'Caminhada das lanternas', match: 'item', targets: ['heading'], list: 0},
{text: 'Show esgotado da meia-noite', match: 'item', targets: ['heading'], list: 0},
]);
const page = '<title>Jardim Noturno</title><h1>Jardim Noturno</h1><h3>Jazz ao Amanhecer</h3>' +
'<h3>Caminhada das Lanternas</h3><h3>Show da meia-noite</h3><button>Mostrar esgotados</button>';
assert.deepEqual(missingRequestedText(extractRequestedLiterals(PT_CREATE), [{path: 'index.html', text: page}]),
[{text: 'Show esgotado da meia-noite'}]);
});
test('unquoted, example, code, negated and non-page quotations are not requirements', () => {
for (const prompt of [
'Create a landing page with a hero, pricing and contact sections and publish it.',
'Create a landing page with a title like "Welcome" and a hero button, e.g. "Buy now".',
'Publish a page whose heading is something like "Hello there" or similar.',
'Build a page with a banner (for example "Spring sale").',
'Publish a website. Example heading: "Grow local".',
'Build a page.\n```html\n<h1>named exactly "Hello"</h1>\n```\nUse `button named "Go"` in the code.',
'Build a page.\n> The title must be exactly "Quoted mail"',
'Reply with exactly "DONE". Create a file named exactly "notes.txt" and a directory called "my-site".',
'Create a page in a workspace directory named exactly "night-garden".',
'Input header must be exactly "category,amount". The marker must be exactly "FLEET-1".',
'Do not call the page "Untitled". Change the heading from "Old heading" to something else.',
'Replace the text "Foo" on the page.',
'Give the page a heading "Home" or "Start".',
'Add a link to "https://example.com/docs" and a button with id "save-button".',
'Include three sections: hero, pricing, and contact.',
'Include three cards: a photo, a price, and a map.',
'Include three cards: photo, price, and map.',
"Don't add a button labeled \"Delete\".",
'Add a page button that saves a file named exactly "Quarterly Report".',
'The page must print exactly "Hello World" to the console.',
'Follow three steps: Plan, Build, Publish.',
'Include three event cards: Dawn jazz, River walk.',
'Include two cards: Alpha or Beta.',
'Create a CSV expense CLI; e.g. food 0.10+0.20 yields {"food":"0.30"}. Exact JSON schema: {"observedAt":"UTC ISO timestamp"}.',
'Do not include three cards: Alpha, Beta, and Gamma.',
]) assert.deepEqual(extractRequestedLiterals(prompt), [], prompt);
});
test('extraction is bounded in count and length', () => {
const many = Array.from({length: 20}, (_, index) => `Add a button named "Action ${index}".`).join(' ');
assert.equal(extractRequestedLiterals(many).length, MAX_REQUESTED_LITERALS);
assert.deepEqual(extractRequestedLiterals(`The h1 must be exactly "${'Long '.repeat(40)}".`), []);
assert.deepEqual(extractRequestedLiterals(`Include three cards: ${'Very long name '.repeat(8)}, Beta, and Gamma.`), []);
});
test('the delivered fleet page misses only the renamed card; comments and aria labels do not count', () => {
const literals = extractRequestedLiterals(FLEET_CREATE);
assert.deepEqual(missingRequestedText(literals, site(eventPage())), [{text: 'Dawn jazz'}]);
assert.deepEqual(missingRequestedText(literals, site(eventPage({dawn: 'Dawn Jazz Session'}))), [{text: 'Dawn jazz'}],
'a longer heading that merely contains the name is a renaming');
assert.deepEqual(missingRequestedText(literals, site(eventPage({dawn: '🎷 Dawn jazz'}))), []);
assert.deepEqual(missingRequestedText(literals, site(eventPage({dawn: 'Dawn jazz'}))), []);
assert.deepEqual(missingRequestedText(literals, site(eventPage({comment: 'Dawn jazz'}))), [{text: 'Dawn jazz'}]);
});
test('exact strings are case-sensitive; card names are not', () => {
const literals = extractRequestedLiterals(FLEET_CREATE);
assert.deepEqual(missingRequestedText(literals, site(eventPage({dawn: 'DAWN JAZZ', button: 'Show Sold Out'}))),
[{text: 'Show sold out'}]);
assert.deepEqual(missingRequestedText(literals, site(eventPage({dawn: 'Dawn jazz', title: 'Night garden FLEET-068aa1af7e'}))),
[{text: 'Night Garden FLEET-068aa1af7e', target: 'page title'}, {text: 'Night Garden FLEET-068aa1af7e', target: 'h1'}]);
});
test('edit round: title changed but h1 left behind is reported against the h1', () => {
const literals = extractRequestedLiterals(FLEET_EDIT);
const revised = 'Night Garden FLEET-068aa1af7e Revised';
assert.deepEqual(missingRequestedText(literals, site(eventPage({title: revised, h1: 'Night Garden FLEET-068aa1af7e',
footer: 'FLEET-068aa1af7e edited successfully'}))), [{text: revised, target: 'h1'}]);
assert.deepEqual(missingRequestedText(literals, site(eventPage({title: revised, footer: 'FLEET-068aa1af7e edited successfully'}))), []);
assert.deepEqual(missingRequestedText(literals, site(eventPage({title: revised}))), [{text: 'FLEET-068aa1af7e edited successfully'}]);
assert.deepEqual(missingRequestedText(literals, site(eventPage({title: revised, h1: 'Night Garden<br>FLEET-068aa1af7e <em>Revised</em>',
footer: 'FLEET-068aa1af7e edited <b>successfully</b>'}))), []);
});
test('text a script may render at runtime is never reported missing', () => {
const literals = extractRequestedLiterals(FLEET_CREATE);
const rendered = eventPage({dawn: ''}).replace('<h3 class="event-title"></h3>', '');
assert.deepEqual(missingRequestedText(literals, site(rendered, `const events = [{title: 'Dawn jazz'}];${SCRIPT}`)), []);
assert.deepEqual(missingRequestedText(literals, [{path: 'index.html', text: rendered.replace('<script src="script.js"></script>',
'<script>document.title = "x"; render("Dawn jazz");</script>')}]), []);
assert.deepEqual(missingRequestedText(literals, [...site(rendered), {path: 'events.json', text: '[{"name":"Dawn jazz"}]'}]), []);
// Whole-line script and CSS comments are not rendered text.
assert.deepEqual(missingRequestedText(literals, site(rendered, `// Dawn jazz card\n/* Dawn jazz\n */\n${SCRIPT}`)), [{text: 'Dawn jazz'}]);
assert.deepEqual(missingRequestedText(literals, [...site(rendered), {path: 'styles.css', text: '/* Dawn jazz */ .card{}'}]), [{text: 'Dawn jazz'}]);
assert.deepEqual(missingRequestedText(literals, site(eventPage({dawn: 'Dawn & jazz'}))), [{text: 'Dawn jazz'}]);
assert.deepEqual(missingRequestedText(extractRequestedLiterals('Add a button named "Rock & Roll".'),
[{path: 'index.html', text: '<button>Rock & Roll</button>'}]), []);
});
function snapshot(files, relativeDirectory = DIRECTORY) {
const entries = Object.entries(files).sort(([a], [b]) => a < b ? -1 : 1);
const digest = createHash('sha256');
let bytes = 0;
for (const [name, content] of entries) {
const encodedName = Buffer.from(name), data = Buffer.from(content), a = Buffer.alloc(4), b = Buffer.alloc(8);
a.writeUInt32BE(encodedName.length); b.writeBigUInt64BE(BigInt(data.length));
digest.update(a).update(encodedName).update(b).update(data);
bytes += data.length;
}
const sha256 = digest.digest('hex'), siteId = `site-${sha256.slice(0, 24)}`;
return {schemaVersion: 1, kind: 'ods-pixel-workspace-preview', status: 'succeeded', relativeDirectory, siteId, sha256,
entryFile: 'index.html', entrySha256: createHash('sha256').update(files['index.html']).digest('hex'),
files: entries.length, bytes, port: 9437, url: `http://${siteId}.localhost:9437/${siteId}/`, httpStatus: 200,
readbackVerified: true, executable: false, overwritten: false,
boundary: 'Create-only static-site snapshot from the configured Pixel workspace to a dedicated loopback preview origin; no arbitrary host path, network destination, server process, overwrite, or execution authority.',
publishedPaths: entries.map(([name]) => name), publishedPathsOmitted: 0};
}
function workspace(files, relativeDirectory = DIRECTORY) {
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'pixel-literals-'));
for (const [name, content] of Object.entries(files)) {
const file = path.join(root, relativeDirectory, name);
fs.mkdirSync(path.dirname(file), {recursive: true});
fs.writeFileSync(file, content);
}
return root;
}
test('workspace snapshots check requested text with dynamic framework asset paths', t => {
const literals = extractRequestedLiterals(FLEET_CREATE);
const files = {'index.html': eventPage(), '_next/static/chunks/app/[slug]/page.js': 'export {}', '_next/static/app.js':'export {}', '_astro/page.css':'body{}'};
const preview = snapshot(files);
const root = workspace(files);
t.after(() => fs.rmSync(root, {recursive: true, force: true}));
assert.deepEqual([...requestedTextCheck(literals, preview, {receipt: preview, workspaceRoot: root}).missing], [{text: 'Dawn jazz'}]);
// A framework path does not relax the hidden and reserved path boundary.
for (const name of ['__ods_route/x.js', '__pycache__/x.js', '.hidden/x.js']) {
const reserved = {'index.html': eventPage(), [name]: 'x'};
const reservedRoot = workspace(reserved);
t.after(() => fs.rmSync(reservedRoot, {recursive: true, force: true}));
assert.equal(requestedTextCheck(literals, snapshot(reserved), {receipt: snapshot(reserved), workspaceRoot: reservedRoot}), undefined, name);
}
});
test('checks bind only to bytes that reproduce the published snapshot digest', t => {
const literals = extractRequestedLiterals(FLEET_CREATE);
const files = {'index.html': eventPage(), 'script.js': SCRIPT, 'logo.png': '\x89PNG'};
const preview = snapshot(files);
const tracked = new Map(Object.entries(files).map(([name, content]) => [`${DIRECTORY}/${name}`, content]));
const fromTracked = requestedTextCheck(literals, preview, {trackedContent: tracked});
assert.deepEqual({...fromTracked, missing: [...fromTracked.missing]},
{siteId: preview.siteId, sha256: preview.sha256, missing: [{text: 'Dawn jazz'}]});
const root = workspace(files);
t.after(() => fs.rmSync(root, {recursive: true, force: true}));
assert.deepEqual([...requestedTextCheck(literals, preview, {receipt: preview, workspaceRoot: root}).missing], [{text: 'Dawn jazz'}]);
// Stale tracked content falls back to the workspace; changed workspace bytes are not the snapshot.
tracked.set(`${DIRECTORY}/index.html`, eventPage({dawn: 'Dawn jazz'}));
assert.deepEqual([...requestedTextCheck(literals, preview, {receipt: preview, trackedContent: tracked, workspaceRoot: root}).missing],
[{text: 'Dawn jazz'}]);
fs.writeFileSync(path.join(root, DIRECTORY, 'index.html'), eventPage({dawn: 'Dawn jazz'}));
assert.equal(requestedTextCheck(literals, preview, {receipt: preview, workspaceRoot: root}), undefined);
assert.equal(requestedTextCheck(literals, preview, {receipt: {...preview, publishedPathsOmitted: 1}, workspaceRoot: root}), undefined);
assert.equal(requestedTextCheck(literals, preview, {receipt: preview, workspaceRoot: 'relative/root'}), undefined);
assert.equal(requestedTextCheck([], preview, {trackedContent: tracked}), undefined);
const single = {'index.html': eventPage()};
const singleRoot = workspace(single);
t.after(() => fs.rmSync(singleRoot, {recursive: true, force: true}));
const {publishedPaths, publishedPathsOmitted, ...legacy} = snapshot(single);
assert.deepEqual([...requestedTextCheck(literals, legacy, {receipt: legacy, workspaceRoot: singleRoot}).missing], [{text: 'Dawn jazz'}]);
});
test('instruction and delivery note are snapshot-bound and byte-stable apart from the literals', () => {
const preview = snapshot({'index.html': eventPage()});
const check = {siteId: preview.siteId, sha256: preview.sha256,
missing: [{text: 'Dawn jazz'}, {text: 'Night Garden FLEET-068aa1af7e Revised', target: 'h1'}]};
assert.equal(requestedTextInstruction(preview, check),
'Requested text not found: "Dawn jazz", "Night Garden FLEET-068aa1af7e Revised" (h1). Use the owner\'s exact wording, republish and re-inspect.');
assert.match(requestedTextDeliveryNote(preview, check), /^The published page does not contain text the owner requested: "Dawn jazz"/);
assert.equal(requestedTextInstruction({...preview, sha256: 'f'.repeat(64)}, check), undefined);
assert.equal(requestedTextInstruction(preview, {...check, missing: []}), undefined);
assert.equal(requestedTextDeliveryNote(undefined, check), undefined);
});
const context = {agentId: 'pixel', runId: 'run', sessionId: 'session', sessionKey: 'opaque-key'};
function call(guard, name, params, id, result, runContext = context) {
const ctx = {...runContext, toolName: name, toolCallId: id};
const event = {toolName: name, runId: runContext.runId, toolCallId: id, params};
const prepared = guard.beforeToolCall(event, ctx);
assert.notEqual(prepared?.block, true, prepared?.blockReason);
event.params = prepared?.params ?? params;
if (result) guard.afterToolCall({...event, result}, ctx);
return {event, ctx};
}
const persist = (guard, name, id, result, runContext = context) => guard.toolResultPersist(
{toolName: name, toolCallId: id, message: {role: 'toolResult', toolName: name, toolCallId: id, ...result}},
{...runContext, toolName: name, toolCallId: id});
const text = persisted => (persisted?.message?.content ?? []).map(block => block.text).join('\n');
const written = {content: [{type: 'text', text: 'Successfully wrote file.'}]};
function publishSite(guard, files, id, runContext = context) {
for (const [name, content] of Object.entries(files)) {
call(guard, 'write', {path: `${DIRECTORY}/${name}`, content}, `${id}-write-${name}`, written, runContext);
}
const preview = snapshot(files);
call(guard, 'pixel_ods_workspace_preview', {relativeDirectory: DIRECTORY}, id, {details: preview}, runContext);
return preview;
}
test('a renamed card is reported in the publication result, gates the claim once, and clears after repair', () => {
const guard = createToolLoopGuard({workspacePreviewInspectionAvailable: false});
guard.observeRun(context, 'pixel', {prompt: FLEET_CREATE});
const preview = publishSite(guard, {'index.html': eventPage(), 'script.js': SCRIPT}, 'publish');
const instruction = '[ODS Pixel next step] Requested text not found: "Dawn jazz". Use the owner\'s exact wording, republish and re-inspect.';
const published = persist(guard, 'pixel_ods_workspace_preview', 'publish', {content: [{type: 'text', text: 'published'}], details: preview});
assert.equal(published.message.isError, undefined, 'publication itself is never turned into a failure');
assert.ok(text(published).includes(instruction));
const outcome = guard.verificationForRun('run');
assert.equal(outcome.status, 'failed');
assert.equal(outcome.preview.sha256, preview.sha256, 'the published preview stays available');
assert.match(outcome.text, /does not contain text the owner requested: "Dawn jazz"/);
const retry = guard.beforeAgentFinalize({}, context)?.retry;
assert.equal(retry?.idempotencyKey, 'pixel-ods-workspace-preview-requested-text');
assert.equal(retry?.maxAttempts, 1);
assert.equal(retry?.instruction, requestedTextRevisionInstruction(preview, {siteId: preview.siteId, sha256: preview.sha256,
missing: [{text: 'Dawn jazz'}]}));
// Identical coaching is not repeated on the next results (coachingDue), and
// the finalization request already spent this run's one revision.
call(guard, 'read', {path: `${DIRECTORY}/index.html`}, 'read', {content: [{type: 'text', text: eventPage()}]});
assert.doesNotMatch(text(persist(guard, 'read', 'read', {content: [{type: 'text', text: eventPage()}]})), /Requested text/);
const repaired = publishSite(guard, {'index.html': eventPage({dawn: 'Dawn jazz'}), 'script.js': SCRIPT}, 'republish');
assert.notEqual(repaired.sha256, preview.sha256);
const republished = persist(guard, 'pixel_ods_workspace_preview', 'republish', {content: [{type: 'text', text: 'published'}], details: repaired});
assert.ok(!text(republished).includes('Requested text not found'));
assert.ok(text(republished).includes(WORKSPACE_PREVIEW_COMPLETE_REASON));
assert.equal(guard.verificationForRun('run').status, 'passed');
assert.equal(guard.beforeAgentFinalize({}, context), undefined);
});
test('the requested-text repair precedes interaction inspection coaching', () => {
const guard = createToolLoopGuard({workspacePreviewInspectionAvailable: true});
guard.observeRun(context, 'pixel', {prompt: FLEET_CREATE});
const preview = publishSite(guard, {'index.html': eventPage(), 'script.js': SCRIPT}, 'publish');
const published = text(persist(guard, 'pixel_ods_workspace_preview', 'publish', {content: [{type: 'text', text: 'published'}], details: preview}));
assert.match(published, /Requested text not found: "Dawn jazz"/);
assert.doesNotMatch(published, /pixel_ods_workspace_preview_inspect directly/);
assert.equal(guard.beforeAgentFinalize({}, context)?.retry?.idempotencyKey, 'pixel-ods-workspace-preview-requested-text');
});
test('edit round read from the workspace: title changed, h1 not', t => {
const revised = 'Night Garden FLEET-068aa1af7e Revised';
const original = {'index.html': eventPage({dawn: 'Dawn jazz'}), 'script.js': SCRIPT};
const root = workspace(original);
t.after(() => fs.rmSync(root, {recursive: true, force: true}));
const guard = createToolLoopGuard({workspacePreviewInspectionAvailable: false});
guard.observeRun(context, 'pixel', {prompt: FLEET_CREATE}, {workspaceRoot: root});
const first = publishSite(guard, original, 'publish');
assert.equal(guard.verificationForRun('run').status, 'passed');
const edit = {...context, runId: 'edit'};
guard.observeRun(edit, 'pixel', {prompt: FLEET_EDIT}, {workspaceRoot: root});
const indexPath = `${DIRECTORY}/index.html`;
call(guard, 'read', {path: indexPath}, 'edit-read', {content: [{type: 'text', text: original['index.html']}]}, edit);
const edited = original['index.html'].replace('<title>Night Garden FLEET-068aa1af7e</title>', `<title>${revised}</title>`)
.replace('© 2026 Night Garden. ', '© 2026 Night Garden. FLEET-068aa1af7e edited successfully');
call(guard, 'edit', {path: indexPath, edits: [{oldText: '<title>Night Garden FLEET-068aa1af7e</title>', newText: `<title>${revised}</title>`}]},
'edit-edit', {content: [{type: 'text', text: 'Successfully edited file.'}]}, edit);
fs.writeFileSync(path.join(root, DIRECTORY, 'index.html'), edited);
const next = snapshot({...original, 'index.html': edited});
assert.notEqual(next.sha256, first.sha256);
call(guard, 'pixel_ods_workspace_preview', {relativeDirectory: DIRECTORY}, 'edit-publish', {details: next}, edit);
const published = text(persist(guard, 'pixel_ods_workspace_preview', 'edit-publish', {content: [{type: 'text', text: 'published'}], details: next}, edit));
assert.ok(published.includes(`Requested text not found: "${revised}" (h1). Use the owner's exact wording, republish and re-inspect.`));
assert.equal(guard.verificationForRun('edit').status, 'failed');
assert.equal(guard.beforeAgentFinalize({}, edit)?.retry?.idempotencyKey, 'pixel-ods-workspace-preview-requested-text');
});
test('requests without required literals keep the existing publication outcome', () => {
const guard = createToolLoopGuard({workspacePreviewInspectionAvailable: false});
guard.observeRun(context, 'pixel', {prompt: `Create and publish a static event website in a new workspace directory ${DIRECTORY}. Make it colorful.`});
const preview = publishSite(guard, {'index.html': eventPage(), 'script.js': SCRIPT}, 'publish');
const published = text(persist(guard, 'pixel_ods_workspace_preview', 'publish', {content: [{type: 'text', text: 'published'}], details: preview}));
assert.doesNotMatch(published, /Requested text/);
assert.equal(guard.verificationForRun('run').status, 'passed');
assert.equal(guard.beforeAgentFinalize({}, context), undefined);
});