Headless grant scenarios: the person names the repository (review R1)
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
2_find keeps the no-card check for a repository the person never named, then has the person name moonbeam/app and expects the grant card as main did. 3_grant drops the recipes/pantry workaround: the person names recipes/book, which raises the card in a namespace Equipo knows nothing of.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+16
−14
internal/headless/engineering_test.go+3 −12internal/headless/projects_test.go+13 −2
diff --git a/internal/headless/engineering_test.go b/internal/headless/engineering_test.go| index 961e1dba..a83c0073 100644 |
| --- a/internal/headless/engineering_test.go |
| +++ b/internal/headless/engineering_test.go |
| @@ -314,20 +314,11 @@ func scenarioGrant(t *testing.T, env *Env) { |
| if env.Live { |
| t.Skip("no live grant on staging") |
| } |
| - // Equipo raises a card only in a namespace it knows (#48): the agent |
| - // first reaches a repository in recipes, then is asked for another. |
| - env.GrantEmpty(t, "amadan.net/recipes/pantry") |
| s := open(t, env) |
| s.keep() |
| - s.wait(t, "runner online", 30*time.Second, func(c *thintest.Conversation) bool { return c.Runner.Online }) |
| - deadline := time.Now().Add(45 * time.Second) |
| - for found, _ := env.Indexed(t, "amadan.net/recipes/pantry"); !found; found, _ = env.Indexed(t, "amadan.net/recipes/pantry") { |
| - if time.Now().After(deadline) { |
| - t.Fatal("recipes/pantry not catalogued") |
| - } |
| - time.Sleep(200 * time.Millisecond) |
| - } |
| - sent := s.send(t, "tool:find:recipes/book") |
| + // The person names the repository: in a namespace Equipo knows |
| + // nothing of, that is what raises the card (#48, review R1). |
| + sent := s.send(t, "Fix the index in recipes/book. tool:find:recipes/book") |
| var card wire.Card |
| s.wait(t, "access card", time.Minute, func(c *thintest.Conversation) bool { |
| if k := cards(c, sent.Turn.ID, wire.CardAccess); len(k) == 1 { |
diff --git a/internal/headless/projects_test.go b/internal/headless/projects_test.go| index e8d8c766..4165ceb1 100644 |
| --- a/internal/headless/projects_test.go |
| +++ b/internal/headless/projects_test.go |
| @@ -393,8 +393,9 @@ func scenarioFindAndRead(t *testing.T, env *Env) { |
| if r := s.reply(t, trick.Turn.ID).Text; !strings.Contains(r, "Could not read that") { |
| t.Fatalf("path trick: %s", r) |
| } |
| - // A repository in a namespace Equipo knows nothing of: it cannot tell |
| - // whether it exists, so no access card (#48); the model is told so. |
| + // A repository the person never named, in a namespace Equipo knows |
| + // nothing of: it cannot tell whether it exists, so no access card |
| + // (#48, review R1); the model is told so. |
| missing := s.send(t, "In Moonbeam, the panes stick. tool:find:moonbeam/app") |
| s.waitTurn(t, missing.Turn.ID, wire.TurnReplied) |
| if r := s.reply(t, missing.Turn.ID).Text; !strings.Contains(r, "moonbeam/app exists") { |
| @@ -409,6 +410,16 @@ func scenarioFindAndRead(t *testing.T, env *Env) { |
| t.Fatalf("access card for an unknown namespace: %+v", k) |
| } |
| } |
| + // The person names it: the grant card, as before #48. |
| + named := s.send(t, "The panes stick in moonbeam/app. tool:find:moonbeam/app") |
| + s.waitTurn(t, named.Turn.ID, wire.TurnReplied) |
| + s.wait(t, "access card", 10*time.Second, func(c *thintest.Conversation) bool { |
| + k := cards(c, named.Turn.ID, wire.CardAccess) |
| + return len(k) == 1 && k[0].Question == "moonbeam/app" && k[0].Choice == "equipo-test" && slices.Equal(k[0].Options, []string{"oficina"}) |
| + }) |
| + if r := s.reply(t, named.Turn.ID).Text; !strings.Contains(r, `Nothing Equipo's agent can reach matches \"moonbeam/app\"`) && !strings.Contains(r, `matches "moonbeam/app"`) { |
| + t.Fatalf("reply %s", r) |
| + } |
| } |
| // Scenario 2c: an explicit new-project request creates its repository. |