ReMe/tests/integration
Ziyang Guo 5d957113ce
test(dream): accept contextual provenance links in auto_dream assertion (#752)
* test(dream): accept contextual provenance links in auto_dream assertion

integrate.yaml (since #428) requires every `## Sources` entry to be a
complete sentence containing the wikilink and explicitly forbids bare
`- [[...]]` lines, but the integration assertion only matched the bare
line form, so prompt-conformant digests fail the provenance check
(reported in #739). Match the provenance link target with or without an
alias instead of a specific line form.

* test(dream): check provenance with the shared wikilink parser

The prefix-based check ("\[[[P]]\]" or "\[[[P|") kept a partial grammar
in the assertion and still mismatched the repository's wikilink syntax
in both directions: an unterminated aliased span like "[[P|the session
record" (no closing brackets) was accepted even though it produces no
source link, while valid anchored links such as "[[P#Decision]]" and
"[[P#Decision|the decision]]" were rejected even though the shared
parser resolves them to the expected target.

The assertion now delegates to a small dependency-light helper
(tests/integration/_provenance.py) that asks
WikilinkHandler.iter_matches whether any parsed link's target equals the
changed daily note. Bare links, contextual sentences, aliases, embeds,
and anchors all count; unterminated spans and links to other targets do
not.

Because tests/integration never runs in CI, the helper is also exercised
by tests/unit/test_auto_dream_provenance.py with uncredentialed,
parameterized cases for each accepted and rejected form, plus a
multi-target selection case.

---------

Co-authored-by: RerankerGuo <RerankerGuo@users.noreply.github.com>
2026-11-17 11:14:29 +08:00
..
__init__.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
_provenance.py test(dream): accept contextual provenance links in auto_dream assertion (#752) 2026-11-17 11:14:29 +08:00
_workspace_fixture.py feat: simplify wikilink semantics and support line anchors (#412) 2026-08-05 11:47:50 +08:00
run_reme_e2e_local.py feat: add Claude Code plugin with auto-memory functionality (#297) 2026-06-26 14:46:42 +08:00
test_agent_session.py refactor(agent)!: unify lossless streaming and collected replies (#713) 2026-11-05 16:04:27 +08:00
test_auto_dream.py test(dream): accept contextual provenance links in auto_dream assertion (#752) 2026-11-17 11:14:29 +08:00
test_auto_memory.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_auto_resource.py feat(auto-resource): unify text and image auto-resource using agentwrapper (#555) 2026-09-23 10:20:35 +08:00
test_auto_tag.py feat: auto-tag plugin-generated reports (#534) 2026-09-11 11:52:52 +08:00
test_benchmark_docker.py feat(home): add reproducible benchmark preparation and candidate evaluation (#693) 2026-11-05 14:54:31 +08:00
test_codex_agent_wrapper.py refactor(agent)!: unify lossless streaming and collected replies (#713) 2026-11-05 16:04:27 +08:00
test_codex_demo.py refactor(codex)!: share app-server processes across agent wrappers (#709) 2026-11-04 23:23:13 +08:00
test_codex_plugin_install.py feat(integrations): add automatic memory plugins for Claude Code and Codex (#575) 2026-10-12 20:12:47 +08:00
test_codex_plugin_status_ui.py feat(integrations): add automatic memory plugins for Claude Code and Codex (#575) 2026-10-12 20:12:47 +08:00
test_codex_token_usage.py feat(studio): add Codex session history and proactive messages (#711) 2026-11-05 11:51:30 +08:00
test_codex_wrapper_capabilities.py refactor(codex)!: share app-server processes across agent wrappers (#709) 2026-11-04 23:23:13 +08:00
test_decision_compaction.py refactor: generalize decision models and add recoverable context compaction (#626) 2026-10-19 17:56:30 +08:00
test_embedding.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_home_wheel.py fix(python): sandbox Python execution and disable benchmark service exposure (#708) 2026-11-04 14:31:59 +08:00
test_llm.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_reme_e2e.py feat(proactive): separate proactive refresh from auto dream (#488) 2026-09-07 17:23:37 +08:00
test_seatbelt_backend.py fix(python): sandbox Python execution and disable benchmark service exposure (#708) 2026-11-04 14:31:59 +08:00
test_stream_llm.py feat(tests): support .jsonl.zst files in integration tests (#288) 2026-06-22 17:32:37 +08:00