Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix: keep content_hash out of returned rows; pin off-path fixture with feedback off; regenerate Postgres doctor golden

garrytane12b0aa2175a
diff --git a/src/core/feedback/record.ts b/src/core/feedback/record.ts
index 7d73ce55ab..66abf4d6c5 100644
--- a/src/core/feedback/record.ts
+++ b/src/core/feedback/record.ts
@@ -274,9 +274,11 @@ export async function searchAnswerFeedback(
op: 'query' | 'search' | 'recall',
rows: Array<{ slug: string; source_id?: string; content_hash?: string | null; relational_path_edges?: string[] }>,
): Promise<Record<string, unknown>> {
- return feedbackMetaFields(await recordAnswer(ctx, {
+ const meta = feedbackMetaFields(await recordAnswer(ctx, {
op,
pages: rows.map(r => ({ source_id: r.source_id, slug: r.slug, content_hash: r.content_hash })),
links: relationalPathLinks(rows),
}));
+ for (const r of rows) delete r.content_hash;
+ return meta;
}
diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.json
index 9ebd3e303b..e8a016ce15 100644
--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json
+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json
@@ -497,19 +497,19 @@
},
{
"category": "ops",
- "message": "RLS enabled on 103/103 public tables",
+ "message": "RLS enabled on 108/108 public tables",
"name": "rls",
"status": "ok"
},
{
"category": "meta",
- "message": "Version 200 (latest: 200)",
+ "message": "Version 201 (latest: 201)",
"name": "schema_version",
"status": "ok"
},
{
"category": "meta",
- "message": "859 column(s) verified against live schema",
+ "message": "890 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
@@ -1589,6 +1589,26 @@
"name": "planner_stats_stale",
"status": "ok"
},
+ {
+ "category": "meta",
+ "details": {
+ "answers_recorded": 0,
+ "docs": "docs/guides/retrieval-feedback.md",
+ "enabled": true,
+ "implicit": true,
+ "influence": 0.1,
+ "last_rating_at": null,
+ "learn": true,
+ "ratings_cited": 0,
+ "ratings_explicit": 0,
+ "top_client_share_7d": null,
+ "weights": 0,
+ "weights_off_neutral": 0
+ },
+ "message": "Retrieval feedback on (λ=0.1): 0 answers recorded, 0 ratings, 0 pages/edges learned. Inspect with `gbrain feedback status`.",
+ "name": "retrieval_feedback_health",
+ "status": "ok"
+ },
{
"category": "ops",
"message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",
diff --git a/test/helpers/evidence-delivery-fixture.ts b/test/helpers/evidence-delivery-fixture.ts
index 473b1d47fa..163291ee32 100644
--- a/test/helpers/evidence-delivery-fixture.ts
+++ b/test/helpers/evidence-delivery-fixture.ts
@@ -114,4 +114,6 @@ export async function seedOffPath(engine: BrainEngine, pages = OFF_PATH_PAGES):
await installFixtureChunks(engine, p.slug, await prepareMarkdownChunks({ compiled_truth: p.body, timeline: p.timeline ?? '' }));
}
await engine.setConfig('search.mcp_keyword_only', 'true');
+ // Answer ids are minted per call, so the frozen off-path output is captured with retrieval feedback off.
+ await engine.setConfig('feedback.enabled', 'false');
}