Skip to content

feat: safely deduplicate and collapse network lists - #4

Merged
mstrhakr merged 3 commits into
mainfrom
mstrhakr/issue2
Oct 2, 2026
Merged

mstrhakr merged 3 commits into
mainfrom
mstrhakr/issue2

Conversation

@mstrhakr

@mstrhakr mstrhakr commented Oct 2, 2026

Copy link
Copy Markdown
Owner

This pull request adds support for storing detailed run history and exact target list snapshots for sync jobs, along with optional CIDR collapsing and related API and schema changes. The main improvements are the ability to track and retrieve the precise list of items sent to each target during a run, store per-run statistics, and enable or disable CIDR collapsing for jobs. It also updates tests to cover these new features.

Run History and Target Snapshot Enhancements:

  • Added a RunTargetSnapshot struct and new database table (run_log_targets) to store the exact list of items sent to each target during a job run, including label, name, type, entry count, and the payload (items_json). New methods allow listing and retrieving these snapshots for a given run. [1] [2] [3]
  • The RunLog struct and database schema now include a Stats field for per-run statistics, stored as JSON, and methods to save and retrieve this data. [1] [2] [3]

Job Configuration and List Optimization:

  • Added a CollapseCIDRs boolean field to SyncJob and the database, allowing jobs to optionally collapse fully covered IPv4 ranges into /24 or larger CIDRs. All CRUD methods and tests updated to support this field. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated the documentation to describe list optimization, run history, and the new CIDR collapsing feature.

API and Documentation Updates:

  • Added a new API endpoint to retrieve the exact target items sent during a run: GET /api/jobs/{id}/logs/{logID}/targets/{targetID}.

Testing Improvements:

  • Extended integration tests to verify that CollapseCIDRs, per-run statistics, and target snapshots are correctly stored, retrieved, and validated. [1] [2] [3] [4] [5]

These changes provide improved auditability, traceability, and configurability for sync jobs and their outputs.

Closes #2

Copilot AI balanced review requested due to automatic review settings October 2, 2026 14:14

This comment was marked as resolved.

@mstrhakr
mstrhakr merged commit 705a4d0 into main Oct 2, 2026
3 checks passed
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.

feat: Deduplication of multiple lists

2 participants