fix(agents): relax Momus input validation and tighten Prometheus Momus calls to avoid false rejections (#659)

This commit is contained in:
Ivan Marshall Widjaja
2026-01-11 20:30:29 +11:00
committed by GitHub
parent 10a5bab94d
commit f27e93bcc8
4 changed files with 116 additions and 31 deletions
+22
View File
@@ -0,0 +1,22 @@
import { describe, test, expect } from "bun:test"
import { PROMETHEUS_SYSTEM_PROMPT } from "./prometheus-prompt"
describe("PROMETHEUS_SYSTEM_PROMPT Momus invocation policy", () => {
test("should direct providing ONLY the file path string when invoking Momus", () => {
// #given
const prompt = PROMETHEUS_SYSTEM_PROMPT
// #when / #then
// Should mention Momus and providing only the path
expect(prompt.toLowerCase()).toMatch(/momus.*only.*path|path.*only.*momus/)
})
test("should forbid wrapping Momus invocation in explanations or markdown", () => {
// #given
const prompt = PROMETHEUS_SYSTEM_PROMPT
// #when / #then
// Should mention not wrapping or using markdown for the path
expect(prompt.toLowerCase()).toMatch(/not.*wrap|no.*explanation|no.*markdown/)
})
})