feat: enforce source semantic coverage evidence - #702
Conversation
|
Warning Review limit reachedNext included review available in 48 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthrough본문 부재 가져오기 경계와 RDF 검증 규칙을 확장했습니다. VOC 분류 코드를 의미 힌트와 RDF에 전달합니다. 소스 의미 커버리지와 비공개 콘텐츠 감사 CLI를 확장했습니다. 관련 ADR, 기준 문서와 테스트를 갱신했습니다. Changes의미 콘텐츠 처리 및 감사
Estimated code review effort: 5 (Critical) | ~90+ minutes Merge Risk: 🔵 Low · up to The change is mergeable with owner awareness: two spawned-process tests may intermittently time out on slower CI runners because their 5-second deadline includes child-process startup and imports. Sequence Diagram(s)sequenceDiagram
participant Operator
participant audit_source_content_semantics
participant PostgreSQL
participant contextual_orchestrator
Operator->>audit_source_content_semantics: 감사 CLI 실행
audit_source_content_semantics->>audit_source_content_semantics: 매니페스트와 Rust 설계 산출물 검증
audit_source_content_semantics->>PostgreSQL: 선택 토큰과 콘텐츠 조회
audit_source_content_semantics->>contextual_orchestrator: conduct 모드 의미 차원 배치 전송
contextual_orchestrator-->>audit_source_content_semantics: 구조화된 JSON 결과 반환
audit_source_content_semantics-->>Operator: 비식별 집계 JSON 출력
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 63.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 138 functions across 16 files. (3 skipped: 3 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…com/ContextualWisdomLab/LineageWeave into codex/pr702-review # Conflicts: # backend/tests/test_api.py # docs/ontology/lineageweave-kg-shapes.ttl
…com/ContextualWisdomLab/LineageWeave into fix/pr702-review-round
|
Cycle probe 2026-08-26T10:10Z: write retry from seonghobae (MCP). Confirming comment scope before close/merge/push. Independent APPROVE still required on exact heads. Do not self-approve. |
|
Cross-repository sampling-contract audit at exact predecessor head 896430e and repair head 2161343:
No approval or merge action was taken. |
Declare the RDF prefix used by the portable SHACL constraint and retain the existing semantic artifacts when a source export explicitly has no body dimension. Signed-off-by: Seongho Bae <me@seonghobae.me>
ADR 0246: the export source audit (aggregate-only, ADR 0001/0242) shows full expressibility except one derived-semantic gap. Close it: :Location gains :locationName and ISO 3166-1 :countryCode instance-data datatype properties with a closed-world SHACL :LocationShape (fails closed on non-code country values). Raw ERP codes stay ungoverned instance literals per ADR 0145/0241; no new lookup category seeded, so the code round-trip and column-only discipline tests are untouched.
…dit' into feat/source-semantic-coverage-audit
| def _post_json_with_deadline( | ||
| endpoint: str, | ||
| payload: dict[str, object], | ||
| *, | ||
| headers: dict[str, str], | ||
| timeout: float, | ||
| ) -> dict[str, Any]: | ||
| """Enforce a wall-clock deadline even when a peer keeps a socket active.""" | ||
| if timeout <= 0: | ||
| raise ValueError("timeout must be positive") | ||
| context = multiprocessing.get_context("spawn") | ||
| result_queue = context.Queue(maxsize=1) | ||
| process = context.Process( | ||
| target=_post_json_worker, | ||
| args=(result_queue, endpoint, payload, headers, timeout), | ||
| ) | ||
| process.start() | ||
| try: | ||
| try: | ||
| succeeded, value = result_queue.get(timeout=timeout) | ||
| except queue.Empty as exc: | ||
| timed_out = process.is_alive() | ||
| if timed_out: | ||
| process.terminate() | ||
| process.join() | ||
| if timed_out: | ||
| raise TimeoutError( | ||
| "semantic audit provider request exceeded its deadline" | ||
| ) from exc | ||
| raise RuntimeError( | ||
| "semantic audit provider process returned no result" | ||
| ) from exc | ||
| if process.is_alive(): | ||
| process.terminate() | ||
| process.join() | ||
| if not succeeded: | ||
| raise RuntimeError(f"semantic audit provider request failed: {value}") | ||
| if not isinstance(value, dict): | ||
| raise RuntimeError("semantic audit provider response must be an object") | ||
| return value | ||
| finally: | ||
| result_queue.close() | ||
| result_queue.join_thread() | ||
|
|
There was a problem hiding this comment.
📝 Info: Per-request spawned process for each provider call
_post_json_with_deadline spawns a fresh spawn-context process per provider batch to enforce a wall-clock deadline. Each spawn re-imports the module, so a full audit incurs one process launch per batch. Acceptable for an operator script, but heavy.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Runtime evidence
Persistence boundary
source_post(post_id)and persists revisions/content per recordVerification
uv run --extra dev --extra backend pytest -q(1496 passed, 17 skipped before the probability-sampling review repair)uv run --extra dev --extra backend pytest -q tests/test_audit_source_content_semantics.py tests/test_import_postgresql_posts.py(36 passed ate8fd06cc)Dependency
Summary by CodeRabbit
새로운 기능
문서
테스트