Skip to content

Commit c7a99da

Browse files
committed
补充当前版本全量 WASM 回放与精度缺陷清单
1 parent 9208b43 commit c7a99da

5 files changed

Lines changed: 7379 additions & 0 deletions

File tree

‎crates/codeguard-cli/tests/grammar_evaluation.rs‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,39 @@ fn replay_every_bundled_language_and_archive_current_evidence() {
536536
const ARCHIVED_MANIFEST: &[u8] =
537537
include_bytes!("../../../tests/fixtures/grammar_manifests/manifest_2026_10_04.json");
538538

539+
#[test]
540+
fn current_full_replay_evidence_binds_each_source_and_preserves_uncertainty() {
541+
let input =
542+
include_bytes!("../../../tests/acceptance/evidence/grammar-current-corpus-2026-10-06.json");
543+
let corpus = validate_corpus(input).unwrap();
544+
let report: Value = serde_json::from_slice(include_bytes!(
545+
"../../../tests/acceptance/evidence/grammar-current-manifest-2026-10-06.json"
546+
))
547+
.unwrap();
548+
assert_separate_cohort_counts(&report);
549+
assert_eq!(
550+
report["corpus_sha256"],
551+
format!("{:x}", Sha256::digest(input))
552+
);
553+
assert_eq!(report["manifest_sha256"], corpus.manifest_sha256);
554+
assert_eq!(report["program_stable"], true);
555+
assert_eq!(report["grammar_qualified_count"], 0);
556+
assert_eq!(report["independent_holdout"], false);
557+
assert_eq!(report["native_oracle_executed"], false);
558+
assert_eq!(report["delivery_decision"], "not_evaluated");
559+
let cases = report["cases"].as_array().unwrap();
560+
for source in &corpus.cases {
561+
let row = cases.iter().find(|row| row["id"] == source.id).unwrap();
562+
assert_eq!(row["attempted"], true);
563+
assert_eq!(row["source_sha256"], source.source_sha256);
564+
assert_eq!(row["language"], source.language);
565+
assert_eq!(row["cohort"], source.cohort);
566+
assert_eq!(row["label"], source.label);
567+
assert_eq!(row["origin"], source.origin);
568+
assert_eq!(row["expected_valid"], source.expected_valid);
569+
}
570+
}
571+
539572
fn current_corpus_bytes(archived: &[u8]) -> Vec<u8> {
540573
validate_corpus_against_manifest(archived, ARCHIVED_MANIFEST).unwrap();
541574
let mut value: Value = serde_json::from_slice(archived).unwrap();

‎openspec/changes/introduce-rust-codeguard-cli/tasks.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,3 +1718,7 @@ Rust输入补录终态:实际原生lint修复及原工具任务复检1通过
17181718
## 2026-10-06 SP18 Rust WASM 首次任务原生闭环(已验证切片)
17191719

17201720
对应9.10 / S14,在现有批准契约下接入policy1.8/evidence0.9并保留首次真实grammar身份;原生首次1.7/0.8保持null。缺工具时WASM任务、同工具原反例确认、修复/幂等关闭及公开复检复发重开通过;原生反证后next和精确任务简报要求调查首次WASM/grammar而不修改合法源码。缺/错grammar、交换来源、工具与edition变化均拒绝关闭。新增受控3项、两种来源当前构建真实Rustfmt完整链2项、共享WASM八目标55项及协议6项通过。见tests/acceptance/rust-wasm-task-resolution.md。宿主信任根/时钟是测试夹具,生产自动接线、普通任务自动关闭的核心契约调整、其它检查族/平台、独立精度和发行仍未完成,父任务不勾选。
1721+
1722+
## 2026-10-06 SP19 当前版本 32 grammar 全量回放与缺陷定位
1723+
1724+
对应 S12.11 / 14.17 / 14.19。当前源码 9208b43 实际重跑 358 例、32 语言、35 来源组,1 passed / 0 failed / 0 ignored,317.87 秒。新增字节绑定语料和逐例报告,归档测试核对源身份及不确定性,保留旧记录。明确保留 Erlang 十例漏检、VB.NET 一例误报、Kotlin/Swift 三例未知和 CFQuery 一例待裁定,不冒充当前原生对照或独立 holdout。详见[当前回放缺陷清单](../../../tests/acceptance/grammar-current-full-replay-2026-10-06.md)。全部 grammar 仍未正式验收,父任务不勾选。

‎tests/acceptance/evidence/grammar-current-corpus-2026-10-06.json‎

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)