pi-agent: Fix final integrated review

This commit is contained in:
proxyctl coordinator
2026-07-18 02:37:54 +08:00
parent ed8b527f1f
commit 652d7eba2b
18 changed files with 566 additions and 393 deletions
+17
View File
@@ -38,6 +38,23 @@ func TestCompleteModelWideOperationsConsoleShowsStableAvailableTargetDashboard(t
}
}
func TestCompleteModelFailedProgressSupplementsTruthfulTargetState(t *testing.T) {
for _, state := range []target.State{target.Enabled, target.Disabled, target.External, target.Drifted} {
t.Run(string(state), func(t *testing.T) {
module := &recordingModule{snapshot: app.Snapshot{Targets: []app.TargetSnapshot{{
ID: "shell", Description: target.Description{Name: "Shell"}, Available: true, State: state,
}}}}
model := resizedModel(t, module, themeModeNoColor, 120, 36)
model.operation.progress["shell"] = app.TargetProgressFailed
view := model.View()
wantState := targetStateLabel(state)
if !strings.Contains(view, "> "+wantState+" ! Failed Shell") {
t.Fatalf("failed progress replaced truthful %s state instead of supplementing it:\n%s", state, view)
}
})
}
}
func TestCompleteModelDashboardRevealsUnavailableEvidenceAndStructuredDetails(t *testing.T) {
module := &recordingModule{snapshot: app.Snapshot{Targets: []app.TargetSnapshot{
{ID: "shell", Description: target.Description{Name: "Shell"}, Available: true, State: target.Disabled, Evidence: "fragment absent"},