Skip to content

test(biome): add curated backend workflow coverage - #44

Merged
iihimanshuu merged 1 commit into
hiperhealth:mainfrom
iihimanshuu:test/curated-backend-workflow
Aug 23, 2026
Merged

iihimanshuu merged 1 commit into
hiperhealth:mainfrom
iihimanshuu:test/curated-backend-workflow

Conversation

@iihimanshuu

Copy link
Copy Markdown
Collaborator

Pull Request description

Add one end-to-end integration test covering the complete curated-knowledge
backend workflow through the fake HiperHealth boundary.

The test:

  • constructs fictional ScientificReference objects;
  • constructs fictional CuratedKnowledgeRecord objects;
  • validates an ordered KnowledgeCollection;
  • saves the collection to a temporary JSON file;
  • verifies deterministic file content;
  • loads and reconstructs the collection;
  • confirms the loaded models remain equivalent;
  • executes the same deterministic lexical query repeatedly;
  • verifies relevance-based result ordering;
  • applies an explicit fictional review-status allowlist;
  • confirms records with excluded statuses remain hidden;
  • verifies resolved scientific-reference ordering;
  • generates structured and human-readable context;
  • verifies identifiers and canonical URLs remain attributable to their records;
  • passes the explicit query, status allowlist, and result limit through the
    existing fake HiperHealth adapter;
  • verifies existing patient-context output remains available;
  • confirms standalone and final adapter context are equivalent;
  • confirms provenance reaches the final HiperHealth stage result.

This is a test-only change. No production code, dependencies, manifests,
documentation, or existing unit tests are modified.

Closes #24

How to test these changes

Run the focused integration test:

py -3.13 -m pytest tests/test_backend_workflow.py -q -p no:xonsh

Run the complete test suite:

py -3.13 -m pytest --cov=hphbiome --cov=hphbiome_hiperhealth --cov-fail-under=92 --cov-report term-missing --no-cov-on-fail -p no:xonsh -q

Run Ruff:

py -3.13 -m ruff check packages tests

Verify formatting:

py -3.13 -m ruff format --check packages tests

Run mypy:

py -3.13 -m mypy packages/hphbiome/src packages/hphbiome-hiperhealth/src

Run pre-commit:

py -3.13 -m pre_commit run --files tests/test_backend_workflow.py --verbose

Pull Request checklists

This PR is a:

  • bug-fix
  • new feature
  • maintenance

About this PR:

  • it includes tests.
  • the tests are executed on CI.
  • the tests generate log file(s) (path).
  • pre-commit hooks were executed locally.
  • this PR requires a project documentation update.

Author's checklist:

Additional information

The complete suite passes with 279 tests and 99.85% coverage.

All records, statuses, bibliographic metadata, queries, references, and patient
context used by the integration test are obviously fictional.

The test uses a pytest temporary directory and requires no network access,
external service, credential, paid API, PHI, real patient data, medical dataset,
or real scientific reference.

## Reviewer's Checklist

- [ ] I managed to reproduce the problem locally from the `main` branch
- [ ] I managed to test the new changes locally
- [ ] I confirm that the issues mentioned were fixed/resolved

@iihimanshuu iihimanshuu self-assigned this Aug 23, 2026
@iihimanshuu
iihimanshuu merged commit ee6c16a into hiperhealth:main Aug 23, 2026
16 checks passed
@iihimanshuu
iihimanshuu deleted the test/curated-backend-workflow branch August 23, 2026 19:49
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.

Add an end-to-end curated-knowledge backend integration test

1 participant