test(review): pin that codex $name skills survive the legacy repair + native invocation · Entire
test(review): pin that codex $name skills survive the legacy repair + native invocation
02d1507·
peyton-alt·3d ago·2 files·+49 added/-0 removed
The user asked whether configured codex $code-reviewer skills are retained after #1749's legacy-config repair merged in. They are, by two independent guards; these tests lock that so a future migration edit can't clobber real skills:
- normalizeLegacyCodexDefaultSkills only rewrites codex's exact ["/review"] artifact; a $code-reviewer config and multi-skill configs pass through untouched.
- codexNativeSkillInvocations rewrites only slash-form to $; $name and plain text pass through verbatim.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Sessions
01KXHANJCZ4G2GCS548V1CKZSSView transcript
[?
test(review): pin that codex $name skills survive the legacy repair + native invocationClaude Code·3 steps](/content/gh/entireio/cli/session/99f0d90a-6e31-4c60-ba62-aa2dccd29033#timeline-01KXHANJCZ4G2GCS548V1CKZSS/index.html)
Changes
2
cmd/entire/cli
agent/codex
Mreviewer_test.go+18
review
Aprofile_internal_test.go+31
604 unmodified lines
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
604 unmodified lines
}
}
// TestCodexNativeSkillInvocations_RetainsDollarForm pins that codex's native
// $name skills pass through untouched (only slash-form is rewritten to $),
// and plain instruction text is preserved — so a configured $code-reviewer
// reaches codex verbatim.
func TestCodexNativeSkillInvocations_RetainsDollarForm(t *testing.T) {
t.Parallel()
got := codexNativeSkillInvocations([]string{"$code-reviewer", "/review", "$plugin:thing", "freeform text"})
want := []string{"$code-reviewer", "$review", "$plugin:thing", "freeform text"}
if len(got) != len(want) {
t.Fatalf("got %v, want %v", got, want)
}
for i := range want {
if got[i] != want[i] {
t.Errorf("[%d] = %q, want %q", i, got[i], want[i])
}
}
}
Mcmd/entire/cli/agent/codex/reviewer_test.go+18
package review
import (
"testing"
"github.com/entireio/cli/cmd/entire/cli/settings"
)
// TestNormalizeLegacyCodexDefaultSkills_RetainsDollarSkills pins that the
// legacy-config repair only rewrites codex's exact ["/review"] artifact and
// leaves real configured $name skills (and multi-skill configs) untouched —
// so a user's $code-reviewer is never clobbered by the migration.
func TestNormalizeLegacyCodexDefaultSkills_RetainsDollarSkills(t *testing.T) {
t.Parallel()
configs := map[string]settings.ReviewConfig{
"codex": {Agent: "codex", Skills: []string{"$code-reviewer"}},
"codex-multi": {Agent: "codex", Skills: []string{"$code-reviewer", "$review-swarm"}},
"codex-legacy": {Agent: "codex", Skills: []string{"/review"}},
}
normalizeLegacyCodexDefaultSkills(configs)
if got := configs["codex"].Skills; len(got) != 1 || got[0] != "$code-reviewer" {
t.Errorf("configured $code-reviewer must be retained; got %v", got)
}
if got := configs["codex-multi"].Skills; len(got) != 2 {
t.Errorf("multi-skill codex config must be retained; got %v", got)
}
if got := configs["codex-legacy"].Skills; got != nil {
t.Errorf("legacy exact [\"/review\"] codex must be cleared to prompt-only; got %v", got)
}
}
Acmd/entire/cli/review/profile_internal_test.go+31