docs: annotate Foundry source and deployment lifecycle in Chinese [skip ci]

This commit is contained in:
2026-11-16 17:52:11 +08:00
parent 30829eeb86
commit 1090591503
123 changed files with 1279 additions and 3 deletions
+4
View File
@@ -1,3 +1,4 @@
// 本文件记录研究 API 的回归契约;测试注释描述实际断言,不代表本次已运行测试。
package research
import (
@@ -6,6 +7,7 @@ import (
"testing"
)
// TestCorpusTextCodecRoundTripAndOrder 对控制字符和 Unicode 两两比较,验证转义既可逆又保留字节排序,并拒绝残缺转义。
func TestCorpusTextCodecRoundTripAndOrder(t *testing.T) {
values := []string{"", "\x00", "\x00\x01", "\x01", "\x01\x02", "\x02", "A", "A\x00", "A\x01", "Ada 张三 Ω", "Z\x00\x01\x02尾"}
for _, value := range values {
@@ -27,6 +29,7 @@ func TestCorpusTextCodecRoundTripAndOrder(t *testing.T) {
}
}
// TestCorpusTextColumnsRespectCodecAndNulls 验证普通库不解码、编码库还原控制字符,且可空列与必填列保持各自 NULL 约束。
func TestCorpusTextColumnsRespectCodecAndNulls(t *testing.T) {
var required string
if err := (textColumn{target: &required}).Scan("\x01\x01"); err != nil || required != "\x01\x01" {
@@ -50,6 +53,7 @@ func TestCorpusTextColumnsRespectCodecAndNulls(t *testing.T) {
}
}
// TestCorpusSchemaCodecMarker 验证无标记沿用普通文本、已知标记开启 codec、未知版本明确失败。
func TestCorpusSchemaCodecMarker(t *testing.T) {
for _, annotation := range []sql.NullString{{}, {String: "unrelated schema description", Valid: true}} {
encoded, err := encodedSchema(annotation)