Aggregated changelog for the Alfred package family.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Premature process exit:
SystemClock.sleep()no longer callstimer.unref(). The unref'd timer could become the sole event-loop handle during retry backoff or timeout races, causing Node.js to exit before the operation completed. Callers that need graceful shutdown should useAbortSignalinstead.
- Version bump to keep lockstep alignment with the Alfred package family (no API changes).
- Version bump to keep lockstep alignment with the Alfred package family (no API changes).
- Version bump to keep lockstep alignment with the Alfred package family (no API changes).
- Test suite no longer depends on real time (deterministic clocks only).
- Bulkhead soft-shrink behavior documented and tested for live limit updates.
- Release workflow updated for OIDC publishing (no API changes).
- Version bump to keep lockstep alignment with the Alfred package family (no API changes).
- Repository converted to a monorepo with
@git-stunts/alfredas a workspace package. - Release tooling updated; no API changes in the core package.
- Rate-Limiting Policy: New
rateLimit()policy for throughput control using token bucket algorithm.- Configurable
rate(requests/sec) andburstcapacity - Optional
queueLimitfor backpressure (default: reject immediately) RateLimitExceededErrorwithrateandretryAfterproperties- Full TestClock support for deterministic testing
- Telemetry events:
rateLimit.acquire,rateLimit.queued,rateLimit.rejected
- Configurable
- Policy.rateLimit(): Fluent API support for rate limiting
- Cloudflare Workers Support: Alfred now verified to work in Cloudflare Workers runtime via Miniflare tests.
- Cloudflare Workers CI: Docker-based Miniflare tests run in CI to ensure continued compatibility.
- Browser Support: Alfred now officially supports modern browsers (Chrome 85+, Firefox 79+, Safari 14+, Edge 85+).
- Browser Demo: Interactive "Flaky Fetch Lab" (
npm run demo:web) demonstrates resilience policies running in a browser. - Playwright Tests: Browser compatibility tests verify retry, timeout, bulkhead, and circuit breaker work in Chromium.
- Resolution Timing Documentation: New README section documenting when dynamic options (functions) are resolved for each policy—per attempt, per admission, per event, or per execute.
- Resolution Timing Tests: Comprehensive test suite verifying option resolution timing with call counters.
- Hedge Safety Guardrails: Documentation for safe hedge usage—idempotent operations only, AbortSignal handling, bulkhead composition.
- Hedge Recipes:
hedgeReadpattern for database/cache operations,happyEyeballsFetchfor multi-endpoint racing. - Full JSDoc Coverage: All source files and TypeScript declarations now have complete documentation.
- JSR Module Docs: Entrypoints now use
@moduletag with examples for proper JSR documentation. - JSR Publish Config: Fixed exclude list to only publish required files (was including examples, scripts, etc.).
- TypeScript Declarations:
testing.d.tsupdated with missing types (HedgeOptions,MetricsSink,Resolvable,Policy.hedge). - Example in index.d.ts: Fixed incorrect compose example to use proper Policy fluent API.
- ROADMAP.md: v0.5 and v0.6 milestones marked complete.
- Policy Algebra Documentation: New README section explaining
wrap,or, andracecomposition operators with real-world examples. - README Smoke Tests:
examples/readme-smoke.test.jsvalidates all README code snippets actually work. - Timeout Clock Injection:
timeout()now acceptsoptions.clockfor deterministic testing withTestClock.
- README Quick Start: Fixed invalid JS in quote, corrected compose/fallback/race examples to use Policy objects.
- ROADMAP.md: Comprehensive milestone breakdown from v0.5 through v1.0 with user stories, requirements, and test specs.
- Abortable Retries: Pass an
AbortSignalvia thesignaloption to cancel retries and backoff sleeps early. The signal is also forwarded to the operation function.
- MetricsSink: A specialized telemetry sink for aggregating numerical metrics (latencies, counts).
- Telemetry Metrics: Added
metricsproperty toTelemetryEventfor structured counter increments.
- Bulkhead Telemetry: Ensure queued executions emit success/failure metrics to match direct execution.
- Hedge Cancellation: Improved resource cleanup by implementing a strict cancellation check for scheduled hedges.
- Added GitHub Actions workflow for automated publishing with provenance.
- Improved JSR score by adding rich type documentation and metadata.
- Bulkhead Policy: Concurrency limiting with optional queueing to prevent resource exhaustion.
- Telemetry System: Composable sinks (
ConsoleSink,InMemorySink,MultiSink) for observing policy events. - Cross-Platform Support: Explicit support and testing for Node.js, Bun, and Deno.
- TypeScript Definitions: Official
index.d.tsfor type safety. - DevContainers: Development environments for Node, Bun, and Deno.
- Dockerized Testing: BATS-orchestrated integration tests for multiple runtimes.
- Refactored core policies into Classes for better state management and strict mode compliance.
- Improved
SystemClockto supportunref()across different runtimes for cleaner process exits.
- Various microtask timing issues in tests when using
TestClock.
- Initial release with
retry,circuitBreaker,timeout, andcompose. TestClockfor deterministic testing.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Version bump to keep lockstep alignment with the Alfred package family (no API changes).
- Audit-first command pipeline with attempt/result hooks.
- Auth provider hooks with allow-all and opaque-token helpers.
- Audit sinks for console and in-memory usage.
- Optional
includeRawflag to attach raw payloads to audit events.
- JSONL command channel fuzz-style test for randomized junk input handling.
alfredctlJSONL output integration test against the command channel.
- Canonical JSONL command envelope with strict validation helpers.
- Result envelope helpers plus JSONL encode/decode utilities.
alfredctlCLI for emitting JSONL commands.- JSONL command channel example and tests.
- Test suite no longer depends on real time (deterministic clocks only).
LivePolicyPlanbuilders for retry, bulkhead, circuit breaker, and timeout.ControlPlane.registerLivePolicyfor binding live stacks to registry paths.- Live policy examples and documentation.
- Live policy execution now returns Result envelopes (registry-read failures surface as Result errors).
- Full JSDoc and TypeScript documentation for all public APIs.
- Release workflow updated for OIDC publishing.
- Pin
@git-stunts/alfreddependency to an exact version to avoid publishingworkspace:*.
Adaptive<T>live values with version andupdatedAtmetadata.ConfigRegistrywith typed parsing/formatting and validation before apply.- Command router for
read_config,write_config, andlist_config.
- Initial package scaffold.