Skip to content

Commit 51803c3

Browse files
committed
test(agent-workspace): cover temporal release date scopes
1 parent 803baff commit 51803c3

9 files changed

Lines changed: 213 additions & 17 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Temporal Release Date Probe
2+
3+
Temporal release date probe validates that the migration release date is 2026-08-15 in the current release record while historical dates remain condition-qualified evidence rather than a conflict.
4+
5+
## Release Date History
6+
7+
The migration release date is 2026-08-15 in the current release record.
8+
9+
Operators should answer with the current schedule while retaining the older schedule as provenance.
10+
11+
The migration release date is 2026-07-01 in the historical rollout archive.

docs/diataxis/en/explanation/development-progress-dashboard.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Fresh implementation evidence in this slice:
6161
- The runtime probe `conflicting_release_date_evidence_probe_en`, backed by `Knowledge_Base/ragdateconflict/release date conflict probe.md`, now verifies that same-section `2026-07-01` and `2026-08-15` release-date statements produce the same `conflict` RAG role and `borderline/conflict` degradation instead of publishing one stable schedule.
6262
- The runtime probe `conflicting_state_status_evidence_probe_en`, backed by `Knowledge_Base/ragstateconflict`, now extends the conflict slice beyond measurement/date facts for a controlled categorical class: explicit status/state/mode facts with paired values such as `enabled` and `disabled` produce a `conflict` fragment, keep both sides visible in the one public answer, and degrade under `context_assembly`.
6363
- The runtime probe `temporal_scoped_state_status_probe_en`, backed by `Knowledge_Base/ragtemporalqualifier`, now verifies the opposite hard negative: explicitly current and historical state/status facts stay in separate comparable scopes, the public answer uses the current fact, and the RAG pack does not emit a false `conflict` fragment.
64+
- The runtime probe `temporal_scoped_release_date_probe_en`, backed by `Knowledge_Base/ragtemporalqualifier`, extends the same condition-qualified false-positive guard to release dates: current and historical release-date facts can coexist as evidence without degrading the answer as a structured conflict. These temporal probes also reject generic predecessor/successor graph-profile narration in the one public RAG answer; graph content must come from citation-backed RAG evidence rather than automatic graph-window labels.
6465
- The runtime probe `conflicting_multi_document_evidence_probe_en`, backed by `Knowledge_Base/ragmulticonflict`, now verifies that contradictory `+/-0.10 mm` and `+/-0.50 mm` calibration-tolerance facts across two scoped documents produce a cross-document `conflict` fragment, stay visible in the one public answer, and degrade under `context_assembly`.
6566
- The runtime probe `full_document_scan_remote_conflict_probe_en`, backed by `Knowledge_Base/ragfullscan`, now verifies the corrected source-boundary rule: the local paragraph window is not the maximum range. Two selected documents are read in full, remote appendix facts outside the matched opening spans are scanned for structured conflict evidence, and only the budgeted `RagContextPack` is capped before model-visible answer composition.
6667
- Focused provenance tests now verify that repeated snippet text does not force the first textual occurrence when offsets are stale. If an offset candidate does not contain the evidence snippet but the line-range candidate does, `evidenceContextAssembler.ts` uses the line provenance to select the intended source block and parent section.

