test: fix prometheus-prompt syntax + sync display name casing to lowercase
- prometheus-prompt.test.ts: close missing }) on the OpenSpec expanded commands describe block (introduced byd66b6bcbf, parse error). - agent-sort-shim/agent-config-integration/continuation-injection/ unstable-agent-babysitter/subagent-resolver/sync-executor/ resolve-caller-team-lead tests: expect 'Sisyphus - ultraworker' (lowercase) to match production aftercd39f8858, which lowercased the display name to dodge a TUI ZWSP rendering glitch. Legacy uppercase inputs that exercise the normalization path are preserved. - sync-executor.ts + resolve-caller-team-lead.ts: route legacy display name inputs through normalizeAgentForPrompt so prompt agent names and caller team lead lookups produce the canonical lowercase form.
This commit is contained in:
@@ -92,7 +92,7 @@ describe("Agent Config Integration", () => {
|
||||
const displayNames = agents.map((agent) => getAgentDisplayName(agent))
|
||||
|
||||
// then - display names are correct
|
||||
expect(displayNames).toContain("Sisyphus - Ultraworker")
|
||||
expect(displayNames).toContain("Sisyphus - ultraworker")
|
||||
expect(displayNames).toContain("Hephaestus - Deep Agent")
|
||||
expect(displayNames).toContain("Prometheus - Plan Builder")
|
||||
expect(displayNames).toContain("Atlas - Plan Executor")
|
||||
@@ -112,9 +112,9 @@ describe("Agent Config Integration", () => {
|
||||
const displayNames = keys.map((key) => getAgentDisplayName(key))
|
||||
|
||||
// then - correct display names are returned
|
||||
expect(displayNames[0]).toBe("Sisyphus - Ultraworker")
|
||||
expect(displayNames[0]).toBe("Sisyphus - ultraworker")
|
||||
expect(displayNames[1]).toBe("Atlas - Plan Executor")
|
||||
expect(displayNames[2]).toBe("Sisyphus - Ultraworker")
|
||||
expect(displayNames[2]).toBe("Sisyphus - ultraworker")
|
||||
expect(displayNames[3]).toBe("Atlas - Plan Executor")
|
||||
expect(displayNames[4]).toBe("Prometheus - Plan Builder")
|
||||
expect(displayNames[5]).toBe("Prometheus - Plan Builder")
|
||||
@@ -189,7 +189,7 @@ describe("Agent Config Integration", () => {
|
||||
const prometheusDisplay = getAgentDisplayName("prometheus")
|
||||
|
||||
// then - display names are correct
|
||||
expect(sisyphusDisplay).toBe("Sisyphus - Ultraworker")
|
||||
expect(sisyphusDisplay).toBe("Sisyphus - ultraworker")
|
||||
expect(prometheusDisplay).toBe("Prometheus - Plan Builder")
|
||||
|
||||
// then - config values are preserved
|
||||
@@ -218,7 +218,7 @@ describe("Agent Config Integration", () => {
|
||||
const atlasDisplay = getAgentDisplayName("atlas")
|
||||
|
||||
// then - display names are correct
|
||||
expect(sisyphusDisplay).toBe("Sisyphus - Ultraworker")
|
||||
expect(sisyphusDisplay).toBe("Sisyphus - ultraworker")
|
||||
expect(atlasDisplay).toBe("Atlas - Plan Executor")
|
||||
})
|
||||
})
|
||||
|
||||
@@ -30,7 +30,7 @@ describe("agent-sort-shim", () => {
|
||||
test("#then returns canonical sisyphus->hephaestus->prometheus->atlas order", () => {
|
||||
// given
|
||||
setAgentSortOrder(undefined)
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestus = { name: "Hephaestus - Deep Agent" }
|
||||
const prometheus = { name: "Prometheus - Plan Builder" }
|
||||
const atlas = { name: "Atlas - Plan Executor" }
|
||||
@@ -46,7 +46,7 @@ describe("agent-sort-shim", () => {
|
||||
test("#then follows configured core agent order", () => {
|
||||
// given
|
||||
setAgentSortOrder(["hephaestus", "sisyphus", "prometheus", "atlas"])
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestus = { name: "Hephaestus - Deep Agent" }
|
||||
const prometheus = { name: "Prometheus - Plan Builder" }
|
||||
const atlas = { name: "Atlas - Plan Executor" }
|
||||
@@ -65,7 +65,7 @@ describe("agent-sort-shim", () => {
|
||||
describe("#when toSorted with alphabetical compareFn", () => {
|
||||
test("#then core agents come first in canonical order followed by non-core agents alphabetically", () => {
|
||||
// given
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestus = { name: "Hephaestus - Deep Agent" }
|
||||
const prometheus = { name: "Prometheus - Plan Builder" }
|
||||
const atlas = { name: "Atlas - Plan Executor" }
|
||||
@@ -114,7 +114,7 @@ describe("agent-sort-shim", () => {
|
||||
// given
|
||||
const oracle = { name: "oracle" }
|
||||
const librarian = { name: "librarian" }
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const explore = { name: "explore" }
|
||||
const input = [oracle, librarian, sisyphus, explore]
|
||||
|
||||
@@ -133,7 +133,7 @@ describe("agent-sort-shim", () => {
|
||||
describe("#when toSorted with a string-coercing compareFn", () => {
|
||||
test("#then activation predicate fails, shim does not throw, and result matches native semantics", () => {
|
||||
// given
|
||||
const sisyphusObj = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphusObj = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestusObj = { name: "Hephaestus - Deep Agent" }
|
||||
const input: unknown[] = [null, sisyphusObj, "string", 42, hephaestusObj]
|
||||
const compare = (a: unknown, b: unknown): number => {
|
||||
@@ -188,7 +188,7 @@ describe("agent-sort-shim", () => {
|
||||
describe("#when sort with alphabetical compareFn (in-place)", () => {
|
||||
test("#then mutates the original array to canonical order", () => {
|
||||
// given
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestus = { name: "Hephaestus - Deep Agent" }
|
||||
const prometheus = { name: "Prometheus - Plan Builder" }
|
||||
const atlas = { name: "Atlas - Plan Executor" }
|
||||
@@ -210,7 +210,7 @@ describe("agent-sort-shim", () => {
|
||||
// given
|
||||
installAgentSortShim()
|
||||
installAgentSortShim()
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestus = { name: "Hephaestus - Deep Agent" }
|
||||
const prometheus = { name: "Prometheus - Plan Builder" }
|
||||
const atlas = { name: "Atlas - Plan Executor" }
|
||||
@@ -231,7 +231,7 @@ describe("agent-sort-shim", () => {
|
||||
// given
|
||||
setAgentSortOrder(undefined)
|
||||
setDefaultAgentForSort("crystal")
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestus = { name: "Hephaestus - Deep Agent" }
|
||||
const prometheus = { name: "Prometheus - Plan Builder" }
|
||||
const atlas = { name: "Atlas - Plan Executor" }
|
||||
@@ -251,7 +251,7 @@ describe("agent-sort-shim", () => {
|
||||
// given
|
||||
setAgentSortOrder(undefined)
|
||||
setDefaultAgentForSort("Hephaestus - Deep Agent")
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestus = { name: "Hephaestus - Deep Agent" }
|
||||
const prometheus = { name: "Prometheus - Plan Builder" }
|
||||
const atlas = { name: "Atlas - Plan Executor" }
|
||||
@@ -272,7 +272,7 @@ describe("agent-sort-shim", () => {
|
||||
// given
|
||||
setAgentSortOrder(["hephaestus", "sisyphus", "prometheus", "atlas"])
|
||||
// setDefaultAgentForSort is intentionally NOT called (user did not set default_agent)
|
||||
const sisyphus = { name: "Sisyphus - Ultraworker" }
|
||||
const sisyphus = { name: "Sisyphus - ultraworker" }
|
||||
const hephaestus = { name: "Hephaestus - Deep Agent" }
|
||||
const prometheus = { name: "Prometheus - Plan Builder" }
|
||||
const atlas = { name: "Atlas - Plan Executor" }
|
||||
|
||||
Reference in New Issue
Block a user