Merge step (j): update tests + legacy-cleanup registries for deleted agents
Fork deleted 9 ce-* reviewer agents in step (c.1) and dropped the ce-dhh- rails-style skill in step (c.2). Tests and legacy-cleanup registries needed corresponding updates. Tests: - tests/review-skill-contract.test.ts: drop ce-dhh-rails-reviewer, ce-kieran-rails-reviewer, and ce-data-migration-expert from persona list tests. Remove the data-migration-expert unstructured-format test. - tests/legacy-cleanup.test.ts: switch the .agent.md copilot-format test to use agents that still have ce-* versions (correctness-reviewer, maintainability-reviewer) since security-sentinel and performance-oracle are gone. Drop the `lint` case from legacy-only cleanup since the fork re-introduced ce-lint (Python linter) as a current agent. Legacy cleanup registries: - src/utils/legacy-cleanup.ts: add the 9 deleted ce-* agent names to STALE_AGENT_NAMES and ce-dhh-rails-style to STALE_SKILL_DIRS so upgrades from pre-merge installs sweep the old files. - src/data/plugin-legacy-artifacts.ts: mirror the additions in the compound-engineering plugin's historical artifact lists. Frontmatter: - Drop embedded <example>/<commentary> blocks from ce-python-package- readme-writer.agent.md and ce-tiangolo-fastapi-reviewer.agent.md descriptions. Cowork's plugin validator rejects bare angle-bracket tokens; tests/frontmatter.test.ts was failing on these two local agents. Test state: 944 pass / 9 fail. Remaining 9 failures are pre-existing detect-project-type.sh monorepo probe tests in ce-polish-beta that were failing on baseline HEAD before this merge work began. Not introduced by this merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -319,25 +319,30 @@ describe("cleanupStaleAgents", () => {
|
||||
|
||||
test("removes .agent.md files (Copilot format)", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "cleanup-agents-copilot-"))
|
||||
// Fork-specific: security-sentinel and performance-oracle were deleted in the
|
||||
// v3.0.3 merge, so their ce-* fingerprints no longer exist and the legacy
|
||||
// cleanup cannot match them. Use correctness-reviewer and maintainability-
|
||||
// reviewer instead — both still have ce-* versions in the fork.
|
||||
await createFile(
|
||||
path.join(root, "security-sentinel.agent.md"),
|
||||
path.join(root, "correctness-reviewer.agent.md"),
|
||||
agentContent(
|
||||
"security-sentinel",
|
||||
await pluginDescription("plugins/compound-engineering/agents/ce-security-sentinel.agent.md"),
|
||||
"correctness-reviewer",
|
||||
await pluginDescription("plugins/compound-engineering/agents/ce-correctness-reviewer.agent.md"),
|
||||
),
|
||||
)
|
||||
await createFile(
|
||||
path.join(root, "performance-oracle.agent.md"),
|
||||
path.join(root, "maintainability-reviewer.agent.md"),
|
||||
agentContent(
|
||||
"performance-oracle",
|
||||
await pluginDescription("plugins/compound-engineering/agents/ce-performance-oracle.agent.md"),
|
||||
"maintainability-reviewer",
|
||||
await pluginDescription("plugins/compound-engineering/agents/ce-maintainability-reviewer.agent.md"),
|
||||
),
|
||||
)
|
||||
|
||||
const removed = await cleanupStaleAgents(root, ".agent.md")
|
||||
|
||||
expect(removed).toBe(2)
|
||||
expect(await exists(path.join(root, "security-sentinel.agent.md"))).toBe(false)
|
||||
expect(await exists(path.join(root, "correctness-reviewer.agent.md"))).toBe(false)
|
||||
expect(await exists(path.join(root, "maintainability-reviewer.agent.md"))).toBe(false)
|
||||
})
|
||||
|
||||
test("removes matching Kiro agent configs but preserves same-named user configs", async () => {
|
||||
@@ -422,17 +427,11 @@ describe("cleanupStaleAgents", () => {
|
||||
|
||||
test("removes legacy-only agents that no longer ship a ce-* replacement", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "cleanup-agents-legacy-only-"))
|
||||
// `lint` and `bug-reproduction-validator` were removed in an older plugin
|
||||
// release with no ce-* successor. Their fingerprints live in
|
||||
// LEGACY_ONLY_AGENT_DESCRIPTIONS so upgrades from pre-removal installs
|
||||
// still clean them up.
|
||||
await createFile(
|
||||
path.join(root, "lint.md"),
|
||||
agentContent(
|
||||
"lint",
|
||||
"Use this agent when you need to run linting and code quality checks on Ruby and ERB files. Run before pushing to origin.",
|
||||
),
|
||||
)
|
||||
// Fork-specific: this fork re-introduced `ce-lint` (a Python linter agent), so
|
||||
// `lint` no longer qualifies as legacy-only here — the cleanup logic now takes
|
||||
// its fingerprint from the current `ce-lint.agent.md`. Only
|
||||
// `bug-reproduction-validator` remains as a genuinely legacy-only agent with
|
||||
// a LEGACY_ONLY_AGENT_DESCRIPTIONS fingerprint.
|
||||
await createFile(
|
||||
path.join(root, "bug-reproduction-validator.md"),
|
||||
agentContent(
|
||||
@@ -443,8 +442,7 @@ describe("cleanupStaleAgents", () => {
|
||||
|
||||
const removed = await cleanupStaleAgents(root, ".md")
|
||||
|
||||
expect(removed).toBe(2)
|
||||
expect(await exists(path.join(root, "lint.md"))).toBe(false)
|
||||
expect(removed).toBe(1)
|
||||
expect(await exists(path.join(root, "bug-reproduction-validator.md"))).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user