Skip to content

v1.1.0 beta.3 - #45

Merged
leogdion merged 8 commits into
mainfrom
v1.1.0-beta.3
Aug 13, 2026
Merged

leogdion merged 8 commits into
mainfrom
v1.1.0-beta.3

Conversation

@leogdion

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@leogdion, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e93bda1-33ea-4f43-8817-cf0443ae7c6c

📥 Commits

Reviewing files that changed from the base of the PR and between 3cb5885 and 7a77a37.

📒 Files selected for processing (77)
  • .agents/skills/claude-handoff/SKILL.md
  • .agents/skills/claude-handoff/agents/openai.yaml
  • .agents/skills/code-review/SKILL.md
  • .agents/skills/code-review/agents/openai.yaml
  • .agents/skills/codebase-design/DEEPENING.md
  • .agents/skills/codebase-design/DESIGN-IT-TWICE.md
  • .agents/skills/codebase-design/SKILL.md
  • .agents/skills/codebase-design/agents/openai.yaml
  • .agents/skills/diagnosing-bugs/SKILL.md
  • .agents/skills/diagnosing-bugs/agents/openai.yaml
  • .agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh
  • .agents/skills/grill-me/SKILL.md
  • .agents/skills/grill-me/agents/openai.yaml
  • .agents/skills/grill-with-docs/SKILL.md
  • .agents/skills/grill-with-docs/agents/openai.yaml
  • .agents/skills/grilling/SKILL.md
  • .agents/skills/grilling/agents/openai.yaml
  • .agents/skills/handoff/SKILL.md
  • .agents/skills/handoff/agents/openai.yaml
  • .agents/skills/implement/SKILL.md
  • .agents/skills/implement/agents/openai.yaml
  • .agents/skills/loop-me/SKILL.md
  • .agents/skills/loop-me/agents/openai.yaml
  • .agents/skills/research/SKILL.md
  • .agents/skills/research/agents/openai.yaml
  • .agents/skills/tdd/SKILL.md
  • .agents/skills/tdd/agents/openai.yaml
  • .agents/skills/tdd/mocking.md
  • .agents/skills/tdd/tests.md
  • .agents/skills/triage/AGENT-BRIEF.md
  • .agents/skills/triage/OUT-OF-SCOPE.md
  • .agents/skills/triage/SKILL.md
  • .agents/skills/triage/agents/openai.yaml
  • .claude/agent-notes.md
  • .claude/skills/claude-handoff
  • .claude/skills/code-review
  • .claude/skills/codebase-design
  • .claude/skills/diagnosing-bugs
  • .claude/skills/grill-me
  • .claude/skills/grill-with-docs
  • .claude/skills/grilling
  • .claude/skills/handoff
  • .claude/skills/implement
  • .claude/skills/loop-me
  • .claude/skills/research
  • .claude/skills/tdd
  • .claude/skills/triage
  • .github/workflows/AviaryInsights.yml
  • AGENTS.md
  • CLAUDE.md
  • CLAUDE.md
  • README.md
  • RELEASE_NOTES.md
  • Sources/AviaryInsights/Documentation.docc/AviaryInsights.md
  • Sources/AviaryInsights/IPAddress+Description.swift
  • Sources/AviaryInsights/IPAddress+Parsing.swift
  • Sources/AviaryInsights/IPAddress.swift
  • Sources/AviaryInsights/Plausible+PostEvent.swift
  • Sources/AviaryInsights/Plausible+URLSession.swift
  • Sources/AviaryInsights/Plausible.swift
  • Tests/AviaryInsightsTests/AviaryInsightsTests+Diagnostics.swift
  • Tests/AviaryInsightsTests/AviaryInsightsTests+ErrorHandling.swift
  • Tests/AviaryInsightsTests/AviaryInsightsTests+Headers.swift
  • Tests/AviaryInsightsTests/AviaryInsightsTests+Init.swift
  • Tests/AviaryInsightsTests/AviaryInsightsTests+Initialization.swift
  • Tests/AviaryInsightsTests/AviaryInsightsTests+PostEvent.swift
  • Tests/AviaryInsightsTests/AviaryInsightsTests.swift
  • Tests/AviaryInsightsTests/Event+TestHelpers.swift
  • Tests/AviaryInsightsTests/IPAddress+TestHelpers.swift
  • Tests/AviaryInsightsTests/IPAddressTests.swift
  • Tests/AviaryInsightsTests/MockTransport.swift
  • Tests/AviaryInsightsTests/Platform.swift
  • Tests/AviaryInsightsTests/Plausible+TestHelpers.swift
  • Tests/AviaryInsightsTests/Recorder.swift
  • Tests/AviaryInsightsTests/Revenue+TestHelpers.swift
  • Tests/AviaryInsightsTests/ThrowingTransport.swift
  • skills-lock.json
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v1.1.0-beta.3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