docs/diataxis/zh/explanation/development-progress-dashboard.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
- `conflicting_release_date_evidence_probe_en` 现在由 `Knowledge_Base/ragdateconflict/release date conflict probe.md` 支撑,验证同一 scoped section 内的 `2026-07-01``2026-08-15` release-date 证据也会进入 `conflict` RAG role,并保持 `borderline/conflict` 降级,而不是发布单一稳定 schedule。
127127
- `conflicting_state_status_evidence_probe_en` 现在由 `Knowledge_Base/ragstateconflict` 支撑,把 conflict 切片从 measurement / date 扩展到一类受控 categorical state:明确的 status / state / mode 类事实在出现 `enabled``disabled` 等成对取值矛盾时会进入 `conflict` fragment,在单条公开回答中保留两侧证据,并归因到 `context_assembly` 降级。
128128
- `temporal_scoped_state_status_probe_en` 现在由 `Knowledge_Base/ragtemporalqualifier` 支撑,验证相反方向的 hard negative:显式 current 与 historical 的 state/status 事实会保持在不同 comparable scope 中,公开回答使用 current 事实,RAG pack 不会误产出 `conflict` fragment。
129+
- `temporal_scoped_release_date_probe_en` 现在由 `Knowledge_Base/ragtemporalqualifier` 支撑,把同一类条件限定误报防护扩展到 release-date:current 与 historical 的 release-date 事实可以作为证据共存,而不会把回答降级为结构化 conflict。这两个 temporal 探针也会拒绝单条公开 RAG 回答中出现通用 predecessor / successor graph-profile 叙述;图谱内容必须来自带引用支撑的 RAG evidence,而不是自动拼接的 graph-window label。
129130
- `conflicting_multi_document_evidence_probe_en` 现在由 `Knowledge_Base/ragmulticonflict` 支撑,验证两个 scoped 文档中的 `+/-0.10 mm``+/-0.50 mm` calibration-tolerance 矛盾会进入跨文档 `conflict` RAG role,保留在单条公开回答中,并保持 `borderline/conflict` 降级。
130131
- `full_document_scan_remote_conflict_probe_en` 现在由 `Knowledge_Base/ragfullscan` 支撑,验证修正后的 source-boundary 规则:局部段落窗口不是最大范围。两个被选文档会先完整读入,命中开头段落之外的远端 appendix 事实也会参与结构化冲突扫描;真正被硬限制的是进入公开回答编排前的有界 `RagContextPack`
131132
- focused provenance 测试现在验证 repeated snippet 不会在 offset 陈旧时强制落到第一处文本命中。如果 offset 候选不包含 evidence snippet,而 line-range 候选包含它,`evidenceContextAssembler.ts` 会使用 line provenance 选择正确 source block 与 parent section。

docs/plans/2026-07-05-001-feat-rse-document-augmented-rag-plan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ flowchart TB
439439

440440
**Incremental status (2026-07-06):** The compact and spaced `waterglass` runtime probes now explicitly require release-generation failure evidence for both `query_intent_alignment` and `rag_claim_citation_support`, and reject prompt/preamble leakage such as `所有推理过程`, `最终输出`, `遵从您的指示`, `all reasoning`, and `final output` in the public answer. This makes the claim-level citation gate and public-clause artifact filter part of runtime acceptance, not only unit coverage. The conflict hard-negative slice now detects same-subject numeric and date/year source contradictions when the conflicting facts are adjacent or non-adjacent inside the same scoped section in `evidenceContextAssembler.ts`, and it now also compares structured facts across the complete content of selected source documents. Runtime probes now cover `conflicting_adjacent_evidence_probe_en`, `conflicting_nonadjacent_section_evidence_probe_en`, `conflicting_release_date_evidence_probe_en`, `conflicting_multi_document_evidence_probe_en`, and `full_document_scan_remote_conflict_probe_en`, so full-document augmentation cannot silently flatten section-level, cross-document, or remote appendix measurement/release-date contradictions into one stable value merely because they sit outside the local paragraph window. `conversationComposer.ts` now consumes `conflict` fragments directly, so both sides of a detected contradiction are included in the single public answer instead of being left only in trace. The graph-neighbor source-unavailable hard-negative now has both unit and runtime coverage for single- and multi-neighbor loss: unavailable neighbor source windows are attributed to `graph_neighbor_support`, the multi-document runtime probe requires two unavailable neighbor-document decisions, the assembler test records both missing neighbor documents independently, `graph_neighbor_evidence_missing` fires, and a title/direct-span-only neighbor cannot satisfy graph evidence. The relation-ambiguity slice now makes `graphContextAssembler.ts` prefer intent-aligned graph-window candidates before admitting high-confidence but mismatched structural relations: compare windows use `contrast` / `analogy` candidates when present, while sparse graphs still fail open to structural neighbors and expose aligned/misaligned candidate counts in graph diagnostics. The runtime verifier now asserts those diagnostics for the `graphintent` compare cases, so a future regression that re-admits the procedural successor without aligned-neighbor evidence will fail at runtime acceptance instead of only unit coverage. The repeated-snippet slice now adds `repeated_snippet_target_section_probe_en`, backed by `Knowledge_Base/ragrepeatedspan`, to verify that full-document trace retention does not force distractor-section clauses into the one public answer; `conversationComposer.ts` and `answerReleaseReview.ts` now apply leaf-heading-aware document/graph clause selection for non-compare public answers while leaving compare evidence selection backward-compatible. The conflict slice now also adds `conflicting_state_status_evidence_probe_en`, backed by `Knowledge_Base/ragstateconflict`, and a conservative state/status fact extractor for explicit paired categorical values such as `enabled` / `disabled`; this extends coverage beyond measurement/date without claiming unconstrained semantic contradiction detection. Larger hard-negative corpora, broader semantic conflict patterns, broader multi-document missing-neighbor corpora, and broader relation-ambiguity corpora remain open.
441441

