Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(doctor): regenerate content, hot-check and Postgres goldens for #7145/#7146 detail fields; the partial frontmatter scan is a bound unknown (#7145)

garrytanb4d91a2e49e5
diff --git a/test/doctor-entry-deadline-6803.test.ts b/test/doctor-entry-deadline-6803.test.ts
index 3ef7fa347b..5d650d9d52 100644
--- a/test/doctor-entry-deadline-6803.test.ts
+++ b/test/doctor-entry-deadline-6803.test.ts
@@ -168,7 +168,8 @@ for (const kind of testBackends()) {
const started = Date.now();
const checks = await runDoctorRegistry(ctxFor(slowCount, ['--json', '--scope=brain']), [connectionGateEntry, frontmatterEntry]);
const fm = byName(checks, 'frontmatter_integrity')!;
- expect(fm.details?.health, JSON.stringify(fm)).not.toBe('unknown');
+ // #7145: the scan's own partial result (a floor, health unknown past its time bound), not the runner's budget unknown.
+ expect(fm.details, JSON.stringify(fm)).toMatchObject({ partial: true, exact: false, health: 'unknown', reason: 'bound', bound: 'time' });
expect(fm.message).toMatch(/partial|NOT SCANNED/i);
expect(fm.message).toContain('fm-example: NOT SCANNED');
expect(Date.now() - started).toBeLessThan(600 + 400);
diff --git a/test/fixtures/goldens/doctor/content-pglite-json.json b/test/fixtures/goldens/doctor/content-pglite-json.json
index e31872a511..342da10070 100644
--- a/test/fixtures/goldens/doctor/content-pglite-json.json
+++ b/test/fixtures/goldens/doctor/content-pglite-json.json
@@ -608,6 +608,18 @@
"docs": "docs/guides/troubleshooting.md#terminal-write-failures",
"historical_rows": 0,
"new_last_24h": 0,
+ "ranked": {
+ "blocking": [],
+ "historical": {
+ "rows": 0
+ },
+ "unresolved": {
+ "group_by": [],
+ "groups": [],
+ "pages": 0,
+ "rows": 0
+ }
+ },
"sources": [],
"spike": {
"daily_7d": [
@@ -935,6 +947,7 @@
{
"category": "ops",
"details": {
+ "columns": [],
"extra_columns": [],
"page_child_source_columns": [],
"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"
@@ -1922,6 +1935,11 @@
},
{
"category": "brain",
+ "details": {
+ "count": 1,
+ "exact": true,
+ "partial": false
+ },
"elapsed_ms": "<volatile>",
"fix": {
"actor": "agent",
diff --git a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
index 06ab689306..f7dca70672 100644
--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
@@ -609,6 +609,18 @@
"docs": "docs/guides/troubleshooting.md#terminal-write-failures",
"historical_rows": 0,
"new_last_24h": 0,
+ "ranked": {
+ "blocking": [],
+ "historical": {
+ "rows": 0
+ },
+ "unresolved": {
+ "group_by": [],
+ "groups": [],
+ "pages": 0,
+ "rows": 0
+ }
+ },
"sources": [],
"spike": {
"daily_7d": [
@@ -995,6 +1007,7 @@
{
"category": "ops",
"details": {
+ "columns": [],
"extra_columns": [],
"page_child_source_columns": [],
"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"
@@ -2090,6 +2103,11 @@
},
{
"category": "brain",
+ "details": {
+ "count": 18,
+ "exact": true,
+ "partial": false
+ },
"elapsed_ms": "<volatile>",
"fix_unavailable_reason": "unstructured",
"message": "18 frontmatter issue(s). notes: 17 (YAML_PARSE=8, EMPTY_FRONTMATTER=1, MISSING_CLOSE=2, NESTED_QUOTES=1, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes",
@@ -4996,6 +5014,18 @@
"docs": "docs/guides/troubleshooting.md#terminal-write-failures",
"historical_rows": 0,
"new_last_24h": 0,
+ "ranked": {
+ "blocking": [],
+ "historical": {
+ "rows": 0
+ },
+ "unresolved": {
+ "group_by": [],
+ "groups": [],
+ "pages": 0,
+ "rows": 0
+ }
+ },
"sources": [],
"spike": {
"daily_7d": [
@@ -5382,6 +5412,7 @@
{
"category": "ops",
"details": {
+ "columns": [],
"extra_columns": [],
"page_child_source_columns": [],
"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"
@@ -6477,6 +6508,11 @@
},
{
"category": "brain",
+ "details": {
+ "count": 20,
+ "exact": true,
+ "partial": false
+ },
"elapsed_ms": "<volatile>",
"fix_unavailable_reason": "unstructured",
"message": "20 frontmatter issue(s). notes: 19 (YAML_PARSE=9, EMPTY_FRONTMATTER=1, NESTED_QUOTES=2, MISSING_CLOSE=2, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes",
diff --git a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
index 493fe311bb..d4df0dbb6e 100644
--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
@@ -603,6 +603,18 @@
"docs": "docs/guides/troubleshooting.md#terminal-write-failures",
"historical_rows": 0,
"new_last_24h": 0,
+ "ranked": {
+ "blocking": [],
+ "historical": {
+ "rows": 0
+ },
+ "unresolved": {
+ "group_by": [],
+ "groups": [],
+ "pages": 0,
+ "rows": 0
+ }
+ },
"sources": [],
"spike": {
"daily_7d": [
@@ -998,6 +1010,7 @@
{
"category": "ops",
"details": {
+ "columns": [],
"extra_columns": [],
"page_child_source_columns": [],
"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"
@@ -2095,6 +2108,11 @@
},
{
"category": "brain",
+ "details": {
+ "count": 18,
+ "exact": true,
+ "partial": false
+ },
"elapsed_ms": "<volatile>",
"fix_unavailable_reason": "unstructured",
"message": "18 frontmatter issue(s). notes: 17 (YAML_PARSE=8, EMPTY_FRONTMATTER=1, MISSING_CLOSE=2, NESTED_QUOTES=1, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes",
@@ -4991,6 +5009,18 @@
"docs": "docs/guides/troubleshooting.md#terminal-write-failures",
"historical_rows": 0,
"new_last_24h": 0,
+ "ranked": {
+ "blocking": [],
+ "historical": {
+ "rows": 0
+ },
+ "unresolved": {
+ "group_by": [],
+ "groups": [],
+ "pages": 0,
+ "rows": 0
+ }
+ },
"sources": [],
"spike": {
"daily_7d": [
@@ -5386,6 +5416,7 @@
{
"category": "ops",
"details": {
+ "columns": [],
"extra_columns": [],
"page_child_source_columns": [],
"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"
@@ -6483,6 +6514,11 @@
},
{
"category": "brain",
+ "details": {
+ "count": 20,
+ "exact": true,
+ "partial": false
+ },
"elapsed_ms": "<volatile>",
"fix_unavailable_reason": "unstructured",
"message": "20 frontmatter issue(s). notes: 19 (YAML_PARSE=9, EMPTY_FRONTMATTER=1, NESTED_QUOTES=2, MISSING_CLOSE=2, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes",
diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.json
index 4af096ba81..af65480820 100644
--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json
+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json
@@ -587,6 +587,18 @@
"docs": "docs/guides/troubleshooting.md#terminal-write-failures",
"historical_rows": 0,
"new_last_24h": 0,
+ "ranked": {
+ "blocking": [],
+ "historical": {
+ "rows": 0
+ },
+ "unresolved": {
+ "group_by": [],
+ "groups": [],
+ "pages": 0,
+ "rows": 0
+ }
+ },
"sources": [],
"spike": {
"daily_7d": [
@@ -909,6 +921,7 @@
{
"category": "ops",
"details": {
+ "columns": [],
"extra_columns": [],
"page_child_source_columns": [],
"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"