CI and others added 5 commits August 13, 2026 14:19
build-ubuntu and build-macos already give the brightdigit/swift-build step an
`id: build` and gate their coverage upload on
`steps.build.outputs.contains-code-coverage`. build-android and build-windows
did neither, so their coverage never reached Codecov even though Android
already runs tests (`android-run-tests: true`).

- Add `id: build` to the swift-build step in build-android and build-windows.
- Add the same gated Process Coverage / Upload to Codecov pair to both jobs.
  The gate makes them no-ops when the action reports no coverage, so neither
  job can regress.
- Normalize the one `if:` in build-ubuntu that was missing its `${{ }}`.

Closes #31

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The fire-and-forget postEvent swallowed every failure into
`print(error.localizedDescription)` — invisible to structured logging,
impossible to silence or redirect, and giving callers no way to react.

Adds an `onError: @sendable (any Error) -> Void` to Plausible, threaded
through the designated init, the transport init, and all three
URLSessionTransport convenience inits — mirroring how `diagnostics` already
works.

print stays the default. `Plausible.defaultErrorHandler` is public and is the
default parameter value, so existing behavior is byte-for-byte unchanged while
the handler is now visible, overridable, and suppressible with `{ _ in }`.

Errors arrive wrapped in OpenAPIRuntime.ClientError; its `underlyingError` is
the transport failure. Documented in README and DocC.

Closes #36

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Several badges were dead or pointed at the wrong project:

- Code Climate maintainability / tech-debt / issues all render as
  "codeclimate: retired badge" — the Quality product was sunset.
- The codebeat badge 404s, and its link pointed at MistKit, not AviaryInsights.
- The Actions badge query was malformed (`&?branch=main`), so it reported the
  wrong workflow state.
- The Twitter badge points at twitter.com, which no longer exists under that
  brand.

Removes the Code Climate, codebeat, Twitter, and Hound badges; fixes the
Actions badge query to `&branch=main`; gives the license, issues, Actions, and
Swift Package Index badges real alt text and click-through links.

Every surviving badge was fetched and confirmed to render.