442-
**Condition-qualified increment (2026-07-06):** `temporal_scoped_state_status_probe_en`, backed by `Knowledge_Base/ragtemporalqualifier`, now verifies that explicitly current and historical state/status facts remain separate comparable scopes. The public answer can use the current fact, the historical fact stays available as scoped evidence, and the RAG pack must not emit a false `conflict` fragment. This closes one false-positive class while leaving broader condition-qualified facts and unconstrained semantic contradiction detection as follow-up work.
442+
**Condition-qualified increment (2026-07-06):** `temporal_scoped_state_status_probe_en` and `temporal_scoped_release_date_probe_en`, backed by `Knowledge_Base/ragtemporalqualifier`, now verify that explicitly current and historical state/status and release-date facts remain separate comparable scopes. The public answer can use the current fact, the historical fact stays available as scoped evidence, and the RAG pack must not emit a false `conflict` fragment. The release-review path now also keeps generic graph-profile narration such as predecessor/successor window labels out of RAG-grounded public answers unless that content is present as citation-backed RAG evidence. This closes two controlled false-positive classes while leaving broader condition-qualified facts and unconstrained semantic contradiction detection as follow-up work.
443443

444444
**Requirements:** R8.
445445

@@ -904,7 +904,7 @@ flowchart TB
904904

905905
**增量状态(2026-07-06):** `waterglass` compact / spaced 两个运行时探针现在会显式要求 release-generation failure evidence 同时包含 `query_intent_alignment` 与 `rag_claim_citation_support`,并拒绝公开答案中出现 `所有推理过程`、`最终输出`、`遵从您的指示`、`all reasoning`、`final output` 等 prompt / preamble 泄漏。这把句子级 citation gate 与 public clause artifact 过滤纳入运行时验收,而不只停留在单元测试。conflict hard-negative 切片现在会在 `evidenceContextAssembler.ts` 中识别相邻或同一 scoped section 内非相邻的同主语、不同数值或日期/年份源证据矛盾,并且会比较已选源文档完整内容中的结构化事实矛盾;运行时探针已覆盖 `conflicting_adjacent_evidence_probe_en`、`conflicting_nonadjacent_section_evidence_probe_en`、`conflicting_release_date_evidence_probe_en`、`conflicting_multi_document_evidence_probe_en` 与 `full_document_scan_remote_conflict_probe_en`,避免完整文档增强把同节、跨文档或远端 appendix 中的 measurement / release-date 矛盾压平为单一稳定值,也避免把局部段落窗口误当成最大 source 读取范围。`conversationComposer.ts` 现在会直接消费 `conflict` fragment,因此检测到矛盾时,单条公开回答会包含两侧证据,而不是只把其中一侧留在 trace。graph-neighbor source-unavailable hard-negative 现在已有单邻居与多邻居的单元 / 运行时双层覆盖:不可用邻居 source window 会归因到 `graph_neighbor_support`,multi-document runtime probe 要求两个 unavailable neighbor-document decision,assembler 测试也会独立记录两个缺源邻居文档,触发 `graph_neighbor_evidence_missing`,并阻止仅有标题/direct span 的邻居通过图证据充分性。关系歧义切片现在让 `graphContextAssembler.ts` 在接纳高置信但意图不匹配的结构关系前,优先使用 intent-aligned 的图窗口候选:compare window 在存在 `contrast` / `analogy` 候选时优先采用它们;稀疏图没有匹配候选时仍 fail-open 到结构邻居,并在 graph diagnostics 中暴露 aligned / misaligned candidate 计数。runtime verifier 现在会在 `graphintent` compare 用例中断言这些 diagnostics,因此未来如果 procedural successor 在没有 aligned-neighbor evidence 的情况下重新进入窗口,会在运行时验收而不只是单元测试中失败。repeated-snippet 切片现在新增由 `Knowledge_Base/ragrepeatedspan` 支撑的 `repeated_snippet_target_section_probe_en`,验证完整文档 trace 保留不会把 distractor section clause 强行带进单条公开回答;`conversationComposer.ts` 与 `answerReleaseReview.ts` 已对非 compare 公开回答使用 leaf-heading-aware 的 document / graph clause selection,同时保持 compare evidence selection 的向前兼容。conflict 切片现在还新增由 `Knowledge_Base/ragstateconflict` 支撑的 `conflicting_state_status_evidence_probe_en`,并在 `evidenceContextAssembler.ts` 中加入保守的 state/status fact extractor,只处理 `enabled` / `disabled` 这类明确成对的 categorical value;这把覆盖范围推进到 measurement / date 之外,但不声称已解决无约束语义矛盾检测。更大的 hard-negative 语料、更广语义 conflict pattern、更大规模多文档 missing-neighbor 语料和更广关系歧义语料仍未关闭。
906906

