ReMe/tests
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
..
constraints fix(hermes): preserve host dependencies in embedded installs (#742) 2026-11-13 11:18:48 +08:00
fixtures/config fix(ci): support AgentScope 2.0.6 initialization (#457) 2026-08-19 11:33:52 +08:00
integration test(dream): accept contextual provenance links in auto_dream assertion (#752) 2026-11-17 11:14:29 +08:00
unit test(dream): accept contextual provenance links in auto_dream assertion (#752) 2026-11-17 11:14:29 +08:00