Skip to content

Releases

Naravel 0.2.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 20:47
60e6452

Added

  • Routing: IThrottleStore and ThrottleDecision, the store the throttle middleware counts attempts in (PDR-024, stage R31). The default store is the in-process limiter and throttle behaves exactly as before (counters per application instance, empty after a restart, same X-RateLimit-*, Retry-After and 429); registering your own IThrottleStore replaces it. No shared store ships yet: it follows in a separate package.
  • Routing: how throttle treats a registered IThrottleStore that fails (PDR-024, stage R31). A call that throws or takes longer than RoutingOptions.Throttle.StoreTimeout (default 250 ms) opens one breaker per store for Throttle.BreakerPeriod (default 5 s); in that time the store is not called and each policy's ThrottleFailureMode decides the request: DegradeToLocal (the default: this instance's in-process limiter with the policy's numbers), FailClosed (503 with Retry-After, set per policy with the new ConfigureThrottlePolicy overload) or FailOpen (no limit, explicit opt-in). After the period one request probes the store. A client that disconnects is not a failure, and no fallback decision admits it: under FailOpen a request whose client has already gone ends with the cancellation instead of being admitted (DegradeToLocal already ended it that way, and FailClosed refuses it). New counters on the Naravel.Routing meter: naravel.routing.throttle (policy, outcome) and naravel.routing.throttle.store_failures (policy, reason). The default in-process store has no timeout or breaker and behaves as before.
  • Routing.Cache: a new package, Naravel.Routing.Cache, with AddNaravelSharedThrottle(storeName): an IThrottleStore that counts the throttle middleware's attempts in a named Naravel.Cache store, so every application instance that uses the same store shares one quota (PDR-024, stage R31). One atomic ICacheStore.IncrementAsync call per request and no lock; the key is throttle:{SHA-256 of the partition key}:{window index}, so it has a fixed length and no client address in it. The window is aligned to the clock (floor(UtcNow / window)): a caller can use the limit on both sides of a boundary (up to twice the limit in a short time) and the instances need clocks within the usual NTP skew. Policies, throttle:login, the X-RateLimit-* headers and the 429 are unchanged, and a backend that is down or slow follows each policy's failure mode. The memory store is process-local, so it counts per process like the default. The package depends on Naravel.Routing and Naravel.Cache; Routing does not reference Cache. Nothing is released by this entry: a new package id and new Routing API need a version bump and a tag.
  • CI: .github/scripts/check-package-metadata.py fails a package with fewer than four tags, and .github/scripts/check-package-readmes.py fails a package whose README has a relative link or image (nuget.org does not render relative images, and a README cannot be corrected after the version is published). Both follow Microsoft's NuGet package guidance.
  • CI: .github/scripts/consumer-smoke.py installs every packed package into a consumer outside the repository the way a user does (Naravel.* from the packed files only, a fresh package cache), builds it, loads every Naravel assembly and runs the Naravel.AotSmoke program against the packages. It runs in the pack job, where a failure fails the build and so also stops a release; the manual workflow package-smoke.yml runs it against a version published on nuget.org, with an optional exclude list for packages that were added after that version (0.1.1 predates Naravel.Routing.Cache). Nothing else consumed a packed package before.
  • CI: .github/workflows/release-notes.yml creates the GitHub Release for each version tag from that version's section of this changelog (.github/scripts/release-notes.py, whose self-test the pins job runs), so every package's NuGet "Release notes" link leads somewhere. It runs when a tag is pushed and when main changes, where it also creates the release of any version tag that has none (the v0.1.1 tag predates it); pull requests get a read-only dry run. It is separate from the NuGet publish job and never edits an existing release.
  • CI: .github/scripts/check-doc-names.py reports names in README.md, docs/en and docs/nuget that the source does not define: an Add* method that no PublicAPI baseline lists, a dotnet add package Naravel.* id that no project under src/ has, and a configuration key (in a json block, a Section:Key path or a Section__Key variable) that no code reads. Microsoft, BCL and illustration names are listed with a reason in .github/scripts/doc-names.allow. It is report only (the findings go to the job summary and the step passes); --strict makes it fail. It checks that a name exists, not what it means.
  • CI: .github/scripts/check-api-shipped.py fails a version-tag build, and with it the publish, while any project's PublicAPI.Unshipped.txt still has an entry, and names each such project, so a release cannot go out with API that the baseline still calls unreleased (stage R33). It does not run on pull requests or on main, where those files hold the next release's work; its self-test runs in the pins job on every pull request.
  • Repository: README.md is now a short front page (banner, a Laravel-to-Naravel comparison, a runnable quickstart, the module table, status and links). The install matrix, the registration calls, the sample-app notes and every module's example moved, unchanged, to docs/en/getting-started.md, and docs/en/modules.md, and docs/README.md indexes every guide. No code or package content changed.

