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
+6
View File
@@ -1,5 +1,6 @@
-- Synthetic fixture for the disposable, network-isolated CI database only.
-- Required columns/types follow Paper Atlas's fixed a3b677b migration.
-- 基础语料覆盖同名标题、可空摘要/日期、多作者形状及原文特殊字符;仅用于可丢弃测试库。
CREATE SCHEMA research_fixture;
CREATE TABLE research_fixture.papers (
id bigint PRIMARY KEY, title text NOT NULL, abstract text, title_key text COLLATE "C" NOT NULL,
@@ -15,6 +16,7 @@ CREATE TABLE research_fixture.source_records (
);
CREATE TABLE research_fixture.identifiers (scheme text,value text,paper_id bigint REFERENCES research_fixture.papers(id),PRIMARY KEY(scheme,value));
CREATE TABLE research_fixture.tags (id bigint PRIMARY KEY,namespace text,value text,UNIQUE(namespace,value));
-- evidence_key 允许同论文同标签有多条来源证据,列表和主题分页需去重论文而不是重复返回。
CREATE TABLE research_fixture.paper_tags (
paper_id bigint REFERENCES research_fixture.papers(id),tag_id bigint REFERENCES research_fixture.tags(id),
evidence_key text,PRIMARY KEY(paper_id,tag_id,evidence_key)
@@ -47,18 +49,21 @@ INSERT INTO research_fixture.paper_tags VALUES(1,1,'first'),(1,1,'second'),(1,2,
INSERT INTO research_fixture.venues VALUES(1,'ICLR'),(2,'ICML');
INSERT INTO research_fixture.editions VALUES(7,1,2024,'main'),(8,2,2023,'main');
INSERT INTO research_fixture.submissions VALUES(11,1,7),(12,3,8);
-- 决策优先最新 observed_at,再 decision_date 与 id;旧观察即使声称未来决策日也不能压过新观察。
INSERT INTO research_fixture.decisions VALUES
(1,11,'accepted','https://example.test/decision/1','2024-02-01','2024-01-30'),
(2,11,'rejected','https://example.test/decision/2','2024-02-01','2024-01-31'),
(3,11,'withdrawn','https://example.test/decision/3','2024-02-01','2024-01-31'),
(4,11,'accepted','https://example.test/decision/4','2024-01-01','2099-01-01');
-- 研究运行角色只获 schema USAGE 和表 SELECT,集成测试实际 UPDATE 必须被权限拒绝。
CREATE ROLE foundry_research_fixture LOGIN;
REVOKE ALL ON SCHEMA research_fixture FROM PUBLIC;
GRANT USAGE ON SCHEMA research_fixture TO foundry_research_fixture;
GRANT SELECT ON ALL TABLES IN SCHEMA research_fixture TO foundry_research_fixture;
-- Separate encoded schema mirrors the published Paper Atlas nul-soh-v1 format.
-- 复制基础数据并加 codec 标记,用 SOH 转义在 PostgreSQL TEXT 中表达原始 NUL,API 需正确还原。
CREATE SCHEMA research_encoded_fixture;
COMMENT ON SCHEMA research_encoded_fixture IS 'paper-atlas:text-codec=nul-soh-v1';
DO $$
@@ -82,6 +87,7 @@ GRANT USAGE ON SCHEMA research_encoded_fixture TO foundry_research_fixture;
GRANT SELECT ON ALL TABLES IN SCHEMA research_encoded_fixture TO foundry_research_fixture;
-- A large ID gap proves the bounded probe cannot truncate sparse results.
-- 复制语料再加入跨 512/4096 探测窗口的 ID 空档,验证稀疏检索回退不漏匹配及反向分页。
CREATE SCHEMA research_sparse_fixture;
DO $$
DECLARE item text;