Skip to content

Developer guide: four more sentences that promise code and do not deliver - #5813

Merged
shai-almog merged 5 commits into
masterfrom
dg-more-code-blocks
Sep 14, 2026
Merged

Developer guide: four more sentences that promise code and do not deliver#5813
shai-almog merged 5 commits into
masterfrom
dg-more-code-blocks

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Four more holes in the check-missing-code-blocks ratchet, in two chapters.

Deep-Link Routing — the payloads are generated

The chapter twice says "the plugins AasaBuilder / AssetLinksBuilder produces the payload:" and then shows nothing.

Both payloads are now what the builders actually write. I ran them against the chapters own example — the /users/:id route it documents in its routing table, a Services ID, two signing fingerprints — and committed the output.

Worth noticing in the result: addRouterPattern("/users/:id") emits { "/": "/users/*" }. That conversion is described in prose two sections earlier and is now visible.

Advertising — the consent order

The chapter promised the initialize → consent → load order and then went straight on to describe AdConfigs compliance flags as though the reader had just seen them.

The listing is restored with the reason the order matters beside it: requestConsent presents the GDPR form and, on iOS, the App Tracking Transparency prompt, and both need the SDK up — so consent sits between initialize and the first load rather than before either. It also shows the canRequestAds() branch, because consent withheld is a normal outcome, not an error.

Advertising — the one that could not be restored

Each providers install() lives in its own cn1lib (cn1-admob, cn1-applovin, cn1-unity-levelplay, cn1-ads-mock), none of which docs/demos depends on. A compiled listing would mean taking a build dependency for one static no-arg call.

The sentence now names all four calls inline and points at the table directly above it that gives the provider class for each — no information lost, and no promise left unkept.

Gates

  • check-missing-code-blocks ratchet 34 → 30
  • validate-guide-snippets.py — 1110 include-backed blocks
  • the new snippet compiles under JDK 17 against codenameone-core (it caught two constant names: AdConfig.TAG_FALSE and RATING_G, not the longer spellings)
  • structure (122 documents), xrefs (1691 anchors), links, unused images, alt text — clean
  • asciidoctor --failure-level WARN and asciidoctor-pdf — clean
  • Vale 0 alerts; LanguageTool status: ok, total: 0 on both chapters
  • capitalization, control characters, copyright headers — clean

…iver

Deep-Link Routing twice says "the plugin's <Builder> produces the payload:"
and then shows nothing. Both payloads are now what the builders write:
AasaBuilder and AssetLinksBuilder were run against the chapter's own
example -- the /users/:id route it documents, a Services ID, two signing
fingerprints -- and their output committed. Note addRouterPattern turns
/users/:id into /users/*, which is the conversion the chapter describes in
prose and now shows.

Advertising promised the initialize-then-consent-then-load order and then
described AdConfig's flags as if the reader had just seen them. That
listing is restored, with the reason the order matters beside it:
requestConsent presents the GDPR form and, on iOS, the App Tracking
Transparency prompt, and both need the SDK up, so consent sits between
initialize and the first load rather than before either.

The fourth is not restorable and is rewritten instead. Each provider's
install() lives in its own cn1lib, none of which the docs module depends
on, so a compiled listing would mean a build dependency for one static
call. The sentence now names the four calls and points at the table right
above it that gives the class for each.

Ratchet drops from 34 to 30.

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

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T18:01:50.204781Z 2768f5f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 882ce45d71

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

shai-almog and others added 2 commits September 13, 2026 20:44
The Android half of deep linking said to set android.xintent_filter "with
a verified intent filter for your domain" and left the reader to work out
what that is. The hint's value is injected into the manifest verbatim, so
it is the whole element with escaped line breaks -- not something to guess
at -- and the three parts that decide whether it works are now spelled out:
autoVerify is what makes Android fetch the assetlinks.json beside it rather
than show an app chooser, the data element needs the https scheme and host,
and the hint holds one value so a second filter goes in the same string.

This is also what the Authentication chapter's Apple-on-Android note points
at: the Services ID callback is an HTTPS URL, so the custom scheme
registered there cannot receive it and this is the recipe that can.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AdManager.initialize reports false when no provider was installed or the
network's own initialize failed, and the listing ignored the flag. With no
provider AdConsent reports consent as not required and canRequestAds()
answers true, so the recommended order walked straight into loadAds() with
nothing behind it -- the one arrangement where the graceful degradation the
chapter describes hides the mistake instead of surfacing it.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56a8181fd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Both are weaker than the chapter implied, and both are in the providers
rather than in the listing, so the listing keeps its shape and the chapter
now says what it is looking at.

The readiness flag is not a report that the network came up. Every provider
-- AdMob, AppLovin, LevelPlay -- hands the config to its native bridge and
calls back true on the next line, while the SDK behind it initializes
asynchronously. An invalid SDK key therefore surfaces as failing loads
later, never as false here.

And requestConsent presents a form only where the provider implements one.
AdMob does, through Google's User Messaging Platform. AppLovin MAX and Unity
LevelPlay read consent from an external CMP and the IAB TCF string, so their
native requestConsent reports STATUS_NOT_REQUIRED immediately and
canRequestAds() always answers true -- which means on those two the EEA/UK
consent flow is the CMP's and has to be in place before the first load.
A reader following the recommended order without knowing that would have
believed the framework was collecting consent it never collects.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 115248250b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/developer-guide/Deep-Links-Routing.asciidoc Outdated
On iOS 14+ the AdMob provider starts ATTrackingManager with an empty
completion handler and fires its consent callback from the UMP path
independently, so the callback can arrive while the system tracking prompt
is still on screen. The recommended order in this chapter then loads ads
before tracking authorization is settled, which is the one thing that
ordering exists to prevent. Documented as a warning with what to do
instead. The provider itself needs a change -- the UMP request belongs
inside the ATT completion handler -- and that is a cn1-admob fix rather
than a docs one.

And the App Link paragraph said an unverified filter still matches and asks
the user each time. From Android 12 that is not what happens: an unverified
web link goes to the default browser and the filter never sees it until the
user turns the association on by hand. A reader who skipped autoVerify on
the strength of the old sentence would have found deep links silently not
working at all.

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

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@github-actions

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@shai-almog
shai-almog merged commit 6d09bbe into master Sep 14, 2026
14 checks passed
@shai-almog
shai-almog deleted the dg-more-code-blocks branch September 14, 2026 01:40
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