Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix: pre-landing review fixes
garrytan4b730043760d
diff --git a/src/core/verbs.ts b/src/core/verbs.tsindex eddf6f8da9..52cc0b91f5 100644--- a/src/core/verbs.ts+++ b/src/core/verbs.ts@@ -143,7 +143,7 @@ const remember: Operation = {throw verbError('invalid_params','Missing required parameter: provenance',- 'Pass `provenance` as a string (where the fact came from), e.g. provenance: "user told me, 2026-06-12". With items, provenance may be given per item instead.',+ 'Pass `provenance` as a string (where the fact came from), e.g. provenance: "<where you learned it, with the date>". With items, provenance may be given per item instead.',);}const provenance = typeof p.provenance === 'string' ? p.provenance.trim() : '';@@ -151,7 +151,7 @@ const remember: Operation = {throw verbError('provenance_required','provenance is required and must be non-empty.',- 'Pass where the fact came from, e.g. provenance: "user told me, 2026-06-12" or "import: notes.md".',+ 'Pass where the fact came from, e.g. provenance: "<where you learned it, with the date>" or "import: notes.md".',);}if (provenance.length > PROVENANCE_MAX) {diff --git a/test/remember-invalid-params-shapes-gst1493.test.ts b/test/remember-invalid-params-shapes-gst1493.test.tsindex b8cba61bbd..5ea3f02502 100644--- a/test/remember-invalid-params-shapes-gst1493.test.ts+++ b/test/remember-invalid-params-shapes-gst1493.test.ts@@ -61,7 +61,14 @@ describe('remember refusals name the rule and a corrected example (GST-1493)', (expect(isError).toBe(true);expect(envelope.error).toBe('invalid_params');expect(envelope.message).toBe('Missing required parameter: provenance');- expect(envelope.suggestion).toContain('provenance');+ expect(envelope.suggestion).toContain('provenance: "<where you learned it, with the date>"');+ });++ test('an empty provenance is refused and quotes the placeholder, not a source to copy', async () => {+ const { isError, envelope } = await call({ fact: FACT, entity: 'Alice Example', provenance: ' ' });+ expect(isError).toBe(true);+ expect(envelope.error).toBe('provenance_required');+ expect(envelope.suggestion).toContain('provenance: "<where you learned it, with the date>"');});test('the saved shape {fact, entity, provenance} validates', async () => {