You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert(aiServiceContent.includes('inferKeyObservationCheckpoint'),'ai-service should infer TradingView post-key checkpoints');
253
258
assert(aiServiceContent.includes('verifyKeyObservationCheckpoint'),'ai-service should verify TradingView post-key checkpoints');
254
259
assert(aiServiceContent.includes('observationCheckpoints'),'Execution results should expose key checkpoint metadata');
255
260
assert(aiServiceContent.includes('surface change before continuing'),'Checkpoint failures should explain missing TradingView surface changes');
256
-
assert(aiServiceContent.includes("classification === 'panel-open'"),'TradingView checkpoints should recognize panel-open flows such as Pine or DOM');
257
-
assert(aiServiceContent.includes('pine editor'),'TradingView checkpoints should ground Pine Editor workflows');
258
-
assert(aiServiceContent.includes('depth of market'),'TradingView checkpoints should ground DOM workflows');
261
+
assert(aiServiceContent.includes('inferTradingViewObservationSpec'),'ai-service should consume the extracted TradingView observation-spec helper');
262
+
assert(tradingViewVerificationContent.includes("classification === 'panel-open'"),'TradingView checkpoints should recognize panel-open flows such as Pine or DOM');
263
+
assert(tradingViewVerificationContent.includes('pine editor'),'TradingView checkpoints should ground Pine Editor workflows');
264
+
assert(tradingViewVerificationContent.includes('depth of market'),'TradingView checkpoints should ground DOM workflows');
259
265
});
260
266
261
267
test('ai-service treats TradingView DOM order-entry actions as high risk',()=>{
activeGoal: 'Produce a confident synthesis of ticker LUNR in TradingView',
200
+
currentSubgoal: 'Inspect the active TradingView chart',
201
+
continuationReady: true,
202
+
degradedReason: null,
203
+
lastTurn: {
204
+
actionSummary: 'focus_window -> screenshot',
205
+
nextRecommendedStep: 'Continue from the latest chart evidence.'
206
+
}
207
+
});
208
+
assert.strictEqual(stateBackedContinuation.exitCode,0,'state-backed continuation scenario should exit successfully');
209
+
assert(stateBackedContinuation.output.includes('EXECUTE_COUNT:1'),'state-backed continuation should execute emitted actions');
210
+
assert(stateBackedContinuation.output.includes('SEEN_MESSAGES:["continue"]'),'state-backed continuation should still send the minimal prompt while execution routing relies on saved continuity');
'help me make a confident synthesis of ticker LUNR in tradingview',
214
+
'continue'
215
+
],null,[{
216
+
captureMode: 'window-copyfromscreen',
217
+
captureTrusted: true,
218
+
timestamp: 111,
219
+
windowHandle: 458868,
220
+
windowTitle: 'TradingView - LUNR'
221
+
}]);
222
+
assert.strictEqual(persistedContinuation.exitCode,0,'persisted continuation scenario should exit successfully');
223
+
assert(persistedContinuation.output.includes('EXECUTE_COUNT:2'),'persisted continuation should execute both the original and follow-up turn');
224
+
assert(persistedContinuation.output.includes('SEEN_MESSAGES:["help me make a confident synthesis of ticker LUNR in tradingview","continue"]'),'persisted continuation should keep the second user turn minimal while relying on recorded state');
225
+
assert(/RECORDED_CONTINUITY:.*"continuationReady":true/i.test(persistedContinuation.output),'persisted continuation should record usable continuity between turns');
'help me make a confident synthesis of ticker LUNR in tradingview',
229
+
'continue'
230
+
],null,[{
231
+
captureMode: 'screen-copyfromscreen',
232
+
captureTrusted: false,
233
+
timestamp: 222,
234
+
windowTitle: 'Desktop'
235
+
}]);
236
+
assert.strictEqual(persistedDegradedContinuation.exitCode,0,'persisted degraded continuation should exit successfully');
237
+
assert(persistedDegradedContinuation.output.includes('EXECUTE_COUNT:1'),'persisted degraded continuation should block the second execution');
238
+
assert(/Continuityiscurrentlydegraded/i.test(persistedDegradedContinuation.output),'persisted degraded continuation should explain degraded recovery requirements');
239
+
assert(/RECORDED_CONTINUITY:.*"continuationReady":false/i.test(persistedDegradedContinuation.output),'persisted degraded continuation should record degraded continuity after the first turn');
activeGoal: 'Add a TradingView indicator and verify it on chart',
259
+
currentSubgoal: 'Verify the indicator is present',
260
+
continuationReady: false,
261
+
degradedReason: 'The latest evidence contradicts the claimed result.',
262
+
lastTurn: {
263
+
verificationStatus: 'contradicted',
264
+
captureMode: 'window-copyfromscreen',
265
+
captureTrusted: true,
266
+
nextRecommendedStep: 'Retry indicator search before claiming success.'
267
+
}
268
+
});
269
+
assert.strictEqual(contradictedContinuation.exitCode,0,'contradicted continuation scenario should exit successfully');
270
+
assert(contradictedContinuation.output.includes('EXECUTE_COUNT:0'),'contradicted continuation should not execute emitted actions');
271
+
assert(/contradictedbythelatestevidence/i.test(contradictedContinuation.output),'contradicted continuation should explain why blind continuation is blocked');
0 commit comments