Skip to content

feat(domains): add on-demand checks and snapshot history - #26

Merged
zhravan merged 24 commits into
mainfrom
feat/domain-check-snapshots
Nov 1, 2026
Merged

zhravan merged 24 commits into
mainfrom
feat/domain-check-snapshots

Conversation

@zhravan

@zhravan zhravan commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

Implements #8: domain checks, snapshots, and on-demand refresh.

What changed

  • Adds an append-only domain_check_runs table with a foreign key cascade and lookup index.
  • Adds POST /api/domains/:id/checks to refresh the existing DNS/TLS/registration enrichment pipeline and persist a snapshot.
  • Adds GET /api/domains/:id/checks?limit=N with bounded history retrieval (default 20, max 100).
  • Scopes both endpoints to the authenticated user's domain; unknown and cross-user IDs return 404.
  • Limits explicit refresh to one per domain per minute and 24 per user per minute, and guards against concurrent duplicate refreshes in a process.
  • Updates the domain detail page's existing Refresh data action and shows recent runs with expandable raw snapshot data.
  • Documents migration and API usage in README.

Design choice

Used dedicated append-only rows rather than overwriting only domains.enrichment (which loses history), and avoided a separate queue/worker service because the story is on-demand and the application already has an enrichment pipeline.

Scope note

The current enrichment pipeline provides DNS, TLS, registration and host enrichment. A separate HTTP reachability/status probe is not part of this PR and is called out in the documentation.

Validation

Added focused rate-limit and in-flight guard tests. I could not execute Bun/TypeScript builds in this connector session; CI should run the repository's bun run build and bun test workflows.

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b545bcf0-d696-4bf5-a339-8912e96bfd0f
Commits

Reviewing files that changed from the base of the PR and between d9240f5 and 4960e3c.

Files selected for processing: 11
  • README.md
  • drizzle/0003_domain_check_runs.sql
  • drizzle/meta/_journal.json
  • frontend/src/pages/domains/DomainDetail.tsx
  • frontend/src/pages/hooks/useDomains.ts
  • src/controllers/domain.controller.ts
  • src/db/schema.ts
  • src/domains/enrichment/ratelimit.test.ts
  • src/domains/enrichment/ratelimit.ts
  • src/repositories/domainCheckRun.repository.ts
  • src/services/domainCheck.service.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@zhravan
zhravan merged commit c73a72a into main Nov 1, 2026
2 checks passed
@zhravan
zhravan deleted the feat/domain-check-snapshots branch November 1, 2026 11:25
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.

1 participant