test: align final fixtures and budgets with the controller rulings
5 files changed,
+26
−17
.rastrillo/budgets.txt+5 −5internal/equipo/team/periodbudget_test.go+12 −5internal/equipotest/runner_flow_test.go+5 −5internal/equipotest/testdata/runner-flow.mjs+1 −1internal/runner/runtime_test.go+3 −1
CI failed — run details
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index 26853e84..87f22018 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -11,13 +11,13 @@ |
| # boot <duration> <reason> |
| size internal/equipo/team 8500 - Preserve the mandated core layout; final fixes add conservative period settlement and authority guards. Current source count: 8176. |
| perf GET /* skip Unknown private paths render 404; this fallback contains no screens. |
| -time internal/equipo/team 45s Task 18 whole-slice CI measured 26.546s for the copied core migration, recovery and concurrency suite on the shared machine. |
| -time internal/equipotest 300s Final review worst measured 172.4s; 300s allows 74 percent headroom and the added final regression tests. Final CI measurement will be recorded in the fix report. |
| +time internal/equipo/team 45s Final fix package rerun measured 29.461s (prior CI 28.271s); 45s gives 52 percent headroom for core migration, recovery and concurrency coverage. |
| +time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage. |
| -size internal/equipo 10800 - Final fixes retain the plan layout and add bounded row-change notifications, aggregate task counts and runner refusal handling; current source count: 9661. |
| +size internal/equipo 10800 - Final fixes retain the plan layout and add bounded row-change notifications, aggregate task counts and runner refusal handling; current source count: 9660. |
| size internal/equipotest - 13000 Final finding regressions stay beside the mandated integration fixtures; current test count: 11667. |
| -time internal/runner/checks 35s Task 18 whole-slice CI measured 17.451s for real Go fixtures, Codex sandbox sentinels, timeout and child-process cleanup on the shared machine. |
| -time internal/runner 300s Final review worst measured 220.6s; 300s allows 36 percent headroom. Injected clock cuts the 65s lease check to 8.416s while retaining four renewals and a real sandboxed check. |
| +time internal/runner/checks 35s Final CI measured 17.268s; prior worst 17.451s. 35s gives 100 percent headroom for real Go fixtures, 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. |
| perf GET /live skip Authorized notification stream, bounded to 30 seconds; not a GET screen. |
| perf GET /api/runner/v1/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. |
diff --git a/internal/equipo/team/periodbudget_test.go b/internal/equipo/team/periodbudget_test.go| index 8a362728..1f6bd158 100644 |
| --- a/internal/equipo/team/periodbudget_test.go |
| +++ b/internal/equipo/team/periodbudget_test.go |
| @@ -234,8 +234,13 @@ func TestTimeReservationsDoNotChangeCallLedger(t *testing.T) { |
| _, err = e.store.Admit(e.ctx, a, id) |
| must(t, err) |
| e.clock.Advance(300 * time.Second) |
| - if periodUsage(&e, 1).Reserved.Seconds != 1200 { |
| - t.Fatal("rollover released uncontained time") |
| + if periodUsage(&e, 1).Reserved.Seconds != 0 { |
| + t.Fatal("rollover carried uncontained time into next month") |
| + } |
| + old, err := e.store.PeriodUsage(e.ctx, acctA, 1, nov) |
| + must(t, err) |
| + if old.Reserved.Seconds != 1200 { |
| + t.Fatal("rollover lost original time charge", old) |
| } |
| receipt := Receipt{ID: "late", Outcome: OutcomeSuccess, Usage: &Usage{Calls: 1, InputTokens: 5}} |
| must(t, e.store.Record(e.ctx, a, id, receipt)) |
| @@ -244,8 +249,10 @@ func TestTimeReservationsDoNotChangeCallLedger(t *testing.T) { |
| if before.Reserved != (Usage{}) || before.Spent != *receipt.Usage || before.Charged != *receipt.Usage { |
| t.Fatal("late receipt changed call accounting", before) |
| } |
| - if periodUsage(&e, 1).Reserved.Seconds != 1200 { |
| - t.Fatal("late receipt settled time") |
| + old, err = e.store.PeriodUsage(e.ctx, acctA, 1, nov) |
| + must(t, err) |
| + if old.Reserved.Seconds != 1200 { |
| + t.Fatal("late receipt settled time", old) |
| } |
| must(t, e.store.Contain(e.ctx, a, h.Attempt, "s")) |
| e.clock.Advance(7 * time.Second) |
| @@ -264,7 +271,7 @@ func TestTimeReservationsDoNotChangeCallLedger(t *testing.T) { |
| if u := periodUsage(&e, 1); u != (PeriodUsage{}) { |
| t.Fatal("November charge counted in December", u) |
| } |
| - old, err := e.store.PeriodUsage(e.ctx, acctA, 1, nov) |
| + old, err = e.store.PeriodUsage(e.ctx, acctA, 1, nov) |
| must(t, err) |
| if old != (PeriodUsage{Spent: PeriodLimits{Calls: 1, InputTokens: 5, Seconds: 300}}) { |
| t.Fatal("late settlement did not stay in November", old) |
diff --git a/internal/equipotest/runner_flow_test.go b/internal/equipotest/runner_flow_test.go| index c8c54161..62cd2cce 100644 |
| --- a/internal/equipotest/runner_flow_test.go |
| +++ b/internal/equipotest/runner_flow_test.go |
| @@ -13,7 +13,6 @@ import ( |
| "crypto/sha256" |
| "database/sql" |
| "encoding/json" |
| - "errors" |
| "fmt" |
| "net/http/httptest" |
| "os" |
| @@ -306,11 +305,12 @@ func TestRunnerEndToEnd(t *testing.T) { |
| } |
| executionMust(t, f.s.SaveConnectionChoice(ctx, equipo.Actor{Address: member.Person}, equipo.ConnectionChoice{ProjectID: f.project.ID, ConnectionIDs: []string{connections[0].ID}})) |
| f.project = saveProject(t, f.s, f.project, []equipo.DecisionOwner{{Decision: "work", Address: member.Person}, {Decision: "merge", Address: member.Person}}, "member-work-owner") |
| - _, err = f.s.CreateBug(ctx, equipo.Actor{Address: member.Person}, f.project.ID, "second member has one family", "member-request") |
| - if !errors.Is(err, equipo.ErrUnavailable) { |
| - t.Fatalf("single-family submission: %v", err) |
| + waiting, err := f.s.CreateBug(ctx, equipo.Actor{Address: member.Person}, f.project.ID, "second member has one family", "member-request") |
| + executionMust(t, err) |
| + if waiting.State != "waiting" || waiting.WaitCode != "task.wait.family" || waiting.JobID != 0 { |
| + t.Fatal("single-family submission did not wait", waiting) |
| } |
| - if scalar(t, f.d, "SELECT count(*) FROM tasks") != 1 || scalar(t, f.d, "SELECT count(*) FROM runner_assignments") != 6 { |
| + if scalar(t, f.d, "SELECT count(*) FROM tasks") != 2 || scalar(t, f.d, "SELECT count(*) FROM runner_assignments") != 6 { |
| t.Fatal("single-family member dispatched") |
| } |
| requireRunnerDenied(t, f.s, token) |
diff --git a/internal/equipotest/testdata/runner-flow.mjs b/internal/equipotest/testdata/runner-flow.mjs| index 0dcd6cae..817f1521 100644 |
| --- a/internal/equipotest/testdata/runner-flow.mjs |
| +++ b/internal/equipotest/testdata/runner-flow.mjs |
| @@ -14,7 +14,7 @@ case 'subscribe':subs.set(p.agent.agent_id,p.subscription_id);event(p.agent,'tim |
| case 'send':{const a=p.agent,request=agents.get(a.agent_id).request,message=JSON.parse(p.message),step=message.Step;let name,args;++turn; |
| if(step==='reproduce'){name='submit_reproduction';args={expected_symptom:'wrong value',files:[{path:'bug_test.go',bytes:Buffer.from('package fixture\nimport "testing"\nfunc TestBug(t *testing.T){if Value()!=2 {t.Fatal("wrong value")}}\n').toString('base64')}],test_names:[{package:'fixture',name:'TestBug'}]};} |
| if(step==='implement'){fs.writeFileSync(request.workspace.path+'/value.go','package fixture\nfunc Value() int {return 2}\n');git(request.workspace.path,['add','.']);git(request.workspace.path,['commit','-m','fix']);name='submit_candidate';args={commit:git(request.workspace.path,['rev-parse','HEAD'])};} |
| -if(step==='review'){name='submit_review';args={candidate:JSON.parse(Buffer.from(message.Evidence.find(x=>x.Role==='candidate').Payload,'base64')).commit,decision:'approve',findings:[]};} |
| +if(step==='review'){name='submit_review';args={candidate:message.candidate_commit,decision:'approve',findings:[]};} |
| const env=request.mcp_servers.equipo.env,cap=JSON.parse(fs.readFileSync(env.EQUIPO_TOOL_CAPABILITY_FILE)); |
| await new Promise((resolve,reject)=>{const c=net.createConnection(env.EQUIPO_TOOL_SOCKET,()=>c.write(JSON.stringify({capability:cap.secret,instance_id:cap.instance_id,task_id:cap.task_id,attempt:cap.attempt,fence:cap.fence,request_id:name,name,arguments:args})+'\n'));c.on('data',raw=>{const v=JSON.parse(raw);c.end();v.ok?resolve():reject(Error('tool rejected'));});c.on('error',reject);}); |
| event(a,'turn_completed',{turn_id:'turn'+a.agent_id+turn});break;} |
diff --git a/internal/runner/runtime_test.go b/internal/runner/runtime_test.go| index b99d0b9f..ef4acc5f 100644 |
| --- a/internal/runner/runtime_test.go |
| +++ b/internal/runner/runtime_test.go |
| @@ -177,7 +177,9 @@ func TestUnconfinedContainmentRotatesTokensService(t *testing.T) { |
| if _, err = s.cleanup(ctx, record); err == nil || record.Phase == "contained" { |
| t.Fatal("failed rotation reopened admission") |
| } |
| - if err = r.service.Run(ctx); err == nil || polls != 0 { |
| + blockedCtx, stopBlocked := context.WithTimeout(ctx, 250*time.Millisecond) |
| + defer stopBlocked() |
| + if err = r.service.Run(blockedCtx); err == nil || polls != 0 { |
| t.Fatal("restart polled before rotation acknowledgement") |
| } |
| failAck = false |