Summary
The retest queue (web_retest_queue table) accumulates items but nothing ever dequeues or processes them. The agent declares "test complete" while dozens of high-priority retest items remain pending.
Root Cause
Five interconnected gaps:
1. No consumer exists
WebRetest.next() is defined in src/session/web/web-retest.ts but never called anywhere in the codebase. No dequeue loop, no IngestQueue integration, no processing pipeline.
2. Orchestrator prompt makes a false promise
src/agent/prompt/orchestrator/web-proxy-agent/prompt.txt Step 7 says:
"Check web_get_session_context for pending re-tests. If there are high-priority items, the system will feed them as new requests."
No such system exists.
3. Agent has no tools to process retests
The proxy-agent's permission set has no ability to update retest status, re-ingest requests, or enqueue anything into IngestQueue.
4. Completion check ignores retest queue
IngestQueue considers itself done when pending === 0 (queued HTTP requests). It never queries WebRetest.count() or WebRetest.getPending() before declaring finished.
5. Per-request isolation
Each ingest invocation uses excludeHistory: true — the orchestrator has no accumulated awareness that a retest queue is growing across requests.
How items accumulate
web_write_object_value tool → WebRetest.checkTriggers() → up to 20 retest items per trigger (priority: high when related object IDs exist)
web_write_role tool → WebRetest.checkTriggers() → up to 20 retest items per trigger (priority: medium)
new_credential trigger type is defined but never called from any code
Observed behavior
43 retest items marked "high pending" in TUI sidebar while agent reports test complete.
Proposed fix
A) Auto-retest pipeline — After IngestQueue drains, automatically feed pending retest items back as new ingest tasks. Most robust.
C) Completion gate — Block "test complete" signal until retest queue is empty or explicitly skipped.
Both A and C should be implemented together.
Affected files
src/session/web/web-retest.ts — WebRetest.next() exists but unused
src/session/ingest-queue.ts — No retest awareness
src/agent/prompt/orchestrator/web-proxy-agent/prompt.txt — False "system will feed" claim
src/tool/web-write-object-value.ts — Trigger source
src/tool/web-write-role.ts — Trigger source
src/tool/web-get-session-context.ts — Retest queue only shown on opt-in
Summary
The retest queue (
web_retest_queuetable) accumulates items but nothing ever dequeues or processes them. The agent declares "test complete" while dozens of high-priority retest items remain pending.Root Cause
Five interconnected gaps:
1. No consumer exists
WebRetest.next()is defined insrc/session/web/web-retest.tsbut never called anywhere in the codebase. No dequeue loop, no IngestQueue integration, no processing pipeline.2. Orchestrator prompt makes a false promise
src/agent/prompt/orchestrator/web-proxy-agent/prompt.txtStep 7 says:No such system exists.
3. Agent has no tools to process retests
The proxy-agent's permission set has no ability to update retest status, re-ingest requests, or enqueue anything into IngestQueue.
4. Completion check ignores retest queue
IngestQueue considers itself done when
pending === 0(queued HTTP requests). It never queriesWebRetest.count()orWebRetest.getPending()before declaring finished.5. Per-request isolation
Each ingest invocation uses
excludeHistory: true— the orchestrator has no accumulated awareness that a retest queue is growing across requests.How items accumulate
web_write_object_valuetool →WebRetest.checkTriggers()→ up to 20 retest items per trigger (priority: high when related object IDs exist)web_write_roletool →WebRetest.checkTriggers()→ up to 20 retest items per trigger (priority: medium)new_credentialtrigger type is defined but never called from any codeObserved behavior
43 retest items marked "high pending" in TUI sidebar while agent reports test complete.
Proposed fix
A) Auto-retest pipeline — After IngestQueue drains, automatically feed pending retest items back as new ingest tasks. Most robust.
C) Completion gate — Block "test complete" signal until retest queue is empty or explicitly skipped.
Both A and C should be implemented together.
Affected files
src/session/web/web-retest.ts— WebRetest.next() exists but unusedsrc/session/ingest-queue.ts— No retest awarenesssrc/agent/prompt/orchestrator/web-proxy-agent/prompt.txt— False "system will feed" claimsrc/tool/web-write-object-value.ts— Trigger sourcesrc/tool/web-write-role.ts— Trigger sourcesrc/tool/web-get-session-context.ts— Retest queue only shown on opt-in