mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 17:36:53 +01:00
R6 suppressor signals: effect raise|suppress in routing schema
Adds an optional 'effect' to routing signals. effect: suppress encodes 'this construct is NOT a violation of the domain' (the not-a-violation articles); the orchestrator subtracts a suppressor's weighted hits from the domain score (floored at 0) and does not route to it. Threaded through Build-RoutingIndex (registry now keyed by token+domain+effect so raise/suppress on the same token don't collide), routing-index.schema.json, and R24 (effect must be raise|suppress). Back-compatible: absent effect => raise. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
c442097d94
commit
498055577e
3 changed files with 34 additions and 15 deletions
4
.github/scripts/validate_frontmatter.py
vendored
4
.github/scripts/validate_frontmatter.py
vendored
|
|
@ -236,7 +236,9 @@ def validate_knowledge(path: Path, parsed: Parsed, report: Report) -> None:
|
|||
for opt in ("pattern", "domain"):
|
||||
if opt in entry and (not isinstance(entry[opt], str) or not entry[opt].strip()):
|
||||
report.error(path, "R24", f"signals '{opt}' must be a non-empty string", 1)
|
||||
unknown = set(entry.keys()) - {"token", "pattern", "domain"}
|
||||
if "effect" in entry and entry["effect"] not in ("raise", "suppress"):
|
||||
report.error(path, "R24", "signals 'effect' must be 'raise' or 'suppress'", 1)
|
||||
unknown = set(entry.keys()) - {"token", "pattern", "domain", "effect"}
|
||||
if unknown:
|
||||
report.error(path, "R24", f"signals entry has unknown keys: {sorted(unknown)}", 1)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue