Fix stale terminology-allowlist test, not the config (CUST-WP-0060 follow-up)
Root-caused the xfail left in place at end of the test-coverage review:
git history (commit e0f9330, CUST-WP-0055 T02/T06/T07, 2026-07-08) shows
the agentic-resources exclude_repo: true -> path_prefixes narrowing was
deliberate, done to bring the repo's real source under the terminology
scan while still excluding the generated session_memory/.store/ tree.
The test was never updated to match and had been silently failing since.
Replaced the stale whole-repo-exclusion assertion with one that checks
the actual current contract: session_memory/.store/ stays excluded,
README.md (and everything else) is now in scope. No xfail marker needed
-- config was correct, only the test was wrong.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
70f051fa96
commit
36f0336ca6
1 changed files with 11 additions and 12 deletions
|
|
@ -2,8 +2,6 @@ from __future__ import annotations
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from tools.scan_workstream_terminology import (
|
from tools.scan_workstream_terminology import (
|
||||||
DEFAULT_ALLOWLIST_PATH,
|
DEFAULT_ALLOWLIST_PATH,
|
||||||
load_allowlist,
|
load_allowlist,
|
||||||
|
|
@ -38,17 +36,18 @@ def test_path_is_excluded_for_state_hub_compat_router() -> None:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(
|
def test_path_is_excluded_for_generated_tree_not_whole_repo() -> None:
|
||||||
reason="pre-existing, unrelated to CUST-WP-0060: scan_workstream_allowlist.yaml's "
|
"""agentic-resources' exclusion was deliberately narrowed from
|
||||||
"agentic-resources entry no longer sets exclude_repo: true, so the whole-repo "
|
exclude_repo: true to just the generated session_memory/.store/ tree
|
||||||
"exclusion this test asserts doesn't currently hold. Found while wiring CI for "
|
(commit e0f9330, CUST-WP-0055 T02/T06/T07, 2026-07-08) so the
|
||||||
"tests/ (previously unrun); needs an allowlist-owner decision (README.md is "
|
terminology scan would cover the repo's real source. This replaces a
|
||||||
"user-facing prose that could legitimately want the scan), not a silent fix.",
|
stale test that still asserted the old whole-repo exclusion (found
|
||||||
strict=True,
|
while wiring CI for tests/, CUST-WP-0060 test-coverage review)."""
|
||||||
)
|
|
||||||
def test_path_is_excluded_for_whole_repo() -> None:
|
|
||||||
config = load_allowlist(DEFAULT_ALLOWLIST_PATH)
|
config = load_allowlist(DEFAULT_ALLOWLIST_PATH)
|
||||||
assert path_is_excluded("agentic-resources", "README.md", config)
|
assert path_is_excluded(
|
||||||
|
"agentic-resources", "session_memory/.store/foo.json", config
|
||||||
|
)
|
||||||
|
assert not path_is_excluded("agentic-resources", "README.md", config)
|
||||||
|
|
||||||
|
|
||||||
def test_prose_gate_violations_detect_user_facing_workstream() -> None:
|
def test_prose_gate_violations_detect_user_facing_workstream() -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue