fix: eliminate all 4xx noise from scene walks
- buildScenarios: drop the /api/runtime/transactions/{id} headline GET
entirely. Synthesize the RuntimeTransaction shape from the work-item
data. Backend's per-id endpoint is broken (500 on valid IDs, 404 on
work-item IDs); we already have all the display fields we need.
- store.ts pollLiveTick: don't refetch headline transaction; reuse
the existing scenario.raw.headlineRt synthesized at build time.
- useBackendHealth: pass the bearer token if present so the probe
returns 200 instead of 401 for authenticated users. The probe still
treats 401 as 'up' for unauthenticated landing page.
- agentMemory.remember: track ensureVault result. Skip the edge attach
apply-batch entirely if the vault didn't materialize, so we don't
fire a guaranteed-422 create_edge against a missing from-doc.
This commit is contained in:
@@ -66,7 +66,7 @@ export const agentMemory = {
|
||||
async remember(email: string, content: string, tags: string[] = [], signal?: AbortSignal): Promise<string | null> {
|
||||
if (!content.trim()) return null;
|
||||
const vaultKey = vaultKeyFor(email);
|
||||
await ensureVault(vaultKey, email, signal);
|
||||
const vaultReady = await ensureVault(vaultKey, email, signal);
|
||||
const doc = await fetch(`${api.config.baseUrl}/api/ea2/flow`, {
|
||||
method: "POST",
|
||||
headers: authHeaders(),
|
||||
@@ -83,6 +83,10 @@ export const agentMemory = {
|
||||
});
|
||||
if (!doc.ok) return null;
|
||||
const mem = await doc.json();
|
||||
if (!vaultReady) {
|
||||
console.warn(`[memory] vault not ready for ${email}, skipping edge attach`);
|
||||
return mem._key;
|
||||
}
|
||||
try {
|
||||
const edgeRes = await fetch(`${api.config.baseUrl}/api/ea2/apply-batch`, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user