=== RUN   TestWorkflowGovernance_PiAgent_PG_FullChain
2026/09/16 03:29:05 OK   00001_baseline.sql (52.99ms)
2026/09/16 03:29:05 OK   00002_2026-09-09-doc-edit-lease.sql (2.81ms)
2026/09/16 03:29:05 OK   00003_2026-09-09-uq-context-memory-chunk-hash.sql (1.48ms)
2026/09/16 03:29:05 OK   00004_2026-09-10-chat-daily-digests-and-search.sql (1.19ms)
2026/09/16 03:29:05 OK   00005_2026-09-10-chat-messages-day-window.sql (831.31µs)
2026/09/16 03:29:05 OK   00006_2026-09-11-chat-read-positions.sql (381.52µs)
2026/09/16 03:29:05 OK   00007_2026-09-11-chat-turns.sql (392.26µs)
2026/09/16 03:29:05 OK   00008_2026-09-11-freeform-documents.sql (6.98ms)
2026/09/16 03:29:05 OK   00009_2026-09-11-message-export-policy.sql (2.68ms)
2026/09/16 03:29:05 OK   00010_2026-09-11-project-workflows-and-lineage.sql (13.89ms)
2026/09/16 03:29:05 OK   00011_2026-09-11-seed-ten-projects.sql (4.79ms)
2026/09/16 03:29:05 OK   00012_2026-09-11-seed-ten-projects-chat.sql (26.88ms)
2026/09/16 03:29:05 OK   00013_2026-09-11-task-run-lineage.sql (1.17ms)
2026/09/16 03:29:05 OK   00014_project_members.sql (3.17ms)
2026/09/16 03:29:05 OK   00015_2026-09-12-iam-core.sql (16.68ms)
2026/09/16 03:29:05 OK   00016_2026-09-12-workflow-definitions-and-templates.sql (10.62ms)
2026/09/16 03:29:05 OK   00017_2026-09-12-project-workflow-instances.sql (14.46ms)
2026/09/16 03:29:05 OK   00018_2026-09-12-outbox-notifications-stage-advance.sql (7.96ms)
2026/09/16 03:29:05 OK   00019_2026-09-12-task-runs-events.sql (6.2ms)
2026/09/16 03:29:05 OK   00020_2026-09-12-task-run-worker-lease.sql (1.16ms)
2026/09/16 03:29:05 OK   00021_2026-09-12-iam-hardening.sql (2.66ms)
2026/09/16 03:29:05 OK   00022_2026-09-12-workflow-schema-v2.sql (1.94ms)
2026/09/16 03:29:05 OK   00023_2026-09-12-instance-integrity.sql (1.04ms)
2026/09/16 03:29:05 OK   00024_2026-09-12-workflow-catalog-governance.sql (6.15ms)
2026/09/16 03:29:05 OK   00025_2026-09-13-sync-seed-sequences.sql (909.05µs)
2026/09/16 03:29:05 OK   00026_2026-09-13-chat-message-scope.sql (2.59ms)
2026/09/16 03:29:05 OK   00027_2026-09-13-chat-message-scope-backfill.sql (2.16ms)
2026/09/16 03:29:05 OK   00028_2026-09-13-document-revisions.sql (14.9ms)
2026/09/16 03:29:05 OK   00029_2026-09-13-freeform-client-key.sql (1.14ms)
2026/09/16 03:29:05 OK   00030_2026-09-13-task-run-pending-author-confirmation.sql (998.16µs)
2026/09/16 03:29:05 OK   00031_2026-09-13-project-member-document-duty.sql (1.64ms)
2026/09/16 03:29:05 OK   00032_2026-09-14-document-revision-migration-repair.sql (623.08µs)
2026/09/16 03:29:05 OK   00033_2026-09-14-task-run-blocked-pending-governance.sql (407.39µs)
2026/09/16 03:29:05 OK   00034_2026-09-14-workspace-lease-fencing.sql (432.16µs)
2026/09/16 03:29:05 OK   00035_2026-09-14-durable-event-delivery.sql (4.93ms)
2026/09/16 03:29:05 OK   00036_2026-09-14-final-artifact-vault.sql (8.11ms)
2026/09/16 03:29:05 OK   00037_2026-09-15-task-run-manifests.sql (2.17ms)
2026/09/16 03:29:05 OK   00038_2026-09-15-dataset-lifecycle.sql (6.94ms)
2026/09/16 03:29:05 OK   00039_2026-09-15-event-inventory-and-principals.sql (5.38ms)
2026/09/16 03:29:05 OK   00040_2026-09-15-event-dispatcher.sql (5.87ms)
2026/09/16 03:29:05 OK   00041_2026-09-15-notification-visible-outcome.sql (981.65µs)
2026/09/16 03:29:05 OK   00042_2026-09-15-workflow-advance-outcome.sql (849.03µs)
2026/09/16 03:29:05 OK   00043_2026-09-15-projection-outcome.sql (1.86ms)
2026/09/16 03:29:05 OK   00044_2026-09-15-intent-plans.sql (9.41ms)
2026/09/16 03:29:05 OK   00045_2026-09-16-intent-plan-projection.sql (3.52ms)
2026/09/16 03:29:05 OK   00046_2026-09-16-retire-demo-ten-projects.sql (864.41µs)
2026/09/16 03:29:05 OK   00047_2026-09-16-retire-demo-ten-project-sessions.sql (357.51µs)
2026/09/16 03:29:05 goose: successfully migrated database to version: 47
2026/09/16 03:29:05 goose: no migrations to run. current version: 47
    workflow_governance_piagent_pg_test.go:261: ✓ [1. 项目创建] id=6011 code=pg-piagent-治-734d7a01 wf=main
    workflow_governance_piagent_pg_test.go:261: ✓ [2. 工作流激活] instance_id=1
    workflow_governance_piagent_pg_test.go:261: ✓ [3. pi-agent intake] doc=doc_proj6011_intake title=用户初始需求收集表 elapsed=3m29s
    workflow_governance_piagent_pg_test.go:261: ✓ [4. 文档批准] approve chain complete
    workflow_governance_piagent_pg_test.go:261: ✓ [5. 阶段推进] PG + pi-agent 治理全链路完成 wf=main
