Skip to content

fix: align Firebase guidance with the documented google-services.json recommendation - #86

Open
jfishman1 wants to merge 1 commit into
mainfrom
jon/fid-firebase-guidance
Open

jfishman1 wants to merge 1 commit into
mainfrom
jon/fid-firebase-guidance

Conversation

@jfishman1

Copy link
Copy Markdown
Collaborator

The setup, credentials and verify skills tell the agent that google-services.json is “NOT required” and call the OneSignal docs that recommend it “a known bug.” That text came from the July 31 vendor baseline (803f234) — months before Android SDK 5.11.0 existed. It predates the guidance it contradicts.

What’s actually true now

On OneSignal Android SDK 5.11.0+, when the host app has its own default FirebaseApp whose sender ID and applicationId project number both match the sender configured in OneSignal, push registers through the customer’s Firebase project rather than OneSignal’s shared one. The docs now recommend google-services.json for all new Android integrations, and require it when firebase_messaging_installation_id_enabled is true in the merged manifest — which a dependency such as Braze 43.0.0+ can set through manifest merging.

What the agent does differently

Very little, deliberately. It still must not add the file: it can’t produce one (that comes from the customer’s Firebase console), and applying the Gradle plugin without a file to process fails the build with File google-services.json is missing. What changes is that it tells the user the file is recommended instead of asserting it’s unnecessary, leaves an existing setup alone, and stops when the FID manifest flag is set — naming subscription status -32 as the consequence.

The verifier check was inverted

android_no_stray_google_services warned whenever google-services.json existed without other Firebase client usage — exactly the state of a project that followed the docs. It flagged correct setups. Replaced with android_google_services_plugin_without_file, which catches the real build-breaker: plugin applied, no file. Raised warn → error, since it fails the build. skills/setup/SKILL.md’s description of the self-check updated to match.

references/platform-matrix.md is included because skills/setup/android.md says “Do not contradict platform-matrix.md” — leaving it would have made the two disagree.

Relation to #85

Both touch skills/setup/android.md, in different regions — this is the Firebase section near the top, #85 is the composite-login section further down. This branch applied cleanly to the pre-#85 base, so no conflict expected. #85 is already reviewed; merge that first.

Testing: the verifier change has not been exercised against a fixture yet — a project that passed before can now fail, since the new check is error rather than warn. Worth running verify_integration.py on a native Android project both with google-services.json present and with the plugin applied but no file, before merge.

Refs SDK-5427.
https://linear.app/onesignal/issue/SDK-5427/agent-plugin-pin-android-setup-to-the-released-fid-capable-sdk-and

… recommendation

The skills told the agent that google-services.json is "NOT required" and
called the OneSignal docs recommending it "a known bug." That text came from
the July 31 vendor baseline (803f234), months before Android SDK 5.11.0
existed. It is no longer accurate.

What changed upstream: on 5.11.0+, when the host app has its own default
FirebaseApp whose sender ID and applicationId project number both match the
sender configured in OneSignal, push registers through the customer's Firebase
project instead of OneSignal's shared one. The docs now recommend
google-services.json for all new Android integrations, and require it when
firebase_messaging_installation_id_enabled is true in the merged manifest
(a dependency such as Braze 43.0.0+ can set it through manifest merging).

The agent's behavior barely changes: it still must not add the file, since it
cannot produce one -- that comes from the customer's Firebase console -- and
applying the Gradle plugin without a file to process fails the build. What
changes is the framing, that the agent now tells the user the file is
recommended rather than asserting it is unnecessary, and that it stops when
the FID manifest flag is set.

Skills updated: setup/android.md, setup/cross-platform.md (4 places),
setup/SKILL.md, credentials/SKILL.md, credentials/api-uploaded-credentials.md,
verify/SKILL.md, verify/platform-verification.md. references/platform-matrix.md
is updated too because setup/android.md defers to it; leaving it would have
made the two contradict.

verify_integration.py: android_no_stray_google_services warned whenever
google-services.json existed without other Firebase client usage -- exactly the
state of a project that followed the docs, so it flagged correct setups.
Replaced with android_google_services_plugin_without_file, which catches the
real build-breaking case: the Google Services plugin applied with no file to
process, which fails with "File google-services.json is missing." Raised from
warn to error because it breaks the build.

Touches setup/android.md in the Firebase section near the top of the file, away
from the composite-login region changed in #85. Applied cleanly to the pre-#85
base, so the two should not conflict.

Refs SDK-5427.
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