Changed

  • Docs: docs/en/foundation.md says how to avoid a driver being created after its manager was disposed (stop the callers first, let the factory stop on the token the manager cancels, do not let Dispose throw), and that the failure of the disposal of such a driver is not reported, which is intended (the owner's choice of 2026-11-10; AUDIT D-84, stage R32.T02). No code changes.
  • Repo: AGENTS.md now lists "never invent an API, a package or a configuration key; verify it in the code or the docs first" as hard rule 13, with the place to check each kind of name in this repository. The longer "Evidence before claims" section stays as the detail.
  • Docs: English is now the only maintained documentation language. The Persian guides, decision records, README.fa.md, ROADMAP.fa.md, CONTRIBUTING.fa.md and CODE_OF_CONDUCT.fa.md are removed (they stay in git history), roadmap/check.py fails if a localized file comes back or a maintained page links to a removed one, and AGENTS.md and the pull request template carry the new operating rules: source evidence for every API and example, links closed in the same change, a default pull request size, no weakened tests.
  • Docs: the module guides are being rewritten with complete, source-checked examples, the exact error messages and a testing section. Done so far: Naravel.Foundation, the database dialect contract, Naravel.Cache (a runnable memory-only quickstart, every operation with its return value, how BlockAsync waits and releases, creating an asynchronous-only store, an Errors section), Naravel.Events (a runnable quickstart, an Errors section including the queued-listener messages; the duplicate testing and example sections were merged), Naravel.Mail and Naravel.Notifications (a runnable quickstart each, an Errors section with the exact messages, copies and a sender of your own for a mailable), Naravel.Queue (a quickstart that runs on the memory driver with an in-process worker, an Errors section; the Redis walkthrough is kept as its own section), Naravel.Queue.Coordination (a quickstart that runs on the memory queue and the memory Cache, the names the middleware give to the Cache, an Errors section with the exact messages, and a Testing section with examples that are run), Naravel.Database (a quickstart on in-memory SQLite, an Errors section with the exact messages, a complete DatabaseFake example and a note on testing against SQLite in memory), Naravel.Pagination (one runnable quickstart with the three kinds of page that replaces the incomplete "complete example", an Errors section with the exact messages including the cursor ones, and a Testing section), Naravel.Filesystem (a runnable quickstart on a local disk, an Errors section with the exact messages, the archive example, and a Testing section with a complete StorageFake example; the old "Complete example" section is gone), Naravel.Routing (a runnable quickstart, an Errors section with the exact messages that says which mistakes are reported at startup, which only on the first request and which not at all, and a Testing section with a middleware test, a TestServer test and how to test an expired signed link; the Complete example is kept), Naravel.Scheduling (a runnable worker quickstart that needs no cache, an Errors section with the exact messages and the log lines of a failing run, and a Testing section with the guards under two fakes and a task that needs services; the Complete example is kept) and Naravel.Broadcasting (a runnable quickstart that needs no sign-in and no Events registration, and an Errors section with the exact messages, including what a client sees when the hub refuses and what is only logged, and a Testing section with the fake, a rule kept in a method and a hub test on TestServer). The DocsExampleTests.cs files in the Cache, Mail, Notifications, Queue, Queue.Coordination, Database, Pagination.EntityFrameworkCore, Filesystem, Routing, Scheduling and Broadcasting test projects run the new snippets and assert the documented messages.
  • Docs: the "Honest about guarantees" line of README.md no longer says that route throttling is always process-local. It is by default; the routing guide describes the shared store an...
Read more

Naravel 0.1.1

Choose a tag to compare

@github-actions github-actions released this 03 Nov 06:02
e1f5f3e

Added

  • Repository: an Install section and status note in README.md / README.fa.md (which package to install and which registration call to make for each module), CI/NuGet/license badges, a rewritten CONTRIBUTING.md with a Persian twin, GitHub issue forms (bug report, feature request), a pull request template, and SECURITY.md (private reporting through GitHub, supported versions, what counts as a vulnerability). Private vulnerability reporting must be enabled in the repository settings for the reporting link to work.
  • CI: .github/scripts/check-package-metadata.py checks the nuspec of every packed package (description, license, URLs, tags, copyright against LICENSE, release notes for the package's own version, icon) in the pack job and, before the NuGet login, in the publish job. Package READMEs stay with check-package-readmes.py.

Changed

  • NuGet metadata for every package under src/: Copyright matches LICENSE, PackageReleaseNotes links to the GitHub release for the package's tag and to this changelog, every package has PackageTags, Naravel.Foundation has a description, and an icon is wired up as soon as a PNG exists at build/icon.png. NuGet cannot edit a pushed version, so 0.1.0 on nuget.org keeps the metadata it was pushed with; this ships with the next version.
  • Public API baseline: the API published as 0.1.0 is now recorded in each project's PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt is empty, so the PublicApiAnalyzers rules fail the build when a later change removes or alters a member of the 0.1.0 API. New public API is added to Unshipped as before. No source or behavior changed.

Fixed

  • NuGet packages: every package now carries its own package-root README.md (docs/nuget/<PackageId>.md) and declares it with PackageReadmeFile, so the package pages no longer report a missing README. Naravel.Routing showed the repository overview and the Queue packages packed it without declaring it. CI now checks every packed package (.github/scripts/check-package-readmes.py, which replaces the Foundation-only check). The Naravel.Filesystem package description now describes storage disks instead of repeating the Foundation wording. This applies to the next package version; the published 0.1.0 packages are unchanged.
  • Naravel.Foundation: include the Foundation-specific guide as the package-root NuGet README and declare it with PackageReadmeFile. CI now checks both the nuspec metadata and the embedded README.md so the package page does not regress to a missing-README warning.

All Naravel packages share this version, for example Naravel.Foundation 0.1.1.