fix(*): 平台稳定性 - 修复会话隔离、运行时缓存与部署镜像更新链路

This commit is contained in:
ddcat666
2026-09-24 06:05:04 +08:00
parent 88abdd1b75
commit e77c26d2b0
32 changed files with 788 additions and 116 deletions

View File

@@ -73,7 +73,7 @@ func TestCachedTextReplayIsolatesUsersCursorsAndCopies(t *testing.T) {
}
}
func TestRuntimeConcurrencyCacheDoesNotCacheAuthoritativePolicy(t *testing.T) {
func TestRuntimeConcurrencyCacheCachesAuthoritativePolicy(t *testing.T) {
db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
if err != nil {
t.Fatal(err)
@@ -101,8 +101,8 @@ func TestRuntimeConcurrencyCacheDoesNotCacheAuthoritativePolicy(t *testing.T) {
t.Fatal(err)
}
}
if queries.Load() != before+2 {
t.Fatal("authoritative policy incorrectly cached")
if queries.Load() != before {
t.Fatalf("authoritative policy cache missed: queries=%d before=%d", queries.Load(), before)
}
policy := defaultRuntimePolicy()
policy.Task.WorkerConcurrency = 7