Skip to content

Validate stored clique types before normalization - #46

Merged
shuchenliu merged 1 commit into
mainfrom
validate-clique-types
Oct 6, 2026
Merged

shuchenliu merged 1 commit into
mainfrom
validate-clique-types

Conversation

@shuchenliu

Copy link
Copy Markdown
Member

Add safeguard for #41 on the API side

  • Return null for inputs with invalid base or conflation types, preserving other batch results.
  • Log structured diagnostics.
  • Require scalar source types and deduplicate ancestry while removing every biolink:Entity.
  • Preserve valid conflation behavior.

Return null for affected inputs when base or conflation source types are malformed, and emit structured diagnostics. Preserve ancestry order while removing duplicate types and every biolink:Entity.

Add regression coverage for invalid sources, batch isolation, valid conflation, individual types, and GET/POST all-null responses. Validation: 53 focused tests passed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No blocking issues were identified, and focused regression coverage addresses the changed behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Adds API-side safeguards for malformed stored clique types associated with #41 while preserving valid normalization and conflation behavior.

Changes:

  • Returns null for inputs with invalid base or conflation types and logs structured diagnostics.
  • Deduplicates ancestry and removes every biolink:Entity.
  • Adds regression coverage for batch isolation, conflation, fallbacks, and HTTP responses.
File Description
tests/​test_normalized_nodes_lookup.py Tests invalid types, ancestry cleanup, and preserved valid behavior.
src/​nodenorm/​handlers/​normalized_nodes.py Validates stored types and filters ancestry output.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@shuchenliu
shuchenliu merged commit 7e680ab into main Oct 6, 2026
1 check passed
@shuchenliu
shuchenliu deleted the validate-clique-types branch October 6, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants