Skip to content

[codex] Add Jina Reader AI research source#95

Merged
FrodeHus merged 2 commits into
mainfrom
codex/jina-reader-ai-research-source
May 23, 2026
Merged

[codex] Add Jina Reader AI research source#95
FrodeHus merged 2 commits into
mainfrom
codex/jina-reader-ai-research-source

Conversation

@FrodeHus
Copy link
Copy Markdown
Owner

Summary

Adds Jina Reader as a configurable AI research enrichment source and wires selected AI research tools into tenant AI profiles.

Changes

  • Adds enrichment source process targets so sources can be scoped to scheduled enrichment, AI research, or both.
  • Adds a Jina Reader research provider with optional API key support and configurable reader options.
  • Routes PatchHound-managed external research through the selected AI-targeted enrichment source.
  • Updates AI profile settings to require/select an available research tool, with a configuration link when none are available.
  • Updates global enrichment settings to configure targets and Jina Reader options.
  • Adds the EF migration for enrichment source targets/options and tenant AI profile research source selection.

Validation

  • npm run typecheck
  • npm test -- GlobalEnrichmentSourceManagement
  • dotnet test --filter "FullyQualifiedName~SettingsAuditControllerTests|FullyQualifiedName~TenantAiProfilesControllerTests|FullyQualifiedName~TenantAiResearchServiceTests" -v minimal
  • dotnet test PatchHound.slnx -v minimal

@FrodeHus FrodeHus force-pushed the codex/jina-reader-ai-research-source branch from 75d5056 to 93cabfa Compare May 22, 2026 11:51
@FrodeHus FrodeHus marked this pull request as ready for review May 22, 2026 11:59
@FrodeHus FrodeHus linked an issue May 22, 2026 that may be closed by this pull request
@FrodeHus FrodeHus requested a review from Copilot May 22, 2026 12:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Jina Reader as a selectable, PatchHound-managed external web research source, introduces enrichment “process targets” (Scheduled vs AIResearch), and threads the selected research tool through tenant AI profiles and AI-driven workflows.

