v0.1.0-pre.011

This commit is contained in:
2026-07-24 14:23:58 +02:00
parent 62bc0ffb44
commit 42e8a203ec
460 changed files with 12005 additions and 7020 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# file: scripts/audit_khadhroony_workspace_rules.py
# version: 3
# version: 4
"""Audit mechanically verifiable rules specific to khadhroony-bot3."""
@@ -90,13 +90,16 @@ def audit_kb_lib_tracing(root: pathlib.Path) -> list[Violation]:
if not crate_root.exists():
return violations
root_text = crate_root.read_text(encoding="utf-8")
aliases = set(
re.findall(
r"^pub\(crate\) use crate::[A-Za-z0-9_:]+::([A-Z][A-Z0-9_]+_TRACING_TARGET);$",
root_text,
re.MULTILINE,
)
aliases = set()
alias_pattern = re.compile(
r"^pub\(crate\) use crate::[A-Za-z0-9_:]+::"
r"([A-Z][A-Z0-9_]+)(?: as ([A-Z][A-Z0-9_]+))?;$",
re.MULTILINE,
)
for match in alias_pattern.finditer(root_text):
exported_name = match.group(2) if match.group(2) is not None else match.group(1)
if exported_name.endswith("_TRACING_TARGET"):
aliases.add(exported_name)
target_pattern = re.compile(
r'^pub\(crate\) const TRACING_TARGET: &str = "([^"]+)";$',
re.MULTILINE,