mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-11-30 00:47:36 +00:00
* 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> |
||
|---|---|---|
| .. | ||
| constraints | ||
| fixtures/config | ||
| integration | ||
| unit | ||