Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 15 additions & 5 deletions examples/circle-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,21 @@ async function demoStaleQuoteAdvisory() {
} catch (e: any) {
console.log(`\n┌─ Scenario 5 result ──────────────────────────────────────`);
console.log(`│ ✓ Stale quote detected and recorded.`);
console.log(`│ Capsule: stale_quote → observe (advisory)`);
console.log(`│ Bench Exp D: 96% E2E across 932 Arc tx`);
console.log(`│ Recommendation: reorder workflow to`);
console.log(`│ think → discover → estimate → pay → verify`);
console.log(`│ (PR #3 will implement auto-reorder; PR #2 is detection + audit)`);
console.log(`│ Capsule: stale_quote → observe (advisory)`);
console.log(`│ Bench Exp D: 96% E2E across 932 Arc tx`);
console.log(`│`);
console.log(`│ Repair options (caller decides based on think semantics):`);
console.log(`│`);
console.log(`│ (a) If think is quote-independent (Bench Exp D pattern):`);
console.log(`│ reorder to: think → discover → estimate → pay → verify`);
console.log(`│`);
console.log(`│ (b) If think reads quote.price or quote.expires_at:`);
console.log(`│ split think into pre-quote (selection) +`);
console.log(`│ post-quote (price-check) halves`);
console.log(`│`);
console.log(`│ (c) Request longer quote TTL OR refresh quote before pay`);
console.log(`│`);
console.log(`│ (PR #3 will implement automatic reorder for case (a))`);
console.log(`└──────────────────────────────────────────────────────────\n`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/engine/seed-genes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ export const SEED_GENES: Omit<GeneCapsule, 'id'>[] = [
// it records the failure so an agent's preflight hook can reorder its own workflow
// (think → discover → estimate → pay → verify). 48/50 E2E success (96%) across 932 Arc tx.
// Strategy 'observe' = capsule-records-only, no provider execution.
{ failureCode: 'stale_quote', category: 'service', apiLayer: 'wallets-api', strategy: 'observe', params: { reorder_recommendation: 'think → discover → estimate → pay → verify', bench_validation: 'Exp D: 48/50 success (96% E2E) across 932 Arc Testnet tx' }, successCount: 48, avgRepairMs: 30, platforms: ['circle'], qValue: 0.96, consecutiveFailures: 0 },
{ failureCode: 'stale_quote', category: 'service', apiLayer: 'wallets-api', strategy: 'observe', params: { bench_validation: 'Exp D: 48/50 success (96% E2E) across 932 Arc Testnet tx', reorder_recommendation_when_think_independent: 'think → discover → estimate → pay → verify', alternative_when_think_consumes_quote: 'split think into pre-quote (selection) and post-quote (price-check) halves', additional_options: ['request longer quote TTL from facilitator', 'refresh quote with quick second discover before pay'], caveat: 'late_discover is valid only when think does NOT consume the quote. If think reads quote.price or quote.expires_at, agent must split think or use one of the alternative options.' }, successCount: 48, avgRepairMs: 30, platforms: ['circle'], qValue: 0.96, consecutiveFailures: 0 },
];
Loading