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 by d66b6bcbf, 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 after cd39f8858, 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:
YeonGyu-Kim
2026-05-22 00:05:42 +09:00
parent beed9e8906
commit bc0da0fad3
10 changed files with 55 additions and 41 deletions
+10 -10
View File
@@ -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" }