Skip to content

Review follow-ups for the User-Agent change - #7

Merged
jvmvik merged 1 commit into
masterfrom
review-followups
Dec 1, 2026
Merged

jvmvik merged 1 commit into
masterfrom
review-followups

Conversation

@jvmvik

@jvmvik jvmvik commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Follow-ups from the review of #6, before tagging v1.2.0. No new features.

Changes

  • Image API keeps the caller's source. Report client usage in the User-Agent header, not source #6 stopped forwarding a constructor source to the upload form. The README says a caller's source is sent as given, and serpapi-ruby forwards it. It is sent again; a call source overrides it. New unit test.
  • The live source test now checks something. serpapi.com never echoes source, so the old test passed before Report client usage in the User-Agent header, not source #6 too. It now looks up an unknown archive id, a free 404, and reads the sent URL from lastError(): the caller's source must appear once and the library must add none.
  • The offline User-Agent capture test also runs with .persistent = false, like serpapi-ruby's spec.
  • CHANGELOG: the User-Agent entry moves from Features to Behavior changes, next to the source entries.
  • README: the coverage figure is updated to this PR's CI run (with SERPAPI_KEY), and the source note mentions image uploads.

Testing

  • zig build lint: pass
  • zig build test: 46/46 (1 new)
  • zig build itest: 23/23
  • zig build oobt (search and image upload), zig build doc: pass

Out of scope

  • Release steps for v1.2.0:
    • README install pins v1.1.0 → v1.2.0
    • the release date in the tagged commit
    • REVIEW Q1–Q16 sign-off
  • SDK SPEC F8/F8b (outside this repo)
  • Platform-name normalisation across SDKs (owner decision)

🤖 Generated with Claude Code

- Image API: a constructor `source` is sent in the upload form again, as
  the README says and serpapi-ruby does; a call `source` overrides it
- The live `source` test now reads the sent URL from lastError() on a free
  archive 404 and fails if the library adds its own `source` or a caller's
  is duplicated; the old one passed before the change too
- The offline User-Agent capture test also runs without a persistent
  connection
- CHANGELOG: the User-Agent entry moves to Behavior changes, next to the
  `source` ones

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jvmvik
jvmvik merged commit 8083ed2 into master Dec 1, 2026
3 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