Closes #32

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Applies Pattern A from the project's Swift Testing convention
(https://gist.github.com/leogdion/0806c2f41aeb2c77db6a4a846cf13c0f):
the parent suite carries the `Tests` suffix and stays empty, while each
concern lives in an `AviaryInsightsTests+<Concern>.swift` extension that
nests its own `@Suite` type. `AviaryInsightsTests` is now an empty
`@Suite("AviaryInsights") internal enum` with `Post Event`,
`Initialization`, `Diagnostics` and `Error Handling` reporting under it.

Removes the file-level `#if canImport(OpenAPIURLSession)` that wrapped
the whole initialization extension. A file-level `#if` deletes the suite
from the test list rather than reporting it skipped, so the platform
check now lives in one place — `Platform.isOpenAPIURLSessionAvailable` —
and is applied once as a suite-level `.enabled(if:)` trait. The
defensive `#else Issue.record(...)` branches stay inside each test body:
they should never be reached, but they say so if the gate ever stops
matching the guards.

Test helpers now extend the production types they serve rather than the
suite: `Plausible.makeClient(...)` and `Plausible.assert(events:...)` in
`Plausible+TestHelpers.swift`, `MockTransport.Request.headerValue(_:)`
on the recorded request, and `Event`/`Revenue` fixtures renamed to
`+TestHelpers`. `ErrorRecorder` and `DiagnosticsRecorder` were the same
lock-guarded `@unchecked Sendable` class twice over, so they collapse
into one generic `Recorder<Value>`.

Two fixes to the payload assertion:

- `zip` stops at the shorter sequence, so a run that recorded zero
  requests looped zero times and passed having asserted nothing. The
  helper now requires `requests.count == events.count` up front.
- The batch size was `Int.random(in: 10...20)`; it is now a fixed
  `eventCount` so a failure reproduces from the test name alone. WASI
  keeps a smaller batch.

Verified by mutation: deleting the `sentRequests.append(...)` call in
`MockTransport.send` now fails all three Post Event tests on the count
assertion, where before the batch test passed vacuously.

Closes #29
Closes #37

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
openapi.yaml already declared both optional headers and the generated client
already accepted them, but the Plausible wrapper hardcoded only User-Agent, so
callers could not reach two of the POST /event features.

Both postEvent overloads now take `forwardedFor: [IPAddress]? = nil` and
`debugRequest: Bool? = nil`. `forwardedFor` is a list because Plausible
documents X-Forwarded-For as a comma-separated set of addresses of which it
uses the first valid one; the elements are joined with `,`. Both default to
nil, in which case the header is not sent at all.

Adds a public `IPAddress` value type rather than taking a bare String, so a
malformed address is rejected at construction instead of silently reaching the
wire. No dependency offers a portable one — Network.IPv4Address is Darwin-only
and this package ships Linux/Windows/Android/WASI — so it is hand-written in
pure Swift, avoiding inet_pton, which is not dependable on WASI. It is
byte-backed, so equal addresses compare equal however they were spelled and
`description` always renders the RFC 5952 canonical form. There is
deliberately no ExpressibleByStringLiteral: a literal conformance would have to
trap on bad input.

No openapi.yaml change and no regeneration — Generated/Types.swift already had
X_hyphen_Forwarded_hyphen_For and X_hyphen_Debug_hyphen_Request.

Also exposes headerFields on MockTransport.Request so the new tests can assert
what actually reached the wire.

Known issue: the generated client percent-encodes header values, so the `:` of
an IPv6 address and the `,` joining a multi-address list both arrive escaped
(`203.0.113.7%2C198.51.100.42`). See #42; the README and DocC page carry the
caveat and the tests use single IPv4 addresses so they do not depend on it.

Closes #30

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.29897% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.09%. Comparing base (3cb5885) to head (7a77a37).

Files with missing lines Patch % Lines
Sources/AviaryInsights/Plausible+PostEvent.swift 43.75% 9 Missing ⚠️
Sources/AviaryInsights/Plausible.swift 88.00% 3 Missing ⚠️
Sources/AviaryInsights/IPAddress+Parsing.swift 98.85% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #45       +/-   ##
===========================================
+ Coverage   81.44%   95.09%   +13.65%     
===========================================
  Files           7       10        +3     
  Lines          97      306      +209     
===========================================
+ Hits           79      291      +212     
+ Misses         18       15        -3     
Flag Coverage Δ
6.1 98.05% <98.23%> (+16.61%) ⬆️
6.2 98.05% <98.23%> (+16.61%) ⬆️
6.3 98.05% <98.23%> (+16.61%) ⬆️
6.4 98.05% <98.23%> (+16.61%) ⬆️
ios18.5 97.70% <97.70%> (+16.25%) ⬆️
ios26.5 98.05% <98.23%> (+16.61%) ⬆️
jammy 98.05% <98.23%> (+16.61%) ⬆️
macos 98.05% <98.23%> (+16.61%) ⬆️
noble 98.05% <98.23%> (+16.61%) ⬆️
spm 98.05% <98.23%> (+16.61%) ⬆️
tvos18.5 97.70% <97.70%> (+16.25%) ⬆️
tvos26.5 79.80% <54.54%> (-1.64%) ⬇️
visionos2.5 97.70% <97.70%> (+16.25%) ⬆️
visionos26.5 98.05% <98.23%> (+16.61%) ⬆️
watchos11.5 97.70% <97.70%> (+16.25%) ⬆️
watchos26.5 41.34% <0.00%> (-40.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Refresh RELEASE_NOTES for this beta and sync README/DocC feature
lists with onError, forwardedFor/debugRequest, and IPAddress.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leogdion
leogdion merged commit bdd1faa into main Aug 13, 2026
46 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.

1 participant