Changes:

  • Introduces enrichment source “Targets” + “OptionsJson” (Jina Reader options) and updates system settings APIs/UI to manage them.
  • Adds a pluggable IAiResearchSourceProvider model with a new JinaReaderAiResearchProvider, and updates TenantAiResearchService to select a provider by source key.
  • Extends tenant AI profiles and AI research requests to include a selected ResearchSourceKey, with validation and UI selection.

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/PatchHound.Tests/Worker/IngestionWorkerTests.cs Adds unit test ensuring the “external research unavailable” note is appended only once.
tests/PatchHound.Tests/TestData/TenantAiProfileFactory.cs Extends test profile factory to set researchSourceKey.
tests/PatchHound.Tests/Infrastructure/TenantAiResearchServiceTests.cs Adds coverage for selecting Jina Reader + optional API key + rate limit “unavailable note” behavior; updates DI test wiring.
tests/PatchHound.Tests/Api/TenantAiProfilesControllerTests.cs Adds API tests validating research source requirements and persistence for PatchHound-managed research.
tests/PatchHound.Tests/Api/SettingsAuditControllerTests.cs Verifies Jina Reader appears in enrichment sources and that targets/options round-trip.
src/PatchHound.Worker/VulnerabilityAssessmentWorker.cs Appends “external research unavailable” note to summaries and passes ResearchSourceKey into research requests.
src/PatchHound.Worker/EnrichmentWorker.cs Filters scheduled enrichment runs to only sources targeted for Scheduled.
src/PatchHound.Infrastructure/Tenants/JinaReaderOptions.cs Adds serializable/normalizable options for Jina Reader.
src/PatchHound.Infrastructure/Tenants/EnrichmentSourceCatalog.cs Adds targets parsing/normalization, Jina Reader defaults, and credential behavior updates.
src/PatchHound.Infrastructure/Services/TenantAiResearchService.cs Selects external research provider by configured enrichment source key.
src/PatchHound.Infrastructure/Services/SoftwareDescriptionGenerationService.cs Passes ResearchSourceKey when doing managed research for software descriptions.
src/PatchHound.Infrastructure/Services/JinaReaderAiResearchProvider.cs New research provider implementation using Jina Reader with optional API key.
src/PatchHound.Infrastructure/Services/IAiResearchSourceProvider.cs New provider abstraction for AI research sources.
src/PatchHound.Infrastructure/Services/ExternalWebSearchResearchProvider.cs Implements IAiResearchSourceProvider and exposes internals for reuse.
src/PatchHound.Infrastructure/Migrations/PatchHoundDbContextModelSnapshot.cs Updates EF snapshot for new columns on enrichment sources and AI profiles.
src/PatchHound.Infrastructure/Migrations/20260522105236_AddAiResearchSourceTargets.Designer.cs Adds EF migration designer output for schema changes.
src/PatchHound.Infrastructure/Migrations/20260522105236_AddAiResearchSourceTargets.cs Adds DB columns for Targets, OptionsJson, and ResearchSourceKey.
src/PatchHound.Infrastructure/DependencyInjection.cs Registers both external and Jina research providers under IAiResearchSourceProvider.
src/PatchHound.Infrastructure/Data/Configurations/TenantAiProfileConfiguration.cs Maps ResearchSourceKey as required in EF config.
src/PatchHound.Infrastructure/Data/Configurations/EnrichmentSourceConfiguration.cs Maps Targets and OptionsJson as required in EF config.
src/PatchHound.Core/Services/RiskChangeBriefAiSummaryService.cs Passes ResearchSourceKey into managed research requests.
src/PatchHound.Core/Models/AiWebResearchRequest.cs Adds ResearchSourceKey field to research request model.
src/PatchHound.Core/Entities/TenantAiProfile.cs Adds persisted ResearchSourceKey to tenant AI profiles.
src/PatchHound.Core/Entities/EnrichmentSourceConfiguration.cs Adds persisted Targets and OptionsJson to enrichment sources.
src/PatchHound.Api/Models/System/EnrichmentSourceDtos.cs Extends system enrichment source DTOs with targets and options payloads.
src/PatchHound.Api/Models/Settings/TenantAiProfileDto.cs Extends tenant AI profile DTOs with ResearchSourceKey.
src/PatchHound.Api/Controllers/TenantAiProfilesController.cs Validates and persists selected managed research tool for AI profiles.
src/PatchHound.Api/Controllers/SystemController.cs Supports updating targets/options; maps Jina Reader options in responses.
src/PatchHound.Api/Controllers/SoftwareController.cs Passes ResearchSourceKey into managed research for software risk context.
frontend/src/server/system.functions.ts Extends Zod schemas + update payloads for targets/options and optional-global-secret mode.
frontend/src/components/features/settings/TenantAiSettingsPage.tsx Adds research tool selection and “no tools available” UX, with link to enrichment settings.
frontend/src/components/features/admin/GlobalEnrichmentSourceManagement.tsx Adds process targets UI and Jina Reader options editing + display of targets badges.
frontend/src/components/features/admin/GlobalEnrichmentSourceManagement.test.tsx Updates test fixture to include targets/options.
frontend/src/api/ai-settings.schemas.ts Extends AI profile schemas with researchSourceKey.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/PatchHound.Worker/EnrichmentWorker.cs
Comment thread src/PatchHound.Infrastructure/Tenants/JinaReaderOptions.cs Outdated
Comment thread src/PatchHound.Infrastructure/Services/JinaReaderAiResearchProvider.cs Outdated
Comment thread src/PatchHound.Core/Entities/EnrichmentSourceConfiguration.cs
@FrodeHus FrodeHus merged commit 7bc3dcc into main May 23, 2026
2 checks passed
@FrodeHus FrodeHus deleted the codex/jina-reader-ai-research-source branch May 23, 2026 05:12
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 Jina Reader enrichment source for AI research and assessments

2 participants