Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(#6007): statement budget after v0.60.62.0; put_page keeps its pinned remote-skip wording

garrytan34f22f6618d1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5ca424b2fc..c253ba0b73 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,9 +23,9 @@ Measured with 25 pages of 60 KB each, written over MCP to a Postgres brain 30 ms
| | Before | Now |
| --- | --- | --- |
| 25 pages, one `put_page` at a time, with polling | nearly 5 minutes (about 11 s a page) | not needed |
-| 25 pages, 4 `put_pages` calls sent one after another | not available | 48 s, no polling |
+| 25 pages, 4 `put_pages` calls sent one after another | not available | 49 s, no polling |
| One 60 KB `put_page` | 7.2 s reply saying "pending", then polls (about 11 s total) | committed in about 6 s, in the reply |
-| SQL statements on one page's publish path | 135 | 110 |
+| SQL statements on one page's publish path | 135 | 115 |
| Backlinks between the pages you just wrote | about 30 manual `add_link` calls | built automatically after the commit |
## To take advantage of v0.60.63.0
diff --git a/src/core/ops/pages.ts b/src/core/ops/pages.ts
index 7342399875..a1b28aa4b0 100644
--- a/src/core/ops/pages.ts
+++ b/src/core/ops/pages.ts
@@ -288,7 +288,7 @@ const put_page: Operation = {
name: 'put_page',
idempotent: true,
outputRedaction: 'no_stored_text',
- description: 'Replace a complete Markdown page: content REPLACES the whole page. Read get_page include_content:true; pass its revision as expected_revision (omit to create). Keep a request_id UUID; retry with identical arguments. Remote callers: [[links]] to existing pages become mentions; typed links wait for a stdio `gbrain serve` sweep (`gbrain serve --http` does not self-sweep). Small changes: edit_page. Over 3 pages: put_pages.',
+ description: 'Replace a complete Markdown page: content REPLACES the whole page. Read get_page include_content:true; pass its revision as expected_revision (omit to create). Keep a request_id UUID; retry with identical arguments. Remote callers: [[links]] to existing pages become mentions; typed links are skipped (a stdio `gbrain serve` sweeps them later, `gbrain serve --http` does not self-sweep). Small changes: edit_page. Over 3 pages: put_pages.',
params: {
...PAGE_MUTATION_PARAMS,
slug: { type: 'string', description: 'Page slug.', required: true },
diff --git a/test/e2e/persistence-statement-budget.test.ts b/test/e2e/persistence-statement-budget.test.ts
index 4ebbab29d0..b3e0707a09 100644
--- a/test/e2e/persistence-statement-budget.test.ts
+++ b/test/e2e/persistence-statement-budget.test.ts
@@ -33,14 +33,16 @@ const CRITICAL: Phase[] = ['admission', 'claim', 'prepare', 'recovery_record', '
/**
* Per-phase statement budgets, about 10% above the measured counts (#6007 on
- * v0.60.60.0 measured admission 27, claim 5, prepare 19, recovery record 6,
- * publication 47, completion 6: 110 on the critical path, and an 8-statement receipt; the
+ * v0.60.62.0 measured admission 27, claim 5, prepare 23, recovery record 6,
+ * publication 48, completion 6: 115 on the critical path, and an 8-statement
+ * receipt; v0.60.62.0 added four config reads to preparation and a second
+ * alias delete to publication over v0.60.60.0's 19 and 47; the
* code before #6007 measured 29, 5, 21, 9, 61, 10: 135, and 10). The claim
* counts only the transaction that claimed this write; another tick's empty
* claim attempt is a consumer scan.
*/
const BUDGET: Record<string, number> = {
- admission: 28, claim: 6, prepare: 21, recovery_record: 7, publication: 50, completion: 7, critical_path: 118, receipt: 9,
+ admission: 28, claim: 6, prepare: 25, recovery_record: 7, publication: 50, completion: 7, critical_path: 118, receipt: 9,
};
const SCAN = [
diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.json
index 7766e2dcc6..f7d10714b8 100644
--- a/test/fixtures/goldens/cli/tools-json.json
+++ b/test/fixtures/goldens/cli/tools-json.json
@@ -2,8 +2,8 @@
"golden": {
"exitCode": 0,
"stderr": "",
- "stdoutBytes": 201613,
- "stdoutSha256": "b50d3da452d51e341f85c225b629209e6717db97ba610ace33fe0e053081cfdd",
+ "stdoutBytes": 201629,
+ "stdoutSha256": "daba7f43435a6aa08933fb39c03859059cf1625f869dc7818c52f267353f1b13",
"toolNames": [
"remember",
"entity",
@@ -397,7 +397,7 @@
"scope": "read"
},
{
- "description": "Replace a complete Markdown page: content REPLACES the whole page. Read get_page include_content:true; pass its revision as expected_revision (omit to create). Keep a request_id UUID; retry with identical arguments. Remote callers: [[links]] to existing pages become mentions; typed links wait for a stdio `gbrain serve` sweep (`gbrain serve --http` does not self-sweep). Small changes: edit_page. Over 3 pages: put_pages.",
+ "description": "Replace a complete Markdown page: content REPLACES the whole page. Read get_page include_content:true; pass its revision as expected_revision (omit to create). Keep a request_id UUID; retry with identical arguments. Remote callers: [[links]] to existing pages become mentions; typed links are skipped (a stdio `gbrain serve` sweeps them later, `gbrain serve --http` does not self-sweep). Small changes: edit_page. Over 3 pages: put_pages.",
"idempotent": true,
"local_only": false,
"mutating": true,
diff --git a/test/mcp-schema-budget.test.ts b/test/mcp-schema-budget.test.ts
index a8df01aef6..77a917fb95 100644
--- a/test/mcp-schema-budget.test.ts
+++ b/test/mcp-schema-budget.test.ts
@@ -50,7 +50,7 @@ import { cl100kAvailable, estimateTokens } from '../src/core/chunkers/token-esti
const SERVED_STARTER_MAX_CHARS = 25_000;
const SERVED_STARTER_MAX_TOKENS = 5_700;
-/** The whole tools/list JSON, annotations included (25,735 measured at v0.60.46.0; traverse_graph's `hops` is full-surface-only, 25,941 measured; 26,402 once mute_notice, the dismissal for the coaching notices starter sessions receive, joined starter; 26,655 with #6007's put_page wait_ms param and write guidance, which carry the put_pages hint and the receipt poll rule starter agents need). */
+/** The whole tools/list JSON, annotations included (25,735 measured at v0.60.46.0; traverse_graph's `hops` is full-surface-only, 25,941 measured; 26,402 once mute_notice, the dismissal for the coaching notices starter sessions receive, joined starter; 26,671 with #6007's put_page wait_ms param and write guidance, which carry the put_pages hint and the receipt poll rule starter agents need). */
const SERVED_STARTER_MAX_JSON_CHARS = 26_700;
/** 4,042 at the cost wave + 586 for the operator contract's error protocol, notice prefix and memory loop (F1); no schema guidance moved here. */
const INSTRUCTIONS_MAX_CHARS = 4_868; // #6007: +240 for the issue-required write guidance (put_pages, wait_ms)