혼합 출처 KB(위키+jira 등)에서 색인은 전부 하되 질의 시 출처로 좁히는 provenance 레버. 전역 trust 곱셈가중(weighted-RRF)은 A/B 에서 반증(θ=0.85 만으로 incident MRR 0.918→0.340 절벽, 점수 압축) — 필터가 see-saw 없는 올바른 레버. - config [[workspace.sources]] (각 id/root/exclude/trust_level/source_type); 단일 root 는 implicit `default` source 로 정규화. validate: id 유일·비어있지 않음. - config schema v3→v4 (step_3_to_4, root→[[workspace.sources]] id=default 미러, 멱등) - V014 documents.source_id 컬럼+인덱스 (additive, DEFAULT 'default', 재색인 0) - Metadata.source_id + BodyHints trust precedence(frontmatter > source 기본값 > Primary) - ingest: --root 미지정 시 resolved_sources() 순회 + doc 마다 source_id/trust stamp - 검색 SearchFilters.source_type/source_id → lexical + vector 두 site (IN, OR) - CLI kebab search --source <id> / --source-type <type> (repeatable/comma-sep) 도그푸딩(620 doc, jira400+wiki220): --source wiki 로 개념 질의 MRR 0.780→0.810, --source jira 로 incident 0.918→0.975. trust precedence 실측(jira=secondary 기본값). version bump 0.28.0 → 0.29.0 (신규 CLI flag + config 키 + V014 migration → minor). follow-up: MCP search 필터 미노출 · kebab list source_id 미표시 · RAG provenance 라벨. 자세한 내용: tasks/HOTFIXES.md (2026-06-21), docs/release-notes/v0.29.0-draft.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Mc6W1fgsrbFKTsqA6P8La
43 lines
1.5 KiB
Rust
43 lines
1.5 KiB
Rust
//! p9-fb-25 task 5: skipped per-asset items must carry a human-readable
|
|
//! reason in `warnings`, and the report's `skipped_by_extension` must
|
|
//! aggregate by lowercase extension.
|
|
|
|
mod common;
|
|
|
|
use common::TestEnv;
|
|
|
|
#[test]
|
|
fn unsupported_extension_skip_carries_warning_and_is_aggregated() {
|
|
let env = TestEnv::lexical_only();
|
|
let workspace_root = env.config.resolve_workspace_root();
|
|
std::fs::write(workspace_root.join("legacy.docx"), b"unsupported").unwrap();
|
|
std::fs::write(workspace_root.join("Makefile"), b"unsupported").unwrap();
|
|
|
|
let report = kebab_app::ingest_with_config(env.config.clone(), env.scope(), false).unwrap();
|
|
|
|
let items = report.items.as_ref().expect("items array populated");
|
|
let docx_item = items
|
|
.iter()
|
|
.find(|i| i.doc_path.0.ends_with("legacy.docx"))
|
|
.expect("docx in items");
|
|
assert_eq!(docx_item.kind, kebab_core::IngestItemKind::Skipped);
|
|
assert_eq!(
|
|
docx_item.warnings,
|
|
vec!["unsupported media type: .docx".to_string()],
|
|
);
|
|
let makefile_item = items
|
|
.iter()
|
|
.find(|i| i.doc_path.0.ends_with("Makefile"))
|
|
.expect("Makefile in items");
|
|
assert_eq!(makefile_item.kind, kebab_core::IngestItemKind::Skipped);
|
|
assert_eq!(
|
|
makefile_item.warnings,
|
|
vec!["unsupported media type: <no-ext>".to_string()],
|
|
);
|
|
assert_eq!(report.skipped_by_extension.get("docx").copied(), Some(1));
|
|
assert_eq!(
|
|
report.skipped_by_extension.get("<no-ext>").copied(),
|
|
Some(1)
|
|
);
|
|
}
|