Generate the privacy page from the app repo's PRIVACY.md - #8
Merged
Merged
Conversation
The policy existed twice: PRIVACY.md in submersion-app/submersion and a hand-maintained privacy/index.html here. Nothing kept them in step, and they had drifted badly. The app repo's policy was rewritten to disclose Dropbox, S3, iCloud, Garmin, Adobe and roughly fifteen coordinate services, to correct claims about encryption that is off by default, and to disclose that dive buddy photos, phone numbers and certification scans leave the device. This page was still serving the 2026-03-06 text, which names Google Drive as the only destination. That gap matters beyond tidiness: the Play listing links this page, and Google checks the Data safety declaration against the hosted policy. A page contradicting the declaration is a policy violation. PRIVACY.md is now the single source. - tools/render_legal.py converts the Markdown and replaces only the region between the legal:meta and legal:body markers, so the head, navigation, intro, back link and footer stay hand-owned. Dependency-free so the Actions job needs no install step, and deliberately limited to the constructs the policy actually uses. - The renderer keeps this page's existing conventions: h2 ids matching the old hand-written anchors so inbound links still resolve, tables wrapped in legal__table, and `**Term** - description` bullets rendered as `<strong>Term:</strong> description`. - sync-legal.yml regenerates on a daily schedule, on manual dispatch, on a repository_dispatch the app repo can send, and on template changes. It commits only when the output differs, so the push trigger cannot loop. - On a pull request the same workflow runs --check instead of writing, so a hand edit inside the generated region fails the PR with an explanation rather than being silently reverted by the next sync. The page in this commit is the current policy, regenerated and verified against the live PRIVACY.md. Terms of Service has the same duplication. The renderer already handles it; wiring terms/index.html needs only its markers and a second workflow step.
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.
Summary
The privacy policy existed in two places with nothing keeping them in step:
PRIVACY.mdinsubmersion-app/submersion, and a hand-maintainedprivacy/index.htmlhere. They had drifted badly.The app repo's policy was rewritten to disclose Dropbox, S3, iCloud, Garmin,
Adobe and roughly fifteen coordinate services, to correct claims about
encryption that is off by default, and to disclose that dive buddy photos,
phone numbers and certification card scans leave the device. This page was
still serving the 2026-03-06 text, which names Google Drive as the only
destination.
That is not cosmetic. The Play Store listing links this page, and Google checks
the Data safety declaration against the hosted policy. A page that contradicts
the declaration is a policy violation.
PRIVACY.mdis now the single source.How it works
tools/render_legal.pyconverts the Markdown and replaces only the regionbetween the
legal:metaandlegal:bodymarkers. The head, navigation, introparagraph, back link and footer stay hand-owned. The renderer keeps this page's
conventions: tables wrapped in
legal__table, and a bolded term followed by adash rendered as
<strong>Term:</strong>.It is dependency-free on purpose, so the Actions job needs no install step.
.github/workflows/sync-legal.ymlregenerates the page on a daily schedule, onmanual dispatch, on a
repository_dispatchthe app repo can send, and when therenderer or template changes. It commits only when the output differs, so the
push trigger cannot loop. On a pull request it runs
--checkinstead ofwriting, so a hand edit inside the generated region fails the PR rather than
being silently reverted by the next sync.
Verification
PRIVACY.mdandverified with
--checkagainst a fresh fetch from the workflow's own URLFollow-up
Terms of Service has the same duplication, and generating it revealed that the
first version of this renderer would break existing anchors. Both are handled
in the follow-up PR.