oficina / equipo Public

fix: restore the full CI gate after Plan 3

Remove the stale schema-7 assertion from historical isolation JSON tests;
coordinator limits require schema 8, covered by the upgrade test.

Give containment fixtures an explicit writable legacy policy. The new
missing-manifest read-only default prevented orphan marker creation;
reaping itself is unchanged and five isolated reruns now pass.

Accept the sign-in landing dispatcher at / in the local drive tool and
report its startup failure instead of hiding it behind a missing link.
Keep production sign-in and containment security behavior unchanged.

Parallelize independent plan and policy tests, retain one progress-volume
exercise, and share compiled fake-driver fixtures with per-test runtime
state and cleanup. Record full-package timings; retain runner/directlive
ceilings and raise measured Codex, forge and provider exceptions.

All eight affected packages pass uncached. Budget, migration-check, vet,
gofmt and staticcheck v0.7.0 pass. Leave make ci to the controller.
codex agent, operated by paul@keymail.dev pushed by claude agent, operated by paul@keymail.dev 6b17fa53c4927b440a065ff83e2ae6f5ce2eba6b parent f49b41f
13 files changed, +215 −76
  • .rastrillo/budgets.txt +6 −3
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +43 −0
  • internal/directlive/budget_test.go +3 −1
  • internal/directlive/coordinator_fixes_test.go +4 −5
  • internal/directlive/driver_fixture_test.go +109 −0
  • internal/directlive/driver_test.go +16 −53
  • internal/equipo/team/direct_history_test.go +0 −3
  • internal/runner/containment/linux_test.go +2 −1
  • internal/runner/direct_cli_test.go +5 −3
  • internal/runner/direct_graph_test.go +20 −5
  • internal/runner/provider/codex/plan_policy_test.go +2 −0
  • tools/drive/main_test.go +4 −1
  • tools/drive/signin.go +1 −1
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 69d59a42..cb19dc99 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -17,15 +17,18 @@ time internal/equipotest 300s Final fix package rerun measured 187.035s (review
size internal/equipo 10800 - Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here.
size internal/equipotest - 13200 Task 21 repairs historical migration and conversation fixtures after Plan 3. Measured 13024 test lines; the 300s time ceiling is unchanged.
time internal/runner/checks 60s CI worker measured 44.553s (44.6s rounded); 60s gives 34 percent headroom. Shared baseline capture reduces repeated Go runs; retain the CI allowance for sandbox sentinels, timeout and child cleanup.
-time internal/runner 330s Final corrected package rerun measured 152.897s; review worst 220.6s, interrupted CI 245.239s. 330s exceeds even the interrupted run by 34 percent. Injected-clock lease test measured 8.416s instead of about 65s.
+time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s). Parallel plan graphs and removal of repeated progress floods reduced their local targeted run from 146.920s to 30.784s; the original bug graph retains volume coverage. Keep 330s for journal, proxy, recovery and namespace integration, with 13 percent headroom.
perf GET /live skip Authorized notification stream, bounded to 30 seconds; not a GET screen.
perf GET /api/runner/v2/artifacts/{assignment}/{artifact} skip Authenticated runner artifact download, not a browser GET screen. Runner long-poll and blob downloads use POST and are outside the screen inventory.
size internal/runner 9500 8800 Task 17 fix round 1 adds authenticated terminal-login composition and saved-report recovery beside the existing runner journal and state lock. Measured 9421 source and 8719 test lines. Login lifecycle, subprocess handling and environment parsing stay in setup/provider; the 100-line source raise retains only production HTTP/config wiring here. Existing test and 330s time ceilings are unchanged.
time internal/runner/provider/claude 45s Task 5 measured 32.430s for fake CLI sessions and fsynced account, policy, capture and refresh checks; 45s gives 38 percent headroom on the shared runner.
-time internal/runner/provider/codex 15s Task 11a full branch gate measured 11.659s (prior attempt 11.464s) for schema, native approval and fsynced capture fixtures; 15s gives 29 percent headroom under shared-runner load.
+time internal/runner/provider/codex 35s Plan 3 CI repair measured 24.464s for the full package (controller CI 27.908s). Independent policy subtests now run in parallel; 35s leaves 25 percent above the loaded CI measurement for schema, native approval and fsynced capture fixtures.
-time internal/directlive 360s Task 5 adds both coordinator policy cases to the fake certification matrix. The targeted 19-case fixture measured 287.275s; 360s leaves 25 percent headroom for namespaces, both adapters, journal, MCP probes and package siblings. Full-package timing is deferred by the targeted-only dispatch.
+time internal/directlive 360s Plan 3 CI repair measured 308.943s for the full package (controller CI 400.913s). Shared compiled fake drivers, removal of unused runner builds and independent parallel cases retain the 19-case matrix and coordinator failure isolation. Keep 360s with 16 percent headroom for namespaces, both adapters, journal and MCP probes.
time internal/plan3test 300s Initial cap for combined browser and runner acceptance; measure at both usable stops.
size internal/plan3test - 11600 Task 21 adds the mandated 3b onboarding, terminal-login, device-answer, copy/API release and 0018/3a upgrade fixtures. Measured 11146 test lines; all package tests measured 103.643s against the unchanged 300s ceiling. Shared browser/runner fixtures remain in this integration package.
+
+time internal/runner/forge 15s Plan 3 CI repair measured 10.527s for the full package (controller CI 10.407s); 15s leaves 42 percent headroom for local Git publication, exact-head readback and durable receipts on the shared runner.
+time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full package (controller CI 10.709s); 15s leaves 40 percent above CI for account locking, policy validation, terminal-login fixtures and fsynced credential refresh.
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index c1e1f0bf..4eb5ecd5 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -5336,3 +5336,46 @@ limits are deliberate: fake provider I/O, synthetic certification tuples,
fixture Save callback and separate runner/check/publication layers. Neither live
usable acceptance nor copy approval is claimed. No Plan 4 settlement, CARLOS
signals, mobile push, hosted runner or Mac runner is claimed.
+
+
+## CI repair after Task 21 (2026-11-04)
+
+The eight affected packages pass in full with Go 1.26.10, `CGO_ENABLED=0`, `nice -n 10` and `-count=1`. The complete report is `.superpowers/sdd/2026-11-04-equipo-plan-3-coordinator/cifix-report.md`. No `make ci`, full-repository test suite, live provider run, agent, copy-review server or push was used.
+
+Removed the stale version-7 assertion from historical isolation JSON coverage. Version 8 is required for coordinator limits; the migration test owns that expectation. JSON decoding, round-trip and direct-launch exclusion checks remain. Corrected the containment test fixture to provide an explicit writable legacy policy: Plan 3's missing-manifest read-only default prevented the orphan PID marker from being written. The reaper is unchanged. Changed drive's expected verification redirect from `/conversation` to the new `/` landing dispatcher and exposed its startup error in the failing-test diagnostic. Production security behavior is unchanged.
+
+Reduced repeated test work: independent Plan 3 graphs run in parallel and use two progress events while the original bug graph retains its 200-frame flood; fake-driver binaries are shared by variant and cleaned by TestMain, unused runner builds are removed, and isolated scenarios run in parallel; Codex's policy-launcher subtests run in parallel. All existing workflow, certification and failure-isolation assertions remain.
+
+### Red, mutations and restoration
+
+Commands below ran in `/home/paulca/amadan.net/oficina/equipo-plan-3`; package arguments were absolute. Each test used `nice -n 10 env CGO_ENABLED=0 go test`, the named `-run` expression and `-count=1` unless noted.
+
+| Guard | Command suffix / mutation | Observed result |
+| --- | --- | --- |
+| Historical JSON | `internal/equipo/team -run '^TestHistoricalIsolationRemainsReadable$'` before fix | Exit 1: `JSON extension changed schema: 8`; all JSON subtests passed. |
+| Required core version | `internal/equipo/team -run '^TestCoordinatorMigrationCoreUpgrade$'`; temporarily set SchemaVersion to 7 | Exit 1: `schema 8 newer than 7`. Restored version 8. |
+| Legacy JSON field | Historical test above; temporarily rename `paseo_version` JSON tag | Exit 1: all three subtests reported `history lost or rejected`. Restored the tag. |
+| Restored schema/history | `internal/equipo/team -run '^Test(HistoricalIsolationRemainsReadable|CoordinatorMigrationCoreUpgrade)$'` | Exit 0, 0.081s. |
+| Writable orphan fixture | `internal/runner/containment -run '^TestNamespaceReapsOrphans$' -count=5` | Before: 5/5 Signal 9 failures, 75.459s. After explicit policy: 5/5 pass, 0.583s. No deadline change. |
+| Drive sign-in | `tools/drive -run '^TestDriveRealSigninAndCleanup$'` | Before: exit 1, `run: sign-in confirmation refused`. After redirect correction: exit 0, 3.530s. |
+
+No production mutation remains. The containment dependency audit used `git log` and `git diff origin/main..HEAD` on containment, provider, egress and module files; only the new workspace-policy selection affected this fixture, not reaping code.
+
+### Full packages and gates
+
+| Package | Measured elapsed | Final ceiling |
+| --- | ---: | ---: |
+| `internal/equipo/team` | 33.480s | 45s |
+| `internal/runner/containment` | 9.766s | 10s default |
+| `tools/drive` | 3.794s | 10s default |
+| `internal/runner` | 292.120s | 330s, unchanged |
+| `internal/directlive` | 308.943s | 360s, unchanged |
+| `internal/runner/provider/codex` | 24.464s | 35s, raised |
+| `internal/runner/forge` | 10.527s | 15s, new exception |
+| `internal/runner/provider` | 10.346s | 15s, new exception |
+
+The targeted plan-graph group fell from 146.920s to 30.784s locally; the Codex policy-launcher matrix fell from 2.157s to 0.418s. Existing runner/directlive time records now contain full-package measurements. New and raised timing exceptions include measured reasons; no default-valued record or size-ceiling raise was added.
+
+`make budget` passed (35 directories); `make migration-check` passed (0.171s). `CGO_ENABLED=0 go vet -tags browser,perf` and `CGO_ENABLED=0 go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf` passed on the six changed Go packages. `gofmt -l` returned no changed-file paths, and `git diff --check` passed. New app-owned copy keys: none.
+
+The complete CI run remains the controller's responsibility. Containment is close to its default time ceiling (9.762s budget receipt); runner/directlive have 13/16 percent headroom. These are measured shared-machine times, not a guarantee against later load.
diff --git a/internal/directlive/budget_test.go b/internal/directlive/budget_test.go
index feecaddf..a1d77999 100644
--- a/internal/directlive/budget_test.go
+++ b/internal/directlive/budget_test.go
@@ -19,5 +19,7 @@ func TestMain(m *testing.M) {
if len(os.Args) > 1 && os.Args[1] == "__namespace" {
os.Exit(containment.NamespaceMain(os.Args[2:]))
}
- os.Exit(budget.Main(m))
+ code := budget.Main(m)
+ cleanFakeDriverBuilds()
+ os.Exit(code)
}
diff --git a/internal/directlive/coordinator_fixes_test.go b/internal/directlive/coordinator_fixes_test.go
index dd84850d..17638a0f 100644
--- a/internal/directlive/coordinator_fixes_test.go
+++ b/internal/directlive/coordinator_fixes_test.go
@@ -80,9 +80,8 @@ func TestCoordinatorInventoryObservation(t *testing.T) {
}
}
func TestCoordinatorLiveModeFakeCLI(t *testing.T) {
- t.Setenv("EQUIPO_FAKE_COORDINATOR_ONLY", "1")
- t.Setenv("EQUIPO_FAKE_LIVE_MODE", "1")
- TestDirectDriverFakeCLI(t)
+ t.Parallel()
+ runFakeDriver(t, false, "EQUIPO_FAKE_COORDINATOR_ONLY=1", "EQUIPO_FAKE_LIVE_MODE=1")
}
func TestCoordinatorCalibrationIsolation(t *testing.T) {
records := []provider.DirectEvidence{
@@ -96,8 +95,8 @@ func TestCoordinatorCalibrationIsolation(t *testing.T) {
}
func TestCoordinatorFailureIsolatedFakeCLI(t *testing.T) {
- t.Setenv("EQUIPO_FAKE_BAD_COORDINATOR", "1")
- TestDirectDriverFakeCLI(t)
+ t.Parallel()
+ runFakeDriver(t, true)
}
func TestCoordinatorCertificationSelection(t *testing.T) {
diff --git a/internal/directlive/driver_fixture_test.go b/internal/directlive/driver_fixture_test.go
new file mode 100644
index 00000000..8e21a775
--- /dev/null
+++ b/internal/directlive/driver_fixture_test.go
@@ -0,0 +1,109 @@
+package directlive
+
+import (
+ "encoding/json"
+ "fmt"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strings"
+ "sync"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/runner/provider"
+ "amadan.net/oficina/equipo/internal/runner/provider/claude"
+ "amadan.net/oficina/equipo/internal/runner/provider/codex"
+)
+
+var fakeDriverBuilds [2]struct {
+ sync.Once
+ root string
+ err error
+}
+
+func fakeDriverBuild(t *testing.T, badCoordinator bool) string {
+ t.Helper()
+ index := 0
+ if badCoordinator {
+ index = 1
+ }
+ f := &fakeDriverBuilds[index]
+ f.Do(func() { f.root, f.err = buildFakeDriver(badCoordinator) })
+ if f.err != nil {
+ t.Fatal(f.err)
+ }
+ return f.root
+}
+
+func cleanFakeDriverBuilds() {
+ for i := range fakeDriverBuilds {
+ if root := fakeDriverBuilds[i].root; root != "" {
+ os.RemoveAll(root)
+ }
+ }
+}
+
+func buildFakeDriver(badCoordinator bool) (root string, err error) {
+ root, err = os.MkdirTemp(os.Getenv("TMPDIR"), "equipo-fake-driver-")
+ if err != nil {
+ return root, err
+ }
+ repo, err := filepath.Abs("../..")
+ if err != nil {
+ return root, err
+ }
+ script, err := os.ReadFile("testdata/fake-cli.py")
+ if err != nil {
+ return root, err
+ }
+ fixture, err := os.ReadFile("../runner/provider/codex/testdata/unauthenticated-0.165.0.json")
+ if err != nil {
+ return root, err
+ }
+ literal, _ := json.Marshal(string(fixture))
+ script = []byte(strings.ReplaceAll(string(script), "RECORDED_FIXTURE", string(literal)))
+ if badCoordinator {
+ script = []byte(strings.Replace(string(script), "names=mcp()", "names=mcp()\n if 'mcp__equipo__read_project' in names:names+=['exec_command']", 1))
+ }
+ pins := map[string]string{}
+ for _, name := range []string{"claude", "codex", "codex-code-mode-host"} {
+ raw := script
+ if name == "codex-code-mode-host" {
+ raw = []byte("#!/bin/sh\nexit 0\n")
+ }
+ if err = os.WriteFile(filepath.Join(root, name), raw, 0700); err != nil {
+ return root, err
+ }
+ pins[name] = provider.DigestDirectEvidence(raw)
+ }
+ overlays := map[string]string{}
+ for _, name := range []string{"claude", "codex"} {
+ path := filepath.Join(repo, "internal/runner/provider", name, "launcher.go")
+ raw, err := os.ReadFile(path)
+ if err != nil {
+ return root, err
+ }
+ data := strings.ReplaceAll(string(raw), map[string]string{"claude": claude.ExecutableSHA256, "codex": codex.ExecutableSHA256}[name], pins[name])
+ data = strings.ReplaceAll(data, codex.CodeModeHostSHA256, pins["codex-code-mode-host"])
+ overlay := filepath.Join(root, name+".go")
+ if err = os.WriteFile(overlay, []byte(data), 0600); err != nil {
+ return root, err
+ }
+ overlays[path] = overlay
+ }
+ overlay := filepath.Join(root, "overlay.json")
+ if err = os.WriteFile(overlay, marshal(map[string]any{"Replace": overlays}), 0600); err != nil {
+ return root, err
+ }
+ for _, args := range [][]string{
+ {"build", "-overlay", overlay, "-trimpath", "-buildvcs=false", "-o", filepath.Join(root, "equipo-tool-proxy"), "./cmd/equipo-tool-proxy"},
+ {"test", "-c", "-overlay", overlay, "-o", filepath.Join(root, "worker"), "./internal/directlive"},
+ } {
+ cmd := exec.Command("go", args...)
+ cmd.Dir = repo
+ if out, err := cmd.CombinedOutput(); err != nil {
+ return root, fmt.Errorf("build fake driver: %w: %s", err, out)
+ }
+ }
+ return root, nil
+}
diff --git a/internal/directlive/driver_test.go b/internal/directlive/driver_test.go
index 66f7fcc8..c38ed9a8 100644
--- a/internal/directlive/driver_test.go
+++ b/internal/directlive/driver_test.go
@@ -17,69 +17,32 @@ import (
)
func TestCoordinatorToolAllowlistFakeCLI(t *testing.T) {
- t.Setenv("EQUIPO_FAKE_COORDINATOR_ONLY", "1")
- TestDirectDriverFakeCLI(t)
+ t.Parallel()
+ runFakeDriver(t, false, "EQUIPO_FAKE_COORDINATOR_ONLY=1")
}
func TestDirectDriverFakeCLI(t *testing.T) {
+ t.Parallel()
+ runFakeDriver(t, false)
+}
+func runFakeDriver(t *testing.T, badCoordinator bool, env ...string) {
+ t.Helper()
+ fixture := fakeDriverBuild(t, badCoordinator)
root := t.TempDir()
- repo, err := filepath.Abs("../..")
- if err != nil {
- t.Fatal(err)
- }
- script, err := os.ReadFile("testdata/fake-cli.py")
- if err != nil {
- t.Fatal(err)
- }
- fixture, err := os.ReadFile("../runner/provider/codex/testdata/unauthenticated-0.165.0.json")
- if err != nil {
- t.Fatal(err)
- }
- literal, _ := json.Marshal(string(fixture))
- script = []byte(strings.ReplaceAll(string(script), "RECORDED_FIXTURE", string(literal)))
- badCoordinator := os.Getenv("EQUIPO_FAKE_BAD_COORDINATOR") == "1"
- if badCoordinator {
- script = []byte(strings.Replace(string(script), "names=mcp()", "names=mcp()\n if 'mcp__equipo__read_project' in names:names+=['exec_command']", 1))
- }
- pins := map[string]string{}
- for _, name := range []string{"claude", "codex", "codex-code-mode-host"} {
- raw := script
- if name == "codex-code-mode-host" {
- raw = []byte("#!/bin/sh\nexit 0\n")
- }
- if err = os.WriteFile(filepath.Join(root, name), raw, 0700); err != nil {
- t.Fatal(err)
- }
- pins[name] = provider.DigestDirectEvidence(raw)
- }
- overlays := map[string]string{}
- for _, name := range []string{"claude", "codex"} {
- path := filepath.Join(repo, "internal/runner/provider", name, "launcher.go")
- raw, err := os.ReadFile(path)
+ for _, name := range []string{"claude", "codex", "codex-code-mode-host", "equipo-tool-proxy"} {
+ raw, err := os.ReadFile(filepath.Join(fixture, name))
if err != nil {
t.Fatal(err)
}
- data := strings.ReplaceAll(string(raw), map[string]string{"claude": claude.ExecutableSHA256, "codex": codex.ExecutableSHA256}[name], pins[name])
- data = strings.ReplaceAll(data, codex.CodeModeHostSHA256, pins["codex-code-mode-host"])
- overlay := filepath.Join(root, name+".go")
- if err = os.WriteFile(overlay, []byte(data), 0600); err != nil {
+ if err := os.WriteFile(filepath.Join(root, name), raw, 0700); err != nil {
t.Fatal(err)
}
- overlays[path] = overlay
}
- overlay := filepath.Join(root, "overlay.json")
- if err = os.WriteFile(overlay, marshal(map[string]any{"Replace": overlays}), 0600); err != nil {
- t.Fatal(err)
- }
- for _, name := range []string{"equipo-runner", "equipo-tool-proxy"} {
- cmd := exec.Command("go", "build", "-overlay", overlay, "-trimpath", "-buildvcs=false", "-o", filepath.Join(root, name), "./cmd/"+name)
- cmd.Dir = repo
- if out, err := cmd.CombinedOutput(); err != nil {
- t.Fatalf("build %s: %v %s", name, err, out)
- }
- }
- cmd := exec.Command("go", "test", "-overlay", overlay, "./internal/directlive", "-run", "^TestDirectDriverFakeWorker$", "-count=1", "-v")
- cmd.Dir = repo
+ cmd := exec.Command(filepath.Join(fixture, "worker"), "-test.run=^TestDirectDriverFakeWorker$", "-test.count=1", "-test.v")
cmd.Env = append(os.Environ(), "EQUIPO_FAKE_DRIVER_ROOT="+root)
+ cmd.Env = append(cmd.Env, env...)
+ if badCoordinator {
+ cmd.Env = append(cmd.Env, "EQUIPO_FAKE_BAD_COORDINATOR=1")
+ }
if out, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("full fake CLI driver: %v\n%s", err, out)
} else {
diff --git a/internal/equipo/team/direct_history_test.go b/internal/equipo/team/direct_history_test.go
index 6dbc83b2..b5aac560 100644
--- a/internal/equipo/team/direct_history_test.go
+++ b/internal/equipo/team/direct_history_test.go
@@ -62,9 +62,6 @@ func TestHistoricalIsolationRemainsReadable(t *testing.T) {
t.Fatalf("partial direct identity accepted as history: %s", field)
}
}
- if team.SchemaVersion != 7 {
- t.Fatalf("JSON extension changed schema: %d", team.SchemaVersion)
- }
}
func TestDirectIsolationTupleIdentity(t *testing.T) {
diff --git a/internal/runner/containment/linux_test.go b/internal/runner/containment/linux_test.go
index 3eff7949..91077121 100644
--- a/internal/runner/containment/linux_test.go
+++ b/internal/runner/containment/linux_test.go
@@ -39,7 +39,8 @@ func fixture(t *testing.T) (*Manager, provider.Launch) {
if err != nil {
t.Fatalf("namespace capability missing: %v", err)
}
- return m, provider.Launch{AttemptKey: "attempt-fixture", Workspace: workspace, Policy: provider.Policy{Hash: "fixture-policy"}}
+ // An explicit legacy policy permits writes; a missing manifest fails closed.
+ return m, provider.Launch{AttemptKey: "attempt-fixture", Workspace: workspace, Policy: provider.Policy{Hash: "fixture-policy", Manifest: []byte(`{}`)}}
}
func launch(t *testing.T, m *Manager, l provider.Launch, script string) provider.Process {
t.Helper()
diff --git a/internal/runner/direct_cli_test.go b/internal/runner/direct_cli_test.go
index e3762da1..a09d907b 100644
--- a/internal/runner/direct_cli_test.go
+++ b/internal/runner/direct_cli_test.go
@@ -6,6 +6,7 @@ import (
"fmt"
"os"
"path/filepath"
+ "strings"
"sync"
"testing"
@@ -29,10 +30,11 @@ type graphCLISession struct {
mu sync.Mutex
}
-func fakeDirectGraph(t *testing.T, j *Journal, host provider.ProcessHost, root, scratch, helper string) (map[string]provider.Launcher, func(context.Context, RunClaim, workspace.Workspace, *ToolProxy) (provider.Launch, func() error, error)) {
+func fakeDirectGraph(t *testing.T, j *Journal, host provider.ProcessHost, root, scratch, helper string, progressFrames int) (map[string]provider.Launcher, func(context.Context, RunClaim, workspace.Workspace, *ToolProxy) (provider.Launch, func() error, error)) {
f := &graphCLI{j: j, host: host, sessions: map[string]*graphCLISession{}, proxies: map[string]*ToolProxy{}}
binary := filepath.Join(root, "fake-cli")
- wfMust(t, os.WriteFile(binary, []byte(graphScript), 0700))
+ script := strings.ReplaceAll(graphScript, "PROGRESS_FRAMES", fmt.Sprint(progressFrames))
+ wfMust(t, os.WriteFile(binary, []byte(script), 0700))
launch := func(ctx context.Context, c RunClaim, ws workspace.Workspace, proxy *ToolProxy) (provider.Launch, func() error, error) {
name := c.Assignment.Selection.Provider
home := filepath.Join(root, "fixture-account-"+c.Assignment.StepKey)
@@ -186,7 +188,7 @@ for line in sys.stdin:
tool='submit_candidate';args={'commit':git('rev-parse','HEAD')}
else:
tool='submit_review';args={'candidate':message['candidate_commit'],'decision':'approve','findings':[]}
- for i in range(200): print(json.dumps({'progress':i}),flush=True)
+ for i in range(PROGRESS_FRAMES): print(json.dumps({'progress':i}),flush=True)
print(json.dumps({'tool':tool,'arguments':args}),flush=True)
if tool=='submit_candidate' and message.get('render_available'): print(json.dumps({'tool':'submit_render','arguments':args}),flush=True)
print(json.dumps({'final':True,'usage':{'input_tokens':2,'output_tokens':3}}),flush=True)
diff --git a/internal/runner/direct_graph_test.go b/internal/runner/direct_graph_test.go
index 5057db9d..f431d8c7 100644
--- a/internal/runner/direct_graph_test.go
+++ b/internal/runner/direct_graph_test.go
@@ -22,10 +22,19 @@ import (
"amadan.net/oficina/equipo/internal/runnerproto"
)
-func runDirectBugGraph(t *testing.T) { runDirectPlanGraph(t, false, false, false) }
-func TestPlanWorkflowFeature(t *testing.T) { runDirectPlanGraph(t, true, false, false) }
-func TestPlanWorkflowCandidateOrder(t *testing.T) { runDirectPlanGraph(t, true, true, false) }
-func TestPlanWorkflowRecommendation(t *testing.T) { runDirectPlanGraph(t, false, false, true) }
+func runDirectBugGraph(t *testing.T) { runDirectPlanGraph(t, false, false, false) }
+func TestPlanWorkflowFeature(t *testing.T) {
+ t.Parallel()
+ runDirectPlanGraph(t, true, false, false)
+}
+func TestPlanWorkflowCandidateOrder(t *testing.T) {
+ t.Parallel()
+ runDirectPlanGraph(t, true, true, false)
+}
+func TestPlanWorkflowRecommendation(t *testing.T) {
+ t.Parallel()
+ runDirectPlanGraph(t, false, false, true)
+}
func runDirectPlanGraph(t *testing.T, feature, extra, readWork bool) {
ctx := context.Background()
root, err := os.MkdirTemp(os.Getenv("TMPDIR"), "e15-")
@@ -52,7 +61,13 @@ func runDirectPlanGraph(t *testing.T, feature, extra, readWork bool) {
_, err = j.ReconcileDirect(ctx, namespaces)
wfMust(t, err)
host := NewDirectHost(j, namespaces)
- registry, launch := fakeDirectGraph(t, j, host, root, scratch, helper)
+ // The original bug graph retains the capture backpressure exercise.
+ // Plan variants need timeline events but do not repeat its volume test.
+ progressFrames := 200
+ if feature || readWork {
+ progressFrames = 2
+ }
+ registry, launch := fakeDirectGraph(t, j, host, root, scratch, helper, progressFrames)
wfMust(t, os.WriteFile(filepath.Join(seed, "go.mod"), []byte("module fixture\n\ngo 1.26.0\n"), 0600))
wfMust(t, os.WriteFile(filepath.Join(seed, "value.go"), []byte("package fixture\nfunc Value() int {return 1}\n"), 0600))
wfMust(t, os.WriteFile(filepath.Join(seed, "old_test.go"), []byte("package fixture\nimport \"testing\"\nfunc TestOld(t *testing.T) {}\n"), 0600))
diff --git a/internal/runner/provider/codex/plan_policy_test.go b/internal/runner/provider/codex/plan_policy_test.go
index f52ac71f..dc7562b9 100644
--- a/internal/runner/provider/codex/plan_policy_test.go
+++ b/internal/runner/provider/codex/plan_policy_test.go
@@ -44,8 +44,10 @@ func TestPlanWorkflowProviderPolicies(t *testing.T) {
}
func TestPlanWorkflowProviderPoliciesLauncher(t *testing.T) {
+ t.Parallel()
for _, action := range []string{"coordinate", "scope", "recommend", "investigate", "implement", "copy", "design", "review"} {
t.Run(action, func(t *testing.T) {
+ t.Parallel()
f := fixtureFor(t)
p, _ := provider.Profile(action)
in := f.inputs
diff --git a/tools/drive/main_test.go b/tools/drive/main_test.go
index 079e3d46..49631797 100644
--- a/tools/drive/main_test.go
+++ b/tools/drive/main_test.go
@@ -57,7 +57,10 @@ func TestDriveRealSigninAndCleanup(t *testing.T) {
})
scanner := bufio.NewScanner(r)
if !scanner.Scan() {
- t.Fatal("no sign-in link")
+ cancel()
+ err := <-done
+ finished = true
+ t.Fatalf("no sign-in link: run: %v; read: %v", err, scanner.Err())
}
line := scanner.Text()
link := strings.Split(strings.TrimPrefix(line, "["), "](")[0]
diff --git a/tools/drive/signin.go b/tools/drive/signin.go
index 82fca34d..ed44d211 100644
--- a/tools/drive/signin.go
+++ b/tools/drive/signin.go
@@ -135,7 +135,7 @@ func confirm(c *http.Client, link string) error {
if err != nil {
return err
}
- if location != "/conversation" {
+ if location != "/" {
return errors.New("sign-in confirmation refused")
}
return nil