Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 10, 2025

This PR contains the following updates:

Package Change Age Confidence
darvaza.org/cache v0.4.0v0.4.1 age confidence
darvaza.org/cache/x/groupcache v0.3.0v0.3.1 age confidence
darvaza.org/core v0.16.0v0.18.5 age confidence
darvaza.org/slog v0.6.0v0.8.1 age confidence
darvaza.org/slog/handlers/discard v0.5.0v0.6.2 age confidence

Release Notes

darvaza-proxy/cache (darvaza.org/cache)

v0.4.1

Compare Source

darvaza-proxy/core (darvaza.org/core)

v0.18.5: : Percentile Calculation for Slices

Compare Source

v0.18.5: Percentile Calculation for Slices

Add percentile calculation utility for statistical analysis of ordered slices.

New Features

  • slices: Add SliceP[T Ordered](slice, p) function for percentile calculation (p in range 0.0-1.0)
    • Sorts slice in-place and returns element at p-th percentile
    • Returns zero value for empty slices or invalid p values
    • Comprehensive test coverage with 23 test cases across int, float64, and string types

Documentation

  • Enhanced function documentation with parameter constraints
  • Added usage examples for performance metrics and latency analysis
  • Documented edge case behaviour and in-place modification warnings

Use Cases

This release introduces utility for statistical analysis commonly used in performance monitoring and SLA tracking.


Full Changelog: darvaza-proxy/core@v0.18.4...v0.18.5

Related Pull Request: #​148

v0.18.4: : Testing Assertions and Documentation Improvements

Compare Source

This release enhances the testing infrastructure with new assertion functions, improves error assertion architecture, and corrects API documentation inaccuracies to match actual implementation.

Testing Enhancements

  • New assertions: Added AssertNotContain and AssertMustNotContain for negative string containment testing
  • Refactored error assertions: AssertError and AssertNoError are now independent base functions with domain-specific messaging rather than delegating to generic nil checks
  • Improved error messages:
    • AssertError produces: "expected error, got nil" (failure) or "error: %v" (success)
    • AssertNoError produces: "unexpected error: %v" (failure) or "no error" (success)
  • Enhanced coverage: Improved overall package coverage to 97.4%

Documentation Improvements

  • Fixed 25+ function signatures in README.md to match actual implementation:
    • AddrPort(v) - was incorrectly documented as AddrPort(addr, port)
    • Zero[T](_ *T) - was incorrectly documented as Zero[T]()
    • All assertion functions now correctly show name... parameter (was documented as msg...)
    • IsError family signatures corrected by removing incorrect generic parameters
  • Standardised naming: Renamed AGENT.md to AGENTS.md following project conventions
  • Updated testing documentation: Refreshed architecture hierarchy in TESTING.md and TESTING_core.md

