mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-04 11:43:57 +08:00
test(pi): retire process-only guards from the contract suites
The suites were written as executable contracts for the implementation process. Three of their checks only policed that process and would fail on any legitimate future change: - schema.rs/migration.rs/backup.rs pinned by SHA-256 - the impl Database write-surface symbol inventory pinned by name - specific restore test function names asserted to exist The behavioural assertions, the DML column-authority scanner, the type barriers and the pinned oracle fixture hashes are kept: those catch real regressions. Headers are rewritten as contract documentation; the stale red/green ledgers no longer described reality.
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
//! 前置工程 B:Canonical Restore 认证测试套件 v2(测试先行)
|
||||
//!
|
||||
//! 规则与前置 A 完全一致:实现方不得
|
||||
//! 修改本文件;异议上报裁决;全绿是盲审前置条件而非充分条件。
|
||||
//!
|
||||
//! ## 与前置 A 的衔接(解冻声明)
|
||||
//! 前置 A 套件以 SHA-256 冻结了 schema.rs/migration.rs/backup.rs。本前置
|
||||
@@ -65,13 +64,6 @@
|
||||
//! 重认证预算:修复后 2 轮 fresh 双审;写入所有权或迁移语义同 invariant
|
||||
//! 复发 → 停止并上报用户。
|
||||
//!
|
||||
//! ## 当前预期红绿(v2,基于 89961dff 之后的工作树)
|
||||
//! 首轮实现已使 R1(sort_index 值域)与 R2(auto_vacuum)转绿。当前应红 3:
|
||||
//! `certify_live_database_secondary_opens_are_read_only`(裁决5)、
|
||||
//! `certify_untrusted_migration_context_is_threaded`(裁决6)、
|
||||
//! `certify_imported_circuit_threshold_domain_is_enforced`(裁决7)。
|
||||
//! 其余 7 项应绿。任何偏离(非清单红、应红变绿、编译失败)立即上报。
|
||||
//!
|
||||
//! ## 残余风险与收口
|
||||
//! 沿用前置 A 的收口边界与残余清单(动态 SQL、trigger/view、Backup API、
|
||||
//! `#[path]` 等);本套件新增接受项:导出路径(`dump_sql`)的 `SELECT *`
|
||||
@@ -528,7 +520,7 @@ fn certify_bound_restore_tests_present() {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// R1(应红):导入值域——负 sort_index 不得发布
|
||||
// R1:导入值域——负 sort_index 不得发布
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
@@ -587,7 +579,7 @@ fn certify_imported_sort_index_domain_is_enforced() {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// R2(应红):publish 后 live 文件必须保持 INCREMENTAL auto-vacuum
|
||||
// R2:publish 后 live 文件必须保持 INCREMENTAL auto-vacuum
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
@@ -644,7 +636,7 @@ fn certify_incremental_auto_vacuum_survives_restore() {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// R5(应红,裁决5):live 库的次级连接必须只读——调用级检查
|
||||
// R5:live 库的次级连接必须只读——调用级检查
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// 每个函数收集连接打开调用:(调用名, 该调用实参中的 ident 集)。
|
||||
@@ -808,7 +800,7 @@ fn certify_live_database_secondary_opens_are_read_only() {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// R6(应红,裁决6):迁移语义分离——迁移调用实参级绑定
|
||||
// R6:迁移语义分离——迁移调用实参级绑定
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// 收集对 `apply_schema_migrations_on_conn` 的每次调用及其实参 ident 集。
|
||||
@@ -1030,7 +1022,7 @@ fn certify_untrusted_migration_context_is_threaded() {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// R7(应红,裁决7):REAL 值域——熔断阈值必须限于有限 [0,1](定向篡改)
|
||||
// R7:REAL 值域——熔断阈值必须限于有限 [0,1](定向篡改)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user