Skip to content

Releases: NickBorgers/util

unraid-util v1.1.0 - Add nputop Intel NPU monitoring

16 Dec 02:16
d2e6913

Choose a tag to compare

πŸŽ‰ New Features

  • nputop: Intel Neural Processing Unit (NPU) monitoring tool
    • Real-time NPU usage display in the terminal
    • Similar interface to nvtop/htop
    • Useful for monitoring AI/ML workloads on Intel hardware
    • Source: ZoLArk173/nputop

πŸ”§ Usage

After starting the unraid-util container:

docker exec -it util bash
nputop

Note: Requires Intel NPU hardware and appropriate host device passthrough to the container.

Docker Image

The Docker image is available at:

docker pull ghcr.io/nickborgers/unraid-util:1.1.0
docker pull ghcr.io/nickborgers/unraid-util:latest

Supported Platforms

  • linux/amd64
  • linux/arm64

πŸ“ Technical Details

  • nputop is built from source using Rust/Cargo during the Docker build
  • Build dependencies are cleaned up after compilation to minimize image size
  • Binary installed to /usr/local/bin/nputop

πŸ€– Generated with Claude Code

unraid-util v1.0.0 - Disk Management Scripts

15 Dec 03:42

Choose a tag to compare

πŸŽ‰ New Features

Disk Management Scripts

Includes unraid-diskmv scripts for moving files between Unraid disks:

  • diskmv: Move files or directories between disks within a user share
  • consld8: Consolidate directories from multiple disks onto a single disk

Both scripts run in test mode by default (no files moved) and require -f flag for actual execution.

πŸ”§ Usage

# Move files from disk1 to disk2 (test mode)
diskmv /path/to/share disk1 disk2

# Force mode (actually moves files)
diskmv -f /path/to/share disk1 disk2

# Consolidate a share onto one disk
consld8 -f /path/to/share disk3

πŸ“¦ Docker Image

docker pull nickborgers/unraid-util:latest
docker pull nickborgers/unraid-util:unraid-util-v1.0.0

Supported Platforms

  • linux/amd64
  • linux/arm64

πŸ€– Generated with Claude Code

internet-connection-monitor v1.3.0 - Network Failure Phase Detection

12 Nov 00:15

Choose a tag to compare

πŸŽ‰ Major Features

Network Failure Phase Detection

The monitor now identifies exactly which network layer failed during connection attempts:

  • DNS Phase: Domain name resolution failures
  • TCP Phase: TCP connection establishment failures
  • TLS Phase: TLS/SSL handshake failures (HTTPS only)
  • HTTP Phase: HTTP request/response failures

This granular failure detection helps pinpoint network issues quickly.

Chrome Error Code Capture

Direct capture of Chrome's native error codes provides precise failure classification:

  • ERR_NAME_NOT_RESOLVED - DNS lookup failed
  • ERR_CONNECTION_REFUSED - TCP connection refused
  • ERR_CONNECTION_TIMED_OUT - Connection timeout
  • ERR_SSL_PROTOCOL_ERROR - TLS handshake failed
  • ERR_ABORTED - Request aborted
  • Plus many more Chrome error types

Enhanced Error Classification

Intelligent error classification based on:

  • Chrome DevTools Protocol network events
  • Partial timing data analysis
  • Connection phase progression

πŸ“Š Data Structure Updates

New Elasticsearch Fields

{
  "error": {
    "error_type": "ERR_NAME_NOT_RESOLVED",
    "error_message": "net::ERR_NAME_NOT_RESOLVED",
    "failure_phase": "dns"
  }
}

Elasticsearch Schema

  • Schema updated to version 2
  • New error.failure_phase keyword field
  • Restructured error object for better querying

πŸ”§ Configuration

No configuration changes required! Existing deployments will automatically benefit from the new features.

πŸ› Bug Fixes

  • Improved null handling for timing fields in error scenarios
  • Enhanced error message parsing for edge cases
  • Fixed Grafana dashboard datasource references for manual import

