oficina / equipo Public

Keep empty desks unchanged and repair placement CI fixtures

Paul Campbell pushed by paul@keymail.dev 9c7fa2a0cae79e73003a8a271b4019825b5b98a1 parent 365b7c1
6 files changed, +37 −15
  • .rastrillo/budgets.txt +1 −1
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +12 −13
  • internal/fakeclaude/fake.go +3 −0
  • internal/headless/projects_test.go +1 −1
  • internal/runner/thin/desk.go +3 −0
  • internal/runner/thin/project_placement_test.go +17 −0

CI passed — run details

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 0e24b585..6842c003 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -38,7 +38,7 @@ time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full
perf GET /releases/* skip Verified runner release file downloads, not browser GET screens.
perf GET /install.sh skip Mac runners: the one-line bootstrap a terminal pipes to sh, not a browser screen.
time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s;
-size internal/runner/thin 26408 18910 Shared runner state and execution helpers; placement prompt and durable notebook corrections. Measured 26379 source and 18910 test lines.
+size internal/runner/thin 26411 18927 Shared runner state and execution helpers; placement prompt and durable notebook corrections. Measured 26379 source and 18927 test lines.
time internal/thintest 240s Thin contract and page tests, the Assistant's and the models' included, share one harness. Measured 202s on a shared 16 CPU box (2026-11-13); CI runs two lanes.
time internal/runner/mac 30s Mac runners (Darwin worker): real process groups killed after a grace and proven gone (SIGTERM, SIGKILL, the marker sweep), and the probes run end to end with fake srt and xcodebuild, P6 killing.
time internal/runner/thin 45s Thin v1 slice 4 review: real git repositories for the merge and squash checks, a stalled fetch, and a 16 MiB candidate streamed through the review diff and the checks pack (about 5s).
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index 2c9de470..53548822 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -6666,6 +6666,18 @@ records remain unchanged.
| `placement.merging` | Changes for this task are being merged. Wait for the result before moving it. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
| `placement.ended_before_move` | This task finished before it could be moved. Start a new task in the other project. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.new_named` | New project: %s | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.abandon` | Abandon move | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.abandoned` | Move abandoned. The task stays in %s. Work has not restarted. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.held_runner` | Waiting for the runner to confirm that work has stopped. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.held_publication` | Waiting for the last push to finish. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.held_owner` | The move needs a current owner with access to the task. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.held_destination` | The runner cannot reach the destination project. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.held_creation` | Waiting for the new project to be created. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.held_protocol` | The runner needs an update before this move can finish. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.observed` | Observed by Equipo | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.forget` | Remove correction | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
+| `placement.abandon_help` | You can abandon this move to keep the task here without restarting work. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
## Task 21
@@ -7767,16 +7779,3 @@ existing race in the Codex reading fixture: the probe could stop the fake CLI
after its answer but before its marker write. The fixture now writes its
marker before answering. The failed hosted test is the reproduction; the
same targeted test passes repeatedly after the ordering fix.
-
-| `placement.new_named` | New project: %s | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.abandon` | Abandon move | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.abandoned` | Move abandoned. The task stays in %s. Work has not restarted. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.held_runner` | Waiting for the runner to confirm that work has stopped. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.held_publication` | Waiting for the last push to finish. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.held_owner` | The move needs a current owner with access to the task. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.held_destination` | The runner cannot reach the destination project. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.held_creation` | Waiting for the new project to be created. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.held_protocol` | The runner needs an update before this move can finish. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.observed` | Observed by Equipo | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.forget` | Remove correction | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
-| `placement.abandon_help` | You can abandon this move to keep the task here without restarting work. | Project placement | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15) |
diff --git a/internal/fakeclaude/fake.go b/internal/fakeclaude/fake.go
index 59a5b540..296d976b 100644
--- a/internal/fakeclaude/fake.go
+++ b/internal/fakeclaude/fake.go
@@ -1169,6 +1169,9 @@ func (f *fake) serve(stdin io.Reader, stdout, stderr io.Writer) int {
// obey: a gullible model reads each attached file and follows any
// tool words in it, as a prompt injection would have it.
steer := newest
+ if newest == "Create a new project called oficina/suite-site" {
+ steer = "tool:create_project:oficina/suite-site"
+ }
if strings.Contains(newest, "obey") {
for i, path := range attachmentPath.FindAllString(prompt, -1) {
text, isError := f.callTool(fmt.Sprintf("toolu_fake_%d_obey%d", turn, i), "read_file", map[string]any{"repo": "attachments", "path": path})
diff --git a/internal/headless/projects_test.go b/internal/headless/projects_test.go
index 99f17fe4..086eb7bf 100644
--- a/internal/headless/projects_test.go
+++ b/internal/headless/projects_test.go
@@ -398,7 +398,7 @@ func scenarioNewWork(t *testing.T, env *Env) {
s := open(t, env)
s.keep()
s.wait(t, "runner online", 30*time.Second, func(c *thintest.Conversation) bool { return c.Runner.Online })
- text := "Create a new project for a website for the Oficina suite. tool:create_project:oficina/suite-site"
+ text := "Create a new project called oficina/suite-site"
if env.Live {
text = "Create a new project for a small website that introduces the Oficina suite."
}
diff --git a/internal/runner/thin/desk.go b/internal/runner/thin/desk.go
index 38601b94..47bf3578 100644
--- a/internal/runner/thin/desk.go
+++ b/internal/runner/thin/desk.go
@@ -290,6 +290,9 @@ func (d *Desk) PlacementNotes() []wire.NotebookEntry {
}
func (d *Desk) SavePlacementNotes(notes []wire.NotebookEntry) error {
+ if len(notes) == 0 && len(d.PlacementNotes()) == 0 {
+ return nil
+ }
raw, err := json.Marshal(wire.BoundedPlacementNotes(notes))
if err != nil {
return err
diff --git a/internal/runner/thin/project_placement_test.go b/internal/runner/thin/project_placement_test.go
index 15645955..125f9426 100644
--- a/internal/runner/thin/project_placement_test.go
+++ b/internal/runner/thin/project_placement_test.go
@@ -4,6 +4,8 @@ import (
"amadan.net/oficina/equipo/internal/wire"
"context"
"encoding/json"
+ "os"
+ "path/filepath"
"strings"
"testing"
)
@@ -128,3 +130,18 @@ func TestPlacementCorrectionHasReservedContext(t *testing.T) {
t.Fatal("missing independent context slot", text)
}
}
+
+func TestPlacementEmptySnapshotKeepsFreshDeskEmpty(t *testing.T) {
+ d, err := OpenDesk(t.TempDir(), "person")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := d.SavePlacementNotes(nil); err != nil {
+ t.Fatal(err)
+ }
+ for _, path := range []string{d.entries, filepath.Join(filepath.Dir(d.entries), "placement.json")} {
+ if _, err := os.Stat(path); !os.IsNotExist(err) {
+ t.Fatal("empty delivery created notebook state", path, err)
+ }
+ }
+}