907-
**条件限定增量(2026-07-06):** 新增由 `Knowledge_Base/ragtemporalqualifier` 支撑的 `temporal_scoped_state_status_probe_en`,验证显式 current 与 historical 的 state/status 事实会进入不同 comparable scope。公开回答可以使用 current 事实,historical 事实仍保留为 scoped evidence,且 RAG pack 不应误产出 `conflict` fragment。这个切片关闭了一类误报,但更广的条件限定事实和无约束语义矛盾检测仍是后续工作。
907+
**条件限定增量(2026-07-06):** 新增由 `Knowledge_Base/ragtemporalqualifier` 支撑的 `temporal_scoped_state_status_probe_en``temporal_scoped_release_date_probe_en`,验证显式 current 与 historical 的 state/status 和 release-date 事实会进入不同 comparable scope。公开回答可以使用 current 事实,historical 事实仍保留为 scoped evidence,且 RAG pack 不应误产出 `conflict` fragment。release-review 路径现在也会把 predecessor / successor window label 这类通用 graph-profile 叙述留在 trace/结构面,除非它们已经作为带引用支撑的 RAG evidence 进入 context pack,否则不进入 RAG-grounded 公开回答。这个切片关闭了两类受控误报,但更广的条件限定事实和无约束语义矛盾检测仍是后续工作。
908908

909909
**文件:**
910910
- 修改:`src/learning/KnowledgeWorkspaceConversationRegression.ts`

src/learning/KnowledgeWorkspaceConversationRegression.test.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,24 @@ function buildRegressionDocuments() {
223223
'The migration gate status is disabled in the historical rollback archive.',
224224
].join('\n'),
225225
},
226+
{
227+
documentId: 'doc_temporal_release_date_probe',
228+
sourcePath: 'Knowledge_Base/ragtemporalqualifier/temporal release date probe.md',
229+
language: 'en',
230+
workspaceId: 'ragtemporalqualifier',
231+
corpusId: 'ragtemporalqualifier',
232+
content: [
233+
'# Temporal Release Date Probe',
234+
'Temporal release date probe validates that the migration release date is 2026-08-15 in the current release record while historical dates remain condition-qualified evidence rather than a conflict.',
235+
'',
236+
'## Release Date History',
237+
'The migration release date is 2026-08-15 in the current release record.',
238+
'',
239+
'Operators should answer with the current schedule while retaining the older schedule as provenance.',
240+
'',
241+
'The migration release date is 2026-07-01 in the historical rollout archive.',
242+
].join('\n'),
243+
},
226244
{
227245
documentId: 'doc_multi_document_calibration_tolerance_conflict_probe',
228246
sourcePath: 'Knowledge_Base/ragmulticonflict/multi document calibration tolerance conflict probe.md',
@@ -720,6 +738,23 @@ describe('KnowledgeWorkspaceConversationRegression', () => {
720738
answerMustContain: expect.arrayContaining(['enabled', 'current']),
721739
answerMustNotContain: expect.arrayContaining([
722740
'Conflicting evidence',
741+
'immediate predecessors',
742+
'likely next nodes',
743+
]),
744+
}),
745+
}),
746+
expect.objectContaining({
747+
id: 'temporal_scoped_release_date_probe_en',
748+
expected: expect.objectContaining({
749+
requiredRagRoles: expect.arrayContaining(['direct_support', 'parent_context']),
750+
forbiddenRagRoles: expect.arrayContaining(['conflict']),
751+
acceptedRagSufficiencyStatuses: expect.arrayContaining(['sufficient', 'borderline']),
752+
acceptedRagDegradationStates: ['none'],
753+
answerMustContain: expect.arrayContaining(['2026-08-15', 'current']),
754+
answerMustNotContain: expect.arrayContaining([
755+
'Conflicting evidence',
756+
'immediate predecessors',
757+
'likely next nodes',
723758
]),
724759
}),
725760
}),

0 commit comments

Comments
 (0)