oficina / equipo Public

Store no title Equipo chose; name the migration for what it does (review RN4, RN5)

Human

Prompt

Fable 5.2 re-review of ae6192c7 (APPROVED with R1 and RN1-RN5); controller: test-first on the same branch.

From this commit's own message. The prompt ledger has no entries for it — which is what a squashed, rebased or amended commit looks like, and what every commit looks like in a repo without a ledger.

Summary

addProject no longer stores a title nobody reads; an unnamed project shows its repository's name through shownTitle, like create_project's. The migration is renamed 0103_clear_equipo_chosen_titles (it clears every title_set 0 title). RN5: neither equipo-staging nor equipo (bds) has applied any 0103 (both end at equipo/0101_project_field_sources, checked with carlos db query on 2026-11-24), so the rename and the earlier in-place edit are safe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev b9d8c0588f3eec1b859ac2503b2d42bb0007d2a4 parent 960b50b
4 files changed, +7 −5
  • internal/equipo/chat/access_need_test.go +2 −1
  • internal/equipo/chat/projects.go +2 −1
  • internal/equipo/migrations/{0103_generic_project_titles.sql => 0103_clear_equipo_chosen_titles.sql} +0 −0
  • internal/equipo/project_title_migration_test.go +3 −3
diff --git a/internal/equipo/chat/access_need_test.go b/internal/equipo/chat/access_need_test.go
index 9523b729..a8d18787 100644
--- a/internal/equipo/chat/access_need_test.go
+++ b/internal/equipo/chat/access_need_test.go
@@ -105,7 +105,8 @@ func TestSwipeConversationNoFalseAccessCardAndRepoTitle(t *testing.T) {
if err := r.s.db.G.Where("repo = ?", "amadan.net/oficina/equipo").Find(&projects).Error; err != nil {
t.Fatal(err)
}
- if len(projects) != 1 || projects[0].Title != "Equipo" || projects[0].TitleSet {
+ // Shown from the repository; nothing stored that no reader shows (RN4).
+ if len(projects) != 1 || projects[0].shownTitle() != "Equipo" || projects[0].Title != "" || projects[0].TitleSet {
t.Fatalf("project: %+v", projects)
}
// A second task for the same repository goes in the same project.
diff --git a/internal/equipo/chat/projects.go b/internal/equipo/chat/projects.go
index 461c7559..eff5668c 100644
--- a/internal/equipo/chat/projects.go
+++ b/internal/equipo/chat/projects.go
@@ -500,8 +500,9 @@ func (t *txn) addProject(person, raw string) (projectRecord, bool, error) {
if err := t.isOwner(person); err != nil {
return p, false, err
}
+ // No stored title: until the person names it, a project shows its
+ // repository's name (shownTitle), as create_project's do.
p = projectRecord{ID: newID("p_"), Repo: repo, State: wire.ProjectActive, AddedBy: person, Revision: 1, CreatedAt: now, UpdatedAt: now}
- p.Title = ProjectTitle(repo)
if err = t.db.Create(&p).Error; err != nil {
return p, false, err
}
diff --git a/internal/equipo/migrations/0103_generic_project_titles.sql b/internal/equipo/migrations/0103_clear_equipo_chosen_titles.sql
similarity index 100%
rename from internal/equipo/migrations/0103_generic_project_titles.sql
rename to internal/equipo/migrations/0103_clear_equipo_chosen_titles.sql
diff --git a/internal/equipo/project_title_migration_test.go b/internal/equipo/project_title_migration_test.go
index dc100cef..6d47b9a8 100644
--- a/internal/equipo/project_title_migration_test.go
+++ b/internal/equipo/project_title_migration_test.go
@@ -13,16 +13,16 @@ import (
// itself (title_set 0), so each project shows its repository's name ("Store"
// for oficina/base was the same bug); a title an owner set stays, and so
// does every task. A second run changes nothing.
-func TestGenericProjectTitleMigration(t *testing.T) {
+func TestClearEquipoChosenTitlesMigration(t *testing.T) {
all := Schema.All()
at := -1
for i, m := range all {
- if m.ID == "equipo/0103_generic_project_titles" {
+ if m.ID == "equipo/0103_clear_equipo_chosen_titles" {
at = i
}
}
if at < 0 {
- t.Fatal("missing generic project titles migration")
+ t.Fatal("missing the migration that clears Equipo-chosen titles")
}
ctx := context.Background()
d, err := migrate.Replay(ctx, all[:at])