Dependencies

  • Updated actions/setup-node to v6 in GitHub Actions workflows (#​146)

Backwards Compatibility

This release maintains complete backwards compatibility. All changes are either:

  • Additions (new AssertNotContain/AssertMustNotContain functions)
  • Internal refactoring (error assertion implementation details)
  • Documentation corrections (no behaviour changes)

Full Changelog: darvaza-proxy/core@v0.18.3...v0.18.4

v0.18.3: : Enhanced Panic Testing and Build Improvements

Compare Source

Release v0.18.3

🎯 Highlights

This release enhances the AssertPanic testing utility with intelligent type-aware matching capabilities and includes significant build system improvements for better coverage collection and reporting.

✨ Features

Enhanced Panic Testing
  • Type-aware panic validation: AssertPanic now provides different matching strategies based on the expected type.
    • nil: Accepts any panic (most common use case).
    • error: Uses errors.Is for error chain matching.
    • string: Performs substring matching for more resilient tests.
    • Recovered: Direct comparison without unwrapping.
    • Other types: Exact equality check with automatic Recovered unwrapping.
  • Improved logging: Panic assertions now include clear context in their log messages.
  • 100% test coverage: The entire testing.go file now has complete test coverage.
Build System Enhancements
  • Enhanced coverage collection: New HTML and text report generation with .tmp/coverage/ directory structure.
  • Improved Codecov integration: Better monorepo support with module-specific coverage targets.
  • Go 1.25 support: Added as the default version in CI/CD pipelines.

🔧 Improvements

Development Experience
  • Enhanced .editorconfig with comprehensive file type support.
  • Improved .gitignore with additional patterns for better repository hygiene.
  • Reorganised Makefile variable definitions for better maintainability.
  • Updated GitHub Actions to latest versions (setup-go v6, setup-node v5).
Code Quality
  • Refactored doAssertPanic helpers for cleaner implementation.
  • Simplified panic validation logic by removing the report flag.
  • Consistent use of the ok := test() pattern throughout.
  • Field-aligned test structures for memory efficiency.

⚠️ Breaking Changes

  • AssertPanic string matching: String expectations now use substring matching instead of exact equality.

    // Previously would fail, now passes:
    AssertPanic(t, func() { panic("unexpected error occurred") }, "error", "test")
  • AssertPanic error matching: Error expectations now use errors.Is semantics for chain matching.

    // Now matches wrapped errors:
    AssertPanic(t, func() { panic(fmt.Errorf("wrapped: %w", io.EOF)) }, io.EOF, "test")

📊 Statistics

  • Files changed: 16
  • Insertions: 339 lines
  • Deletions: 139 lines
  • Test coverage: 97.3% overall, 100% for testing.go

🤝 Contributors

📦 Dependencies

  • Updated actions/setup-go to v6.
  • Updated actions/setup-node to v5.

🔗 Links


This release focuses on making panic testing more intuitive and resilient whilst maintaining backward compatibility for most use cases. The enhanced type-aware matching aligns with developer expectations and reduces test brittleness.

v0.18.2

Compare Source

Release v0.18.2

This release introduces comprehensive same-ness testing utilities and significantly improves documentation patterns for the testing framework. The release focuses on enhancing the developer experience with better testing tools and clearer guidance on testing patterns.

🚀 New Features

Same-ness Testing Functions
  • IsSame() - Base function for determining same-ness with comprehensive type handling
  • AssertSame() / AssertNotSame() - Non-fatal assertion functions for same-ness testing
  • AssertMustSame() / AssertMustNotSame() - Fatal assertion functions that terminate test execution on failure

Key Capabilities:

  • Value types (numbers, strings, booleans): Same-ness means equal values.
  • Reference types (slices, maps, pointers, channels, functions): Same-ness means pointer equality to the same underlying data structure.
  • Proper nil handling: Typed nils of same type are considered same.
  • Interface support: Recursive comparison of contained values.
  • Special case handling: Zero-capacity slice optimisations, invalid reflect.Value protection.
Cross-Compatible Test Functions
  • Enhanced MockT.Run documentation with interface compatibility patterns.
  • doRun helper pattern for test functions that work with both *testing.T and MockT interfaces.
  • Type assertion fallback mechanism for graceful degradation across different testing interfaces.

📚 Documentation Improvements

TESTING.md Enhancements
  • Testing Patterns Overview clearly distinguishing TestCase interface vs t.Run() usage.
  • "When to Use TestCase Interface" with specific criteria for table-driven tests.
  • "When to Use t.Run() with Named Functions" for different test scenarios.
  • Updated terminology consistency throughout documentation.
  • British English corrections and improved formatting.
README.md Updates
  • Same-ness testing functions documentation in the Testing Utilities section.
  • Cross-Compatible Test Functions section with complete implementation examples.
  • Fatal Assertion Functions section updated with new AssertMust variants.

🔧 Code Quality Improvements

Test Suite Modernization
  • Refactored existing tests to use modern assertion patterns:
    • as_test.go: Updated to use AssertEqual for length checks
    • compounderror_test.go: Modernized with AssertSame, AssertEqual, AssertNotNil
    • errgroup_test.go: Improved with AssertSame for error instance checks
    • lists_test.go: Enhanced with AssertNotSame for independence verification
  • Consistent test case patterns applied across zero_test.go functions.
  • Fatal assertion pattern applied consistently for critical preconditions.
Enhanced Test Coverage
  • Comprehensive test suite for same-ness functions covering all scenarios.
  • MockT.Run() testing for both success and failure scenarios.
  • Coverage maintained at 97.3% with all tests passing.

🛠️ Dependencies & Infrastructure

Dependency Updates
  • golang.org/x/net updated to v0.43.0.
  • actions/checkout updated to v5 across all GitHub workflows.
Build System
  • Updated CSpell dictionary with new technical terms.
  • Enhanced GitHub Actions workflows with latest action versions.

🔍 Technical Details

Implementation Highlights
  • asReflectValue() helper to avoid duplicate reflect.ValueOf() calls.
  • isReflectValueSame() helper following established naming patterns.
  • Special handling for empty slices due to Go runtime memory optimisation.
  • Stack overflow protection in recursive interface comparisons.
  • Unsafe pointer and complex number support with comprehensive tests.
Breaking Changes

None - This is a purely additive release that maintains full backward compatibility.

📊 Statistics

  • 18 files changed: 1,323 insertions, 257 deletions.
  • 4 major features added to the testing utilities.
  • 5 GitHub workflow files updated with latest dependencies.
  • 2 comprehensive documentation overhauls (TESTING.md, README.md).
  • 150+ new test cases added for comprehensive coverage.

🎯 Impact

This release significantly enhances the testing experience for both internal development and external library users by:

  1. Providing powerful same-ness testing utilities that properly distinguish between value and reference equality.
  2. Clarifying testing patterns to help developers choose appropriate testing approaches.
  3. Modernising the existing test suite with consistent patterns and better assertions.
  4. Maintaining excellent documentation with clear examples and usage guidance.

The release maintains the library's core principles of zero external dependencies while substantially improving the developer experience for testing Go applications.

Full Changelog

Changes since v0.18.1:

  • feat(testing): add AssertMustSame/AssertMustNotSame functions (#​135)
  • feat(core): add same-ness testing functions and modernise test patterns (#​135)
  • docs(testing): clarify TestCase interface is only for table-driven tests (#​139)
  • docs(testing): document cross-compatible test function pattern (#​135)
  • test(core): refactor tests to use consistent test case pattern (#​135)
  • chore(deps): update actions/checkout action to v5 (#​137)
  • fix(deps): update module golang.org/x/net to v0.43.0 (#​136)

v0.18.1

Compare Source

Testing Utilities and Build System Improvements

New Testing Features

AssertMustFoo() Functions

Add 14 new assertion functions that automatically call t.FailNow() on
failure, eliminating the need for manual if !Assert() { t.FailNow() }
patterns:

  • AssertMustEqual[T], AssertMustNotEqual[T], AssertMustSliceEqual[T]
  • AssertMustTrue, AssertMustFalse, AssertMustNil, AssertMustNotNil
  • AssertMustContains, AssertMustError, AssertMustNoError
  • AssertMustErrorIs, AssertMustPanic, AssertMustNoPanic
  • AssertMustTypeIs[T]
Generic Type Conversion Utilities
  • MustT[T](value any) T: Convert any value to type T, panic on failure.
  • MaybeT[T](value any) T: Convert any value to type T, return zero on
    failure.

Both functions build on the existing As[any, T] foundation.

Enhanced MockT Interface

Complete testing.T compatibility with Fatal, Fatalf, FailNow, and
Run() methods. Thread-safe implementation with proper panic recovery for
testing assertion functions.

Build System Enhancements

Race Detection Support
  • Dedicated race detection workflow with per-module targets.
  • Proper CGO configuration for race detector.
  • Separate from main test workflows for better CI efficiency.
Improved Coverage System
  • Atomic coverage mode with better error reporting.
  • Simplified Codecov integration with per-module uploads.
  • Enhanced coverage profile merging and multiple output formats.
GitHub Actions Optimisation
  • Dependency-based caching for improved build performance.
  • Workflow separation strategy for better resource utilisation.
  • Optimised action configurations across all workflows.

Documentation

  • Updated README.md with new testing utilities and examples.
  • Enhanced TESTING.md with Fatal/FailNow patterns.
  • New comprehensive BUILDING.md covering build system architecture.

Technical Details

  • Maintains 97.1% test coverage.
  • Zero external dependencies preserved.
  • Thread-safe implementations with optimised performance.
  • Follows Go testing conventions for Error vs Fatal patterns.

This release establishes the foundation for expanded assertion functionality
whilst significantly improving the build and testing infrastructure.

v0.18.0

Compare Source

v0.18.0 Release Notes

New Features

Feature Description
Must(T, error) T New generic utility for error handling that panics on error, simplifying error propagation in initialization code.
Maybe(T, error) (T, bool) New generic utility that converts error-returning functions to optional-style returns with boolean success indicator.
MustOK(T, bool) T New generic utility for bool-based operations that panics when the boolean is false, useful for assertion-style code.
MaybeOK(T, bool) (T, bool) New generic utility that handles bool-based operations by returning the value and success status.
Enhanced testing infrastructure Comprehensive transformation of testing utilities to public API with TestCase interface, AssertNotEqual function, and extensive documentation.

Improvements

Feature Description
CompoundError.OK() Standardised method name from Ok() to OK() with backward compatibility maintained through type alias.
golangci-lint v2.3.0 Updated to latest version with improved Go 1.23 support and standardised API naming conventions.
Testing patterns Implemented consistent TestCase interface across all test files for better test organisation and maintainability.

Key Benefits

  • Enhanced error handling with generic utilities for common patterns.
  • Improved testing infrastructure with comprehensive public API.
  • Better backward compatibility handling for API changes.
  • Standardised naming conventions across the codebase.

Quality and Documentation

  • Enhanced test coverage and documentation consistency across all modules.
  • Improved error handling patterns with new generic utilities.
  • Better alignment of code documentation with project standards.
  • Consistent use of project testing patterns and helpers.
  • Updated build tools to latest versions with improved linting support.

Files Changed

File Changes
generics.go, generics_test.go New generic error handling utilities.
testing.go, testing_test.go Enhanced testing infrastructure with public API.
compounderror.go, compounderror_test.go API standardisation with backward compatibility.
Various test files Consistent TestCase interface implementation.
README.md Documentation improvements with proper punctuation.
Build configuration Updated golangci-lint and standardised naming.

Breaking Changes

No Breaking Changes - All changes are backwards compatible additions and
improvements. The CompoundError.Ok() method remains available as an alias.
Existing code will continue to work without modification.

Installation

go get darvaza.org/[email protected]

Commit History

Commit Description
6d20ae1 feat: add MustOK/MaybeOK generic utilities for bool-based operations
08e9fe2 feat: add Must/Maybe generic utilities for error handling
ecffb4b refactor(tests): implement TestCase interface across all test files
85b44e7 feat(testing): add AssertNotEqual function for inequality assertions.
ce96839 feat(testing): transform testing infrastructure to public API with comprehensive utilities
2885be0 feat: standardise CompoundError.Ok() to OK() with backward compatibility
81b83ec build: update golangci-lint to v2.3.0 and standardise API naming
af0433f docs(testing): add comprehensive testing guidelines and patterns
3ce4976 refactor: clean up spelling dictionary and standardise camelCase naming
3321cd2 docs: add periods to end of sentences in README.md

v0.17.5

Compare Source

Release v0.17.5

✨ New Features

Zero Value Utilities
Feature Description
IsNil(vi any) bool New function for typed nil detection, addressing cases where == nil comparisons fail with typed nil interfaces.
Enhanced utilities Comprehensive enhancement of zero value utilities with improved documentation and examples.
Stack Tracing Enhancements
Feature Description
Frame.PkgFile() string New method returning package-relative file paths for cleaner stack traces.
Frame.String() and Stack.String() New string methods providing human-readable representations.
Format flag support Added '#' flag to Frame.Format() for PkgFile display mode.

🐛 Bug Fixes

Context Utilities
  • Improved nil handling and edge cases in context operations.
  • Better error handling for edge cases in context timeout operations.
Stack Tracing
  • Fixed empty file string handling in formatFile function for more robust
    stack trace formatting.

📚 Documentation

Enhanced Documentation Across Modules
  • Improved SplitName documentation with better clarity and formatting.
  • Converted Format() doc comments to line style for improved go doc
    display.
  • Enhanced Go documentation for error checking functions with clearer
    examples.
  • Updated stack tracing documentation to match project documentation
    standards.
  • Improved context utilities documentation with better usage examples.

🧪 Testing

Comprehensive Test Coverage
Component Description
Stack tracing Added comprehensive test coverage for all stack tracing functionality.
Error handling Added extensive tests for error checking and handling functions.
Network utilities Enhanced test coverage for splithostport module.
Collections Improved test coverage for slices and lists modules.
Context utilities Refactored tests using established project patterns.
Test Infrastructure
  • Better test organization using established helper patterns.
  • Improved error case coverage across all modules.
  • Enhanced benchmark coverage for performance-critical functions.

🔧 Internal Improvements

  • Enhanced test coverage and documentation consistency across all modules.
  • Improved error handling patterns and edge case coverage.
  • Better alignment of code documentation with project standards.
  • Consistent use of project testing patterns and helpers.

Files Changed

File Changes
context.go, context_test.go Context utilities improvements.
errors.go, errors_test.go Error handling enhancements.
lists_test.go Enhanced list utilities testing.
slices_test.go Improved slice utilities testing.
splithostport.go, splithostport_test.go Network utilities improvements.
stack.go, stack_test.go Stack tracing feature additions.
zero.go, zero_test.go Zero value utilities expansion.
README.md Documentation updates.

Compatibility

No Breaking Changes - All changes are backwards compatible additions and
improvements. Existing code will continue to work without modification.

Installation

go get darvaza.org/[email protected]

Notable Commits

Commit Description
b176491 feat(zero): add IsNil function for typed nil detection.
53a8a6d feat(stack): add PkgFile() method to Frame with comprehensive tests.
41060b8 feat(stack): add String methods to Frame and Stack.
68ff5bd feat(stack): add '#' flag support to Frame.Format() for PkgFile display.
9148230 fix(context): improve nil handling and edge cases.
8fc827d fix(stack): improve empty file string handling in formatFile.

v0.17.4

Compare Source

Bug Fixes

  • fix(maps): correct MapListContainsFn nil check condition

Test Infrastructure

  • feat(tests): add comprehensive test helper functions (AssertEqual, AssertSliceEqual, etc.)
  • feat(tests): add ST helper for concise slice creation
  • refactor(tests): convert all test slice literals to use ST helper
  • refactor(tests): convert TestSliceReverse to structured test cases

Performance

  • Enable field alignment optimization across all structs
  • Fix struct memory layout for better efficiency

Build System

  • Pin golangci-lint to v1.64.8 with schema validation docs
  • Enhanced cspell dictionary and documentation

Statistics

23 files changed, +1920/-357 lines

All tests pass, backward compatible, no breaking changes.

v0.17.3: - Network utilities bug fixes and enhanced test coverage

Compare Source

Bug Fixes

  • fix(addrs): properly handle IPv4 unmapping in network utilities
    • IPv4 addresses now return as clean IPv4 (192.168.1.1) instead of IPv4-mapped IPv6 (::ffff:192.168.1.1)
    • AddrPort() interface method now validates returned values
    • AddrFromNetIP consistently returns unmapped IPv4 addresses

Test Coverage

  • test(addrport): add comprehensive tests for AddrPort extraction (374 new lines)
  • test(addrs): add comprehensive tests for network address utilities (621 new lines)
  • test(as): add comprehensive tests for type conversion utilities (556 new lines)
  • Overall test coverage improved to 63.9%

Documentation

  • Enhanced function documentation with detailed type support lists
  • Added comprehensive edge case coverage in tests

Full Changelog

Full Changelog: darvaza-proxy/core@v0.17.2...v0.17.3

v0.17.2

Compare Source

v0.17.1

Compare Source

v0.17.0

Compare Source

v0.16.3

Compare Source

v0.16.2

Compare Source

v0.16.1

Compare Source

darvaza-proxy/slog (darvaza.org/slog)

v0.8.1

Compare Source

v0.8.1 Release Notes

🐛 Bug Fixes

Race Condition Resolution
  • Fixed critical race condition in internal.Loglet when accessing fieldsMap concurrently (fixes #​127)
  • Added proper mutex locking in fieldsMapLocked() to ensure thread-safe field operations
  • Resolved potential data races in concurrent logging scenarios

✨ Improvements

Internal Enhancements
  • Improved field collection mechanism with proper synchronisation primitives
  • Enhanced thread safety across the internal logging infrastructure
  • Better handling of concurrent field map access patterns
Testing
  • Added comprehensive race detection test suite (internal/loglet_race_test.go)
  • Implemented concurrent access tests with multiple goroutines
  • Verified field map safety under high-concurrency load conditions
Documentation
  • Added Socket.dev security monitoring badge for supply chain visibility
  • Updated codecov badge to display overall project coverage

📦 What's Changed

🔧 Technical Details

This release focuses on stability and correctness, particularly in high-concurrency environments. The race condition fix ensures that multiple goroutines can safely log with fields without data corruption or panics.

Affected Components
  • internal/loglet.go - Core race condition fix
  • internal/loglet_ancestor.go - Related improvements
  • internal/loglet_race_test.go - New test coverage

📊 Statistics

  • 4 files changed
  • 229 insertions(+)
  • 19 deletions(-)

Full Changelog: darvaza-proxy/slog@v0.8.0...v0.8.1

v0.8.0: darvaza.org/slog v0.8.0

Compare Source

darvaza.org/slog v0.8.0

Major Performance and API Improvements

This release introduces significant performance optimisations through an intelligent FieldsMap delegation system that reduces memory usage and improves field access performance by up to 60x in certain scenarios.

What's New

Pull Request #​128 - FieldsMap Delegation System
  • FieldsMap Delegation System: Eliminates redundant map construction through intelligent ancestor delegation.
  • Memory Sharing: Loglets with identical field sets now share memory maps.
  • Proactive Caching: Prevents redundant map construction in loglet chains.
  • 60x Performance Gains: Significant improvement for field access in handler scenarios.
  • FieldsMapCopy() Method: New API for obtaining modifiable field maps with optional excess capacity.
  • Thread-Safe Caching: sync.Once cached FieldsMap() method in internal.Loglet.
Pull Request #​139 - Private Loglet Embedding
  • Safe Value Returns: Loglet.Copy() method prevents lock-by-value issues.
  • Method Exposure Control: Private Loglet embedding across all handlers to control API surface.
🏗️ Internal Architecture Improvements
  • Complete FieldsMap delegation infrastructure with ancestor traversal.
  • Thread-safe caching system using sync.Once.
  • Advanced delegation logic with buildFieldsMap() and ancestor detection.
  • Comprehensive ancestor delegation system in internal/loglet_ancestor.go.
📊 Enhanced Testing and Documentation
  • Comprehensive benchmark suite for FieldsMap performance analysis.
  • Enhanced internal documentation with 359+ lines covering the delegation system.
  • Extensive test coverage including delegation, caching, and integration scenarios.
  • Performance benchmarks comparing delegation vs manual iteration.

Compatibility

  • Full Backward Compatibility: All existing FieldsMap() usage continues to work unchanged.
  • Zero Breaking Changes: No changes to public APIs.
  • Enhanced Safety: Improved immutability guarantees and proper nil handling.

Requirements

  • Go: 1.23.0 or later
  • Dependencies: darvaza.org/core v0.18.2

Installation

go get darvaza.org/[email protected]

Performance Impact

The root module changes span +1,663/-19 lines across 6 files, delivering significant field access optimisation for all handlers without requiring any code changes from users.

What's Next

This release lays the foundation for future performance improvements across the slog ecosystem. All handlers automatically benefit from these optimisations whilst maintaining full API compatibility.


Full Changelog: v0.7.10...v0.8.0

v0.7.10: : Testing Infrastructure Modernisation

Compare Source

Release v0.7.10: Testing Infrastructure Modernisation

This release modernises the testing infrastructure by migrating to standardised same-ness testing functions from darvaza.org/core v0.18.2, improves test coverage, and includes various build improvements.

🔧 Testing Infrastructure Modernisation

  • Migrate to core library: Replace complex reflection-based same-ness testing implementations with simple core.* delegates
  • Deprecate internal functions: Mark internal same-ness functions as deprecated whilst maintaining full backward compatibility
  • Improve test coverage: Increase coverage from 86.7% to 88.8% with comprehensive helper function tests using core.MockT
  • Reduce code complexity: Remove 443 lines of redundant test code and leverage well-tested standardised implementations

📦 Dependencies

  • Update darvaza.org/core: Upgrade from v0.18.1 to v0.18.2 across all modules
  • Handler module updates: Migrate handler tests to use core.AssertSame instead of slogtest.AssertSame

🛠️ Build Improvements

  • Shell script modernisation: Remove outdated x-prefix in shell comparison (fix_whitespace.sh)
  • POSIX compliance: Address SC2268 shellcheck warning for better portability

📊 Impact

  • Code reduction: 443 fewer lines of test code
  • Improved coverage: From 86.7% to 88.8%
  • Better maintainability: Simpler, standardised implementations
  • Future-ready: Prepared for eventual removal of deprecated functions

🔄 Backward Compatibility

All existing APIs remain fully functional. Deprecated functions include clear migration paths to their darvaza.org/core equivalents.


Full Changelog: v0.7.9...v0.7.10

v0.7.9

Compare Source

v0.7.8

Compare Source

Release v0.7.8

Summary

This release introduces significant enhancements to the testing
infrastructure, adds a new public mock handler for testing applications,
and includes critical fixes for internal reliability. The release maintains
full backward compatibility whilst substantially improving developer
experience and code quality.

🆕 New Features

Mock Handler for Public Testing
  • New handlers/mock package: Complete public API for testing
    slog-based applications.
  • Thread-safe Logger and Recorder: Comprehensive implementations with
    nil safety.
  • Migration from internal: Previously internal testing utilities now
    publicly available.
  • Comprehensive documentation: Usage examples and migration guidance
    included.
Enhanced Testing Framework
  • Instance equality testing: New AssertSame/IsSame functions with
    reflection support.
  • Dual assertion pattern: Assert* functions return booleans,
    AssertMust* variants terminate on failure.
  • Improved test helpers: Enhanced with core.T interface and boolean
    return patterns.
Build System Improvements
  • Dedicated race detection: Separate GitHub workflow with proper CGO
    configuration.
  • Enhanced coverage reporting: Multiple output formats (.prof,
    .func, .html, .stdout).
  • Improved CI/CD: Better caching, Node.js 18→22 upgrade, optimised
    workflows.

🔧 Critical Fixes

Loglet Circular Reference Protection
  • Fixed infinite loops: Prevented circular references in field
    traversal during reassignment patterns.
  • Added safety methods: IsZero() and GetParent() with circular
    reference detection.
  • Enhanced field handling: Robust FieldsCount() and Fields()
    iterator operations.
Build System Reliability
  • Race detection fix: Disabled test caching using -count=1 to
    prevent stale results.
  • Coverage reporting fix: Now displays all packages instead of only
    the last package.
  • Enhanced error handling: Better script reliability and warning
    messages.

🧪 Testing Enhancements

Complete Root Module Test Suite
  • New test files: context_test.go, writer_test.go, std_test.go,
    slog_test.go.
  • Internal testing: internal/loglet_test.go, internal/internal_test.go.
  • Comprehensive coverage: 1,762 lines of tests across all public APIs.
  • Edge case validation: Nil handling, circular references, thread safety.
Testing Framework Modernisation
  • Core.Assert patterns*: Standardised assertion usage throughout.
  • TestCase compliance: Full darvaza.org/core TestCase interface
    implementation.
  • New utility tests: recorder_test.go, stress_private_test.go.
  • Enhanced private testing: writer_private_test.go for edge case
    coverage.

📚 Documentation & Infrastructure

Dependency Updates
  • Core upgrade: Updated to darvaza.org/core v0.18.1.
  • Handler modules: All handlers updated to use new core version.
  • GitHub Actions: Updated actions/checkout to v5.
Developer Experience
  • VS Code improvements: Updated workspace configuration, unified
    spell-checking.
  • Enhanced documentation: Improved AGENT.md, README.md, coverage
    documentation.
  • Build documentation: Updated coverage system documentation and
    examples.

📊 Technical Details

Statistics
  • Commits: 15 commits with substantial changes.
  • Files changed: 40+ files across root module and infrastructure.
  • Lines added: Significant testing infrastructure and documentation
    improvements.
  • No breaking changes: Full backward compatibility maintained.
Key Internal Improvements
  • Reduced cognitive complexity: Extracted helper functions, improved
    readability.
  • Enhanced error handling: Better validation and safety checks
    throughout.
  • Performance optimisations: Discard handler improvements, build
    system efficiency.
  • Code quality: Consistent patterns, improved documentation,
    spell-checking.

🔄 Migration Notes

Mock Handler Migration

Applications using internal testing utilities should migrate to the new
public API:

// Old (still works but deprecated)
import "darvaza.org/slog/internal/testing"

// New (recommended)
import "darvaza.org/slog/handlers/mock"
Testing Framework Updates

No action required - all changes are backward compatible. New assertion
patterns provide additional functionality whilst maintaining existing
behaviour.

✅ Validation

  • All tests passing: Comprehensive test suite validation.
  • No breaking changes: Full API compatibility maintained.
  • Enhanced reliability: Critical fixes for edge cases and race
    conditions.
  • Improved coverage: Substantial increase in test coverage across all
    modules.

This release establishes a solid foundation for continued development with
enhanced testing capabilities, improved reliability, and better developer
experience whilst maintaining the project's commitment to stability and
backward compatibility.

📋 Pull Requests

This release includes the following merged pull requests:

  • #​129: Test Suite Modernisation: Complete darvaza.org/core TestCase
    Compliance
  • #​131: chore: build system and CI improvements
  • #​132: chore(deps): update actions/checkout action to v5
  • #​125: fix(deps): update darvaza projects

v0.7.7: darvaza.org/slog v0.7.7

Compare Source

darvaza.org/slog v0.7.7

Add comprehensive mock logger handler for testing

New Features

  • handlers/mock: New subpackage providing Logger and Recorder types for testing slog-based applications
  • Thread-safe implementations with comprehensive nil checks
  • Complete slog.Logger interface implementation with immutable behavior
  • Public API for programmatic log message capture and verification

Key Improvements

  • Moved and enhanced testing capabilities from internal/testing to public API
  • Optimized Message.String() using strings.Builder with proper error handling
  • Field chains properly copied to maintain immutability
  • Message formatting sorts fields consistently for predictable output

Usage

import "darvaza.org/slog/handlers/mock"

func TestMyCode(t *testing.T) {
    logger := mock.NewLogger()
    myFunction(logger)
    
    messages := logger.GetMessages()
    // Verify logged messages
}

Dependencies

  • darvaza.org/core v0.17.5
  • Go 1.23 or later

This enables slog users to test their own logging code by capturing and verifying log messages programmatically, previously only available to internal slog handler development.

v0.7.6: darvaza.org/slog v0.7.6

Compare Source

Release Notes for darvaza.org/slog v0.7.6

Summary

Patch release with dependency updates and minor build improvements.

Changes since v0.7.5

Dependencies
  • Updated darvaza.org/core to v0.17.5
Build System
  • Changed coverage function files from .funcs to .func extension to match
    go tool cover conventions
  • Updated internal build variable from COVERFUNCS to COVERFUNC
Documentation
  • Improved markdown accuracy and consistency across documentation files
  • Fixed handler version references in documentation
  • Updated coverage system documentation to reflect current implementation

Requirements

  • Go 1.23 or later
  • darvaza.org/core v0.17.5

Installation

go get darvaza.org/[email protected]

Compatibility

This is a patch release with no breaking changes. All existing code using
v0.7.5 will continue to work without modifications.

v0.7.5: slog v0.7.5 - Critical Bug Fix and Testing Improvements

Compare Source

slog v0.7.5 - Critical Bug Fix and Testing Improvements

CRITICAL BUG FIX:

  • Fix circular references in Loglet field traversal preventing infinite loops
  • Add IsZero() and GetParent() methods with circular reference protection
  • Enhance WithField/WithFields to prevent self-references via proper validation
  • Resolves application hangs when using reassignment patterns like loglet = loglet.WithField(...)

COMPREHENSIVE TESTING:

  • Add 1,762 lines of comprehensive test coverage (88.9% coverage)
  • New test files: context_test.go, std_test.go, writer_test.go, slog_test.go
  • Complete internal package testing with edge case validation
  • Extensive circular reference protection testing

BUILD SYSTEM IMPROVEMENTS:

  • Refactor coverage system with individual module targets (coverage-)
  • Update Codecov integration with improved file naming and merging
  • Add merge_coverage.sh helper for proper profile aggregation
  • Improve POSIX compliance and cross-platform compatibility
  • Enhanced build system modularity and debugging capabilities

DOCUMENTATION & QUALITY:

  • Enhanced internal package documentation with usage patterns and warnings
  • Add internal/doc.go package-level documentation
  • Update README.md with improved examples
  • Clean spell check dictionary and fix documentation examples

DEPENDENCY UPDATES:

  • Update darvaza.org/core to v0.17.4 (latest stable)
  • Update all project dependencies to current versions

This patch release addresses a critical reliability issue that could cause
application hangs, while significantly improving test coverage and build
system robustness. Fully backward compatible with no breaking changes.

v0.7.4

Compare Source

v0.7.4 - 2025-07-15

Fixed
  • Fixed typo in Panic level documentation (slog.go:11)
Enhanced
  • Testing Framework: Separated compliance and stress testing frameworks for better handler testing
  • Build System: Added comprehensive tooling (Codecov, ShellCheck, LanguageTool, CSpell)
  • CI/CD: Split build and test workflows for better performance
  • Documentation: Strengthened development guidelines and testing documentation
Internal
  • Enhanced monorepo coverage tracking with per-module support
  • Added bidirectional adapter testing infrastructure
  • Improved whitespace normalization and code quality tools
  • Added UndefinedLevel support for message filtering
Dependencies
  • No dependency changes for core module

v0.7.2

Compare Source

v0.7.1

Compare Source

v0.7.0

Compare Source

v0.6.2

Compare Source

v0.6.1

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Contributor Author

renovate bot commented Mar 10, 2025

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 7 additional dependencies were updated
  • The go directive was updated for compatibility reasons

Details:

Package Change
go 1.22 -> 1.23.0
golang.org/x/mod v0.17.0 -> v0.26.0
golang.org/x/net v0.34.0 -> v0.43.0
golang.org/x/sync v0.10.0 -> v0.16.0
golang.org/x/sys v0.29.0 -> v0.35.0
golang.org/x/text v0.21.0 -> v0.28.0
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d -> v0.35.0
google.golang.org/protobuf v1.35.2 -> v1.36.5

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Note

Free review on us!

CodeRabbit is offering free reviews until Fri Nov 07 2025 to showcase some of the refinements we've made.

Comment @coderabbitai help to get the list of available commands and usage tips.

@renovate renovate bot force-pushed the renovate/darvaza branch from 2391b2b to dcecde9 Compare March 24, 2025 19:45
@socket-security
Copy link

socket-security bot commented Mar 24, 2025

@renovate renovate bot force-pushed the renovate/darvaza branch 2 times, most recently from 3a86a12 to fbf9ab2 Compare April 6, 2025 02:10
@renovate renovate bot force-pushed the renovate/darvaza branch from fbf9ab2 to 33f256e Compare June 3, 2025 18:55
@renovate renovate bot force-pushed the renovate/darvaza branch 4 times, most recently from c120705 to bf951a1 Compare July 6, 2025 21:52
@renovate renovate bot force-pushed the renovate/darvaza branch 3 times, most recently from 5328041 to c8c2ca0 Compare July 18, 2025 18:54
@renovate renovate bot force-pushed the renovate/darvaza branch 5 times, most recently from 786f7ff to e2e228e Compare August 4, 2025 21:00
@renovate renovate bot force-pushed the renovate/darvaza branch from e2e228e to 6a7adb0 Compare August 8, 2025 21:03
@renovate renovate bot force-pushed the renovate/darvaza branch 4 times, most recently from ad20351 to c7fa70f Compare August 21, 2025 06:46
@renovate renovate bot force-pushed the renovate/darvaza branch from c7fa70f to baa9b6e Compare August 28, 2025 02:04
@renovate renovate bot force-pushed the renovate/darvaza branch 2 times, most recently from 58b4d44 to 4ccb863 Compare September 7, 2025 21:33
@renovate renovate bot force-pushed the renovate/darvaza branch from 4ccb863 to 6498d99 Compare October 28, 2025 01:59
@renovate renovate bot force-pushed the renovate/darvaza branch from 6498d99 to c0e9c45 Compare November 6, 2025 19:05
@renovate
Copy link
Contributor Author

renovate bot commented Dec 15, 2025

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 7 additional dependencies were updated
  • The go directive was updated for compatibility reasons

Details:

Package Change
go 1.22 -> 1.23.0
golang.org/x/mod v0.17.0 -> v0.26.0
golang.org/x/net v0.34.0 -> v0.43.0
golang.org/x/sync v0.10.0 -> v0.16.0
golang.org/x/sys v0.29.0 -> v0.35.0
golang.org/x/text v0.21.0 -> v0.28.0
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d -> v0.35.0
google.golang.org/protobuf v1.35.2 -> v1.36.5

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