--- PASS: TestWorkflowGovernance_PiAgent_PG_FullChain (210.64s)
=== RUN   TestWorkflowGovernance_PiAgent_PG_ProductManager_FullChain
{"time":"2026-09-16T03:32:35.64062371Z","level":"INFO","msg":"goose: no migrations to run. current version: 47"}
{"time":"2026-09-16T03:32:35.653820428Z","level":"INFO","msg":"goose: no migrations to run. current version: 47"}
    workflow_governance_piagent_pg_test.go:275: ✓ [1. 项目创建] id=6012 code=pg-piagent-产-6ab8ff79 wf=product_manager
    workflow_governance_piagent_pg_test.go:275: ✓ [2. 工作流激活] instance_id=2
{"time":"2026-09-16T03:32:36.706239469Z","level":"INFO","msg":"[kb-retriever] embed failed: http 500 Internal Server Error: unexpected end of JSON input (batch=1 est_tokens≈26)"}
    workflow_governance_piagent_pg_test.go:275: ✓ [3. pi-agent system_reqs] doc=doc_proj6012_system_reqs title=系统需求规格书 elapsed=11m5s
    workflow_governance_piagent_pg_test.go:275: ✓ [4. 文档批准] approve chain complete
    workflow_governance_piagent_pg_test.go:275: ✓ [5. 阶段推进] PG + pi-agent 治理全链路完成 wf=product_manager
--- PASS: TestWorkflowGovernance_PiAgent_PG_ProductManager_FullChain (670.20s)
=== RUN   TestWorkflowGovernance_PiAgent_PG_TestManager_FullChain
{"time":"2026-09-16T03:43:45.842254474Z","level":"INFO","msg":"goose: no migrations to run. current version: 47"}
{"time":"2026-09-16T03:43:45.853747123Z","level":"INFO","msg":"goose: no migrations to run. current version: 47"}
    workflow_governance_piagent_pg_test.go:290: ✓ [1. 项目创建] id=6013 code=pg-piagent-测-02d30920 wf=test_manager
    workflow_governance_piagent_pg_test.go:290: ✓ [2. 工作流激活] instance_id=3
    workflow_governance_piagent_pg_test.go:290: ✓ [3. pi-agent test_manager] doc=doc_proj6013_test_manager title=系统验证方案及计划 elapsed=13m30s
    workflow_governance_piagent_pg_test.go:290: ✓ [4. 文档批准] approve chain complete
    workflow_governance_piagent_pg_test.go:290: ✓ [5. 阶段推进] PG + pi-agent 治理全链路完成 wf=test_manager
--- PASS: TestWorkflowGovernance_PiAgent_PG_TestManager_FullChain (815.44s)
PASS
ok  	chat-agent-system/internal/server	1696.286s
EXIT:0
