Conversation
Search-deal revenue is the browser business model with a decade-long proof, and Candoa could not accept a deal if one were offered: the engine attributes traffic by a code it issues and reads from the search URL, and there was nowhere to put one. Searches now carry the code in force. It travels with the parameter name the engine chose — DuckDuckGo reads t, Ecosia tt — and with the date the deal ends, because deals lapse and a code that outlives its deal tags searches for a partner no longer paying for them. Codes come from configuration rather than the binary, so one can be issued, rotated, or revoked without a release. Partner codes are a required argument to searchURL rather than an optional one. A call site that forgot them would still search, so the mistake would be invisible and would cost revenue silently; the compiler asks instead. That turned up searchInNewTab building a search URL without going through the service, which now routes through it like every other search. No code exists yet, so none is sent and a search URL is byte-for-byte what it was — asserted, not assumed. Refs #37 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of candoa-cloud#37 — the precondition for search-deal revenue.
Why
An engine pays for traffic it can attribute to us, and the only thing that reaches it is the search URL. So the code it issues has to ride in that URL.
SearchProvider.searchURL(for:)appended just the query, which meant Candoa could not have accepted a deal if one were offered today.What changed
SearchPartnerCodecarries the engine's own parameter name — DuckDuckGo readst, Ecosia readstt— because the name is the engine's choice, not ours.It also carries an expiry, which is not decoration: search deals lapse. Vivaldi moved its default off Bing in some regions when that deal ended. A code that outlives its deal tags every search for a partner who is no longer paying for it. Codes arrive as configuration rather than living in the binary, so one can be issued, rotated, or revoked without shipping a release.
Partner codes are a required argument, deliberately
A call site that forgot an optional
partnerCodes:would still return a perfectly good search URL — the search works, the money quietly doesn't. That failure is invisible in testing and in production. Making it required means the compiler asks at every site.It immediately earned its keep:
WebViewCoordinator.searchInNewTabwas building a search URL directly off the provider rather than throughNavigationService, so it would have been the one path silently dropping the code. It now routes through the service like every other search.Behaviour today: none
No deal exists, so
partnerCodesis.none, nothing is appended, and a search URL is byte-for-byte identical to before. That's asserted rather than assumed —testSearchURLIsUnchangedWithNoPartnerCodepins the exact query items.No privacy-policy change ships with this, because nothing new leaves the machine yet. The policy line lands with the commit that activates a real code, per the standing rule.
Tests
CandoaTests: 101 passed (94 + 7), Debug build clean.tvstt)Next in #37
Search volume per provider, and the privacy-policy line that ships with it. Also open: the default is Google, the one major engine that doesn't pay independents — so most search volume currently routes to the non-paying option.
🤖 Generated with Claude Code