πŸ“ Technical Details

Implementation

  • Network Event Listener (internal/browser/network_listener.go): Captures Chrome DevTools Protocol events
  • Error Classifier (internal/browser/error_classifier.go): Infers failure phase and parses error codes
  • Comprehensive Unit Tests: 23 test cases covering all failure scenarios

Error Phase Inference Logic

The monitor intelligently determines failure phase by analyzing which timing fields are present:

  • No DNS timing β†’ DNS phase failure
  • Has DNS, no TCP β†’ TCP phase failure
  • Has DNS+TCP, no TLS (HTTPS only) β†’ TLS phase failure
  • Has connection timing, no TTFB β†’ HTTP phase failure

Data Consistency

  • Fields with nil values are omitted from JSON output (using Go's omitempty tag)
  • This is intentional design - field presence indicates the phase was attempted

πŸ“¦ Docker Image

The Docker image is available at:

docker pull ghcr.io/nickborgers/internet-connection-monitor:1.3.0
docker pull ghcr.io/nickborgers/internet-connection-monitor:latest

Supported Platforms

  • linux/amd64
  • linux/arm64

πŸš€ Deployment

Docker Compose (Recommended)

The included docker-compose.yml files now auto-build from source:

cd deployments
docker compose -f docker-compose.with-stack.yml up -d

Elasticsearch Index Template

Important: If you have existing data, the index template will be automatically applied to new indices. Existing indices will continue to work but won't have the new fields until data rotates.

To force a template update:

curl -X PUT 'http://localhost:9200/_index_template/internet-connection-monitor' \
  -H 'Content-Type: application/json' \
  -d @elasticsearch-index-template.json

πŸ“– Documentation

  • Updated README.md with failure phase examples
  • Enhanced ELASTICSEARCH_AND_GRAFANA.md with new field documentation and query examples
  • Added GRAFANA_DASHBOARD_UPDATES.md for dashboard customization guidance

πŸ” Example Queries

Find all DNS failures

GET /internet-connection-monitor-*/_search
{
  "query": {
    "term": {
      "error.failure_phase": "dns"
    }
  }
}

Group failures by phase

GET /internet-connection-monitor-*/_search
{
  "size": 0,
  "aggs": {
    "by_phase": {
      "terms": {
        "field": "error.failure_phase"
      }
    }
  }
}

πŸ€– Generated with Claude Code

internet-connection-monitor v1.2.1 - Preserve Partial Timing Data on Failures

10 Nov 15:05
d9ebe4f

Choose a tag to compare

πŸ› Bug Fix

  • Preserve partial timing data on test failures (#16)
    • When a browser test fails (e.g., HTTP timeout), the monitor now extracts and preserves any timing data that was successfully collected before the failure
    • Example: If DNS lookup and TLS negotiation succeeded but the HTTP request timed out, those timing values will still be reported
    • Previously, only total_duration_ms was set on error. Now all available partial metrics are captured
    • The extractTimings() function handles nil and partial data gracefully (verified by existing tests)

πŸ“¦ Docker Image

The Docker image is available at:

docker pull ghcr.io/nickborgers/internet-connection-monitor:1.2.1
docker pull ghcr.io/nickborgers/internet-connection-monitor:latest

Supported Platforms

  • linux/amd64
  • linux/arm64

πŸ“ Technical Details

File Changed:

  • internet-connection-monitor/internal/browser/controller_impl.go:102 - Version bumped to 1.2.1
  • Controller now calls extractTimings() to capture partial metrics even on failure

πŸ€– Generated with Claude Code

internet-connection-monitor v1.2.0 - Nullable Timing Metrics & Security Improvements

09 Nov 22:48

Choose a tag to compare

πŸ”§ Breaking Changes (Go API)

  • Timing breakdown fields changed from int64 to *int64 (nullable pointers)
    • Affects Go code that directly accesses TimingMetrics struct fields
    • Fields: dns_lookup_ms, tcp_connection_ms, tls_handshake_ms, time_to_first_byte_ms, dom_content_loaded_ms, full_page_load_ms, network_idle_ms
    • total_duration_ms remains non-nullable (always present)
  • JSON output remains backwards compatible (fields omitted when nil)

πŸ› Bug Fixes

  • Fixed misleading zero timing values during timeouts/failures (#14)
    • Grafana dashboards no longer show false latency drops during connection failures
    • Timing fields now properly omitted from JSON when unavailable
    • Example: Failed requests now show {"timings": {"total_duration_ms": 86}} instead of all fields at 0ms

πŸ”’ Security Improvements

  • Secured demo services with localhost-only binding (#15)
    • Elasticsearch, Grafana, and Prometheus now bind to 127.0.0.1 by default
    • Prevents unintended network exposure during local development
    • Added HEALTH_CHECK_LISTEN_ADDRESS configuration option
    • Updated documentation with secure defaults

πŸ“¦ Docker Image

The Docker image is available at:

docker pull ghcr.io/nickborgers/internet-connection-monitor:1.2.0
docker pull ghcr.io/nickborgers/internet-connection-monitor:latest

Supported Platforms

  • linux/amd64
  • linux/arm64

πŸ“ Full Changelog

  • Fix misleading zero timing values on failures (#14)
  • Secure demo services with localhost-only binding (#15)
  • Wire up HEALTH_CHECK_LISTEN_ADDRESS configuration
  • Add comprehensive health endpoint tests

πŸ€– Generated with Claude Code

internet-connection-monitor v1.1.0 - Graceful Chrome Failure Handling

09 Nov 16:53
371d488

Choose a tag to compare

Docker Image

The Docker image is available at:

docker pull ghcr.io/nickborgers/internet-connection-monitor:1.1.0
docker pull ghcr.io/nickborgers/internet-connection-monitor:latest

Supported Platforms

  • linux/amd64
  • linux/arm64

internet-connection-monitor v1.0.0 - Initial Release

09 Nov 00:16

Choose a tag to compare

Docker Image

The Docker image is now available at:

docker pull ghcr.io/nickborgers/internet-connection-monitor:1.0.0
docker pull ghcr.io/nickborgers/internet-connection-monitor:latest

Supported Platforms

  • linux/amd64
  • linux/arm64

Image Details

  • Size: 356MB
  • Base: chromedp/headless-shell:stable with Go 1.25

smart-crop-video v1.4.0 - Phase 7 Test Coverage & Profile Enhancements

02 Nov 03:52
8131778

Choose a tag to compare

🎯 Major Achievement: 73% Test Coverage

This release completes Phase 7 of the test coverage improvement initiative and adds significant enhancements to the profile function. Final test coverage: 73% (exceeded 70% target by 3%).


πŸ“Š Coverage Progression

Phase Coverage Tests Description
Initial ~30% ~15 Only integration tests
Phase 1-6 ~67% 245 Core refactoring complete
Phase 7 73% ~329 Target exceeded βœ…

Improvement: +43 percentage points (30% β†’ 73%)


πŸ”§ Phase 7A: Remove Duplicate Classes (+2% coverage)

What Changed:

  • Removed 3 duplicate class definitions (48 lines of untested code)
  • Imported Scene from smart_crop.analysis.scenes
  • Imported ScoredCandidate from smart_crop.core.candidates
  • Replaced CropPosition with PositionMetrics
  • Simplified conversion code (13 lines removed)

Benefits:

  • Single source of truth established
  • Eliminated technical debt
  • Improved maintainability
  • All core classes now have canonical locations

Documentation: PHASE_7A_COMPLETE.md


πŸ§ͺ Phase 7B: Extract Scene Analysis Functions (+4% coverage)

New Module: smart_crop/scene/analysis.py (466 lines)

Functions Extracted:

  1. determine_primary_metric() - Strategy to metric mapping
  2. identify_boring_sections() - Boring section detection for intelligent acceleration
  3. calculate_speedup_factor() - Speedup calculation helper
  4. extract_metric_from_showinfo() - FFmpeg output parser
  5. analyze_scene_metrics() - Scene metric analysis (motion/complexity/edges)
  6. extract_scene_thumbnails() - Thumbnail extraction for preview
  7. run_ffmpeg() - Subprocess wrapper for mocking

Test Suite: tests/unit/test_scene_analysis.py (526 lines, 50+ tests)

  • 100% coverage of all extracted functions
  • Tests execute in < 0.1 seconds
  • Fully mocked FFmpeg dependencies
  • No video files needed for testing

Benefits:

  • 208 lines of complex logic now 100% tested
  • Fast, deterministic tests
  • Easy to add new metric types or algorithms
  • Can optimize speedup calculations with confidence

Documentation: PHASE_7B_COMPLETE.md


πŸš€ Profile Function Enhancements

Smart Defaults - Simpler Usage

Users can now provide only the input file:

# Minimal usage - just specify input
smart_crop_video video.mp4

# Custom output filename
smart_crop_video video.mp4 output.mp4

# Custom aspect ratio
smart_crop_video video.mp4 output.mp4 1:1

Defaults:

  • Output: {input_name}_cropped.mp4
  • Aspect ratio: 9:16 (vertical video, optimized for mobile)

Auto-Launch Browser

Browser automatically opens to http://localhost:8765 after 3 seconds:

  • macOS: Uses open command
  • Linux: Uses xdg-open
  • WSL: Uses wslview

No more manually typing the URL - web UI appears automatically!

Updated Environment Variables

# Updated defaults
PRESET=medium              # FFmpeg encoding preset
ANALYSIS_FRAMES=50         # Updated from 20 to 50 (better accuracy)
CROP_SCALE=0.75           # Crop size scale factor
SCENE_THRESHOLD=0.2       # NEW: Scene detection sensitivity
SEGMENT_DURATION=5.0      # NEW: Time-based segment duration

Enhanced Documentation

Added comprehensive inline documentation:

  • Usage examples for all parameter combinations
  • Environment variable descriptions
  • Default value explanations

πŸ“ˆ Test Coverage Details

Final Stats

  • Total Coverage: 73% βœ…
  • Unit Tests: ~295 (all execute in < 1 second)
  • Integration Tests: 34 (~30-60 seconds)
  • Total Tests: ~329
  • All tests passing: 329/329 βœ…

Fully Tested Modules (100% coverage)

  1. smart_crop/core/dimensions.py - Crop dimension calculations (27 tests)
  2. smart_crop/core/grid.py - Grid position generation (28 tests)
  3. smart_crop/core/scoring.py - Scoring strategies (48 tests)
  4. smart_crop/core/candidates.py - Candidate generation (38 tests)
  5. smart_crop/analysis/scenes.py - Scene detection (52 tests)
  6. smart_crop/analysis/parallel.py - Parallel processing (33 tests)
  7. smart_crop/scene/analysis.py - Scene analysis ✨ NEW (50+ tests)
  8. tests/mocks/mock_analyzer.py - Mock infrastructure (19 tests)

Modules Created

Total: 9 focused modules with clear separation of concerns:

  • smart_crop/core/ - Dimensions, grid, scoring, candidates
  • smart_crop/analysis/ - Analyzer abstraction, FFmpeg, parallel, scenes
  • smart_crop/scene/ - Scene analysis utilities
  • tests/mocks/ - Testing infrastructure
  • tests/unit/ - Unit test suites
  • tests/integration/ - Integration test suites

πŸ“ Documentation

Complete Phase Documentation

This release includes comprehensive documentation:

  • PYTHON_REFACTORING_PLAN.md - Original refactoring strategy
  • PHASE_1_COMPLETE.md - Core modules extraction
  • PHASE_2_COMPLETE.md - Analysis abstraction
  • PHASE_3_COMPLETE.md - Parallel analysis
  • PHASE_4_COMPLETE.md - Candidate generation
  • PHASE_5_COMPLETE.md - Scene detection
  • PHASE_6.1_COMPLETE.md - Integration: Parallel
  • PHASE_6.2_COMPLETE.md - Integration: Scenes
  • PHASE_6.3_COMPLETE.md - Integration: Scoring
  • PHASE_6.4_COMPLETE.md - Integration: Main script
  • PHASE_7A_COMPLETE.md - Duplicate class removal ✨ NEW
  • PHASE_7B_COMPLETE.md - Scene analysis extraction ✨ NEW
  • TEST_COVERAGE_SUMMARY.md - Final coverage report ✨ NEW

Updated Repository Documentation

  • CLAUDE.md - Added PR-first release workflow
  • profile - Enhanced smart_crop_video function

πŸŽ‰ Benefits Realized

Developer Experience

βœ… Tests run instantly (< 1s vs minutes with video files)
βœ… Easy to test edge cases without video creation
βœ… CI/CD friendly (fast, deterministic tests)
βœ… Refactoring is safe (tests catch regressions)

User Experience

βœ… Simpler command line (only input file required)
βœ… Browser opens automatically to web UI
βœ… Better defaults for common use cases
βœ… Comprehensive inline documentation

Code Quality

βœ… 73% test coverage (exceeded 70% target)
βœ… Zero duplicate code
βœ… 9 focused modules with single responsibility
βœ… Comprehensive documentation
βœ… All core business logic tested


πŸ”„ Upgrade Notes

No breaking changes - all existing usage patterns continue to work.

New Features:

  1. Profile function now accepts just the input filename
  2. Browser auto-launches to web UI (can be disabled by manually specifying URL)
  3. Updated environment variable defaults (ANALYSIS_FRAMES: 20β†’50)

Docker Image:
Rebuild your local image to get the latest code:

docker pull nickborgers/smart-crop-video:latest
# or build locally
cd smart-crop-video
docker build -t nickborgers/smart-crop-video:latest .

πŸ“¦ Files Changed

Created (16 files):

  • Documentation: 3 new phase completion docs + coverage summary
  • Code: smart_crop/scene/analysis.py (466 lines)
  • Tests: tests/unit/test_scene_analysis.py (526 lines)
  • Phase documentation: PHASE_7A, PHASE_7B, TEST_COVERAGE_SUMMARY

Modified:

  • smart-crop-video.py - Removed duplicates, updated imports
  • profile - Enhanced function with defaults and auto-launch
  • CLAUDE.md - Added PR-first release workflow

Total Changes:

  • +13,736 insertions
  • -150 deletions
  • 47 files changed

πŸ† Achievement Unlocked

Mission Accomplished: Exceeded 70% test coverage target!

  • Coverage: 73% (104% of goal)
  • Tests: 329 total
  • Modules: 9 refactored modules
  • Quality: Zero technical debt, comprehensive documentation
  • Speed: < 1 second for all unit tests

The smart-crop-video project now has a solid foundation for continued development with high confidence and excellent test coverage!


πŸ€– Generated with Claude Code

smart-crop-video v1.3.0 - Comprehensive Test Suite

01 Nov 18:33

Choose a tag to compare

πŸŽ‰ New Feature: Comprehensive Integration Test Suite

This release adds complete testing infrastructure to ensure quality and reliability.

βœ… Containerized Testing

Run tests without installing Python, Playwright, or dependencies:

```bash
./run-tests.sh container # Fast validation (15 tests, ~40s)
./run-tests.sh quick # Quick smoke test
./run-tests.sh all # Full test suite
```

πŸ“¦ What's Included

Test Coverage:

  • βœ… Container integration (15 tests) - 100% passing
  • βœ… API endpoints (20 tests)
  • βœ… Web UI workflows (5 focused tests)
  • βœ… Diagnostic tooling

Infrastructure:

  • Docker Compose test environment
  • Playwright browser automation
  • Shell script runner
  • CI/CD integration

Documentation:

🎯 Key Benefits

βœ… Zero dependency testing - Only Docker required
βœ… Consistent environments - Same setup everywhere
βœ… CI/CD ready - Automated quality gates
βœ… User experience validated - Real browser tests
βœ… Portable - Works on macOS, Linux, Windows

πŸš€ Quick Start

```bash

Clone and test

git clone https://github.com/NickBorgers/util.git
cd util/smart-crop-video

Run validation

./run-tests.sh container # Passes all 15 tests
```

πŸ“Š Test Metrics

  • Tests: 40 validated tests
  • Code: ~2,000 lines of test code
  • Docs: ~1,500 lines of documentation
  • Time: 40s (fast) to 5-10 min (full suite)

πŸ› Known Issues

Some edge cases have timing issues (acceleration choice, encoding progress) but core functionality (analyze β†’ preview β†’ select) works perfectly.

See RELEASE_NOTES.md for complete details.


πŸ€– Generated with Claude Code

smart-crop-video v1.2.0 - Interactive Scene Selection

01 Nov 17:08

Choose a tag to compare

πŸŽ‰ Major Features

Interactive Scene Selection with Visual Previews

  • Visual Scene Gallery: Shows first and last frame thumbnails for each detected scene
  • Manual Control: Select which scenes to accelerate and choose speed (2x, 3x, or 4x)
  • Web UI Integration: Beautiful interface for reviewing and selecting scenes
  • Complete Flexibility: Speed up intros/outros while keeping important content at normal speed

Intelligent Scene Detection with Fallback

  • Automatic Fallback: When scene detection finds too few scenes, automatically splits video into time-based segments (default 5 seconds)
  • Improved Detection: Lowered default scene threshold (0.3 β†’ 0.2) for better scene detection
  • Configurable Segments: New SEGMENT_DURATION environment variable to control segment size

Enhanced Progress Tracking

  • Granular Progress: Progress bar smoothly updates from 0-100% during temporal analysis
  • Real-Time Updates: See which scene/thumbnail is being processed
  • Web UI Sync: Progress appears in both terminal and web interface

Better File Management

  • Clean Overwrites: Properly removes old files before creating new ones
  • Automatic Cleanup: All temporary files (thumbnails, previews) cleaned up after encoding
  • Force Overwrite: Ensures output file is always cleanly overwritten

πŸ”§ Configuration Options

# Scene detection sensitivity (default: 0.2)
SCENE_THRESHOLD=0.15 smart_crop_video video.mp4

# Time-based segment duration when scene detection fails (default: 5.0s)
SEGMENT_DURATION=3.0 smart_crop_video video.mp4

# Boring section threshold (default: 30th percentile)
BORING_THRESHOLD=25.0 smart_crop_video video.mp4

πŸ“Š What's New

  • New API Endpoints: /api/scene_thumbnail and /api/scene_selections
  • Enhanced Scene Dataclass: Now includes thumbnail paths
  • Updated Documentation: Complete guide on scene selection and fallback behavior
  • 984 lines added: Major feature expansion

🎬 Example Workflow

  1. Select your preferred crop from 10 analyzed positions
  2. Choose "Enable intelligent acceleration"
  3. Review scenes with visual thumbnails (first/last frame)
  4. Select which scenes to speed up and by how much
  5. Encode video with your custom scene speeds

πŸ› Bug Fixes

  • Fixed progress bar jumping immediately to 100%
  • Improved file cleanup and overwrite behavior
  • Better handling of videos with single/few scene changes

πŸ“ Technical Details

For developers and advanced users:

  • Scene detection uses FFmpeg's scene filter with configurable threshold
  • Time-based segmentation creates fixed-duration Scene objects
  • Thumbnail extraction happens after scene detection with progress tracking
  • Variable-speed encoding uses segment-based approach with atempo filter for audio

πŸ€– Generated with Claude Code