Skip to content

chore(tools): retire the dead Swift/Kotlin parity-governance stack - #25

Merged
DX23876 merged 1 commit into
mainfrom
chore/retire-parity-governance-tooling
Sep 17, 2026
Merged

DX23876 merged 1 commit into
mainfrom
chore/retire-parity-governance-tooling

Conversation

@DX23876

@DX23876 DX23876 commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Independent of #23/#24 — this gap pre-dates both, confirmed present on plain main (f0d530d51) with no sync or feature changes involved.

Why: the fork retired the cross-platform parity contract when android/ was removed on 2026-08-14 (docs/FORK_GUIDE.md: "It does not bind here"), but the tooling that enforces exactly that contract — parity_ledger.py/parity_ratchet.py, three baseline JSON files, six test files, and a whole undocumented .github/workflows/parity-governance.yml — was never retired alongside it. Every commit that ever touched these files was upstream's own (Fanboynz/Bernd Helm); nothing here was fork-owned, and none of it can pass without the android/ tree it audits.

Removed wholesale (97 of the 103 removed tests were pure scanner-logic unit tests against synthetic fixtures — still green, removed anyway because a scanner for a contract this fork doesn't enforce has no job left). The 6 that actually broke were the repository-acceptance tests comparing the checked-in baseline against current sources, and tests asserting specific android/ files exist.

Also removed: Tools/test_steps_i18n.py::test_android_all_shipped_locales (same shape, smaller — reads a nonexistent android/…/steps_view.xml). test_ios_all_shipped_locales is untouched.

Also fixed, not removed — found while re-verifying the suite green, unrelated regression: Tools/test_i18n_audit.py::test_two_word_brand_is_flagged. 0c18441e4 ("make training load evidence-aware", 3 days ago) added "Apple Health" to BRAND_PHRASES so a brand-only string stops being flagged as a translation gap — but the one test naming that exact string kept asserting the pre-change behavior and was never updated. Renamed and flipped to match the current, deliberate behavior, plus a new sibling test pinning the one case the module's own comment promises but nothing tested ("Apple Health sync" still has "sync" to translate, so it must stay flagged). Verified as a genuine code/test mismatch by reading the exempting logic and its git blame — not assumed to be an environment artifact.

Verified: python3 -m unittest discover -p "test_*.py" in Tools/ — 124 tests (was 278), 0 failures, 16 skipped (unchanged skip set). doc_comment_lint.py and i18n_audit.py --ci origin/main both exit 0. No Swift/Kotlin/product source touched.

🤖 Generated with Claude Code

…he Android steps-locale test, fix a stale brand-phrase assertion

The fork retired the cross-platform parity contract when `android/` was removed on 2026-08-14
(docs/FORK_GUIDE.md: "It does not bind here"), but the tooling that enforces exactly that contract
was never retired alongside it. It kept absorbing upstream's daily re-derivation churn on every
sync while silently failing here, because its own `KOTLIN_GLOBS` point at
`android/app/src/main/java/com/noop/...` — a directory this fork doesn't have.

**Removed wholesale**, confirmed to have no callers or references outside itself
(`Tools/parity_ledger.py`, `Tools/parity_ratchet.py`, `Tools/issue_ref.py`,
`Tools/parity_dispositions.json`, `Tools/parity_ledger_baseline.json`, `Tools/parity_twin_map.json`,
their six test files under `Tools/tests/`, and `.github/workflows/parity-governance.yml`, which is
not even in this fork's own documented CI table). Every commit touching these files was upstream's
own (`Fanboynz`/`Bernd Helm`, re-deriving the baseline after their Swift/Kotlin changes) — nothing
here was ever fork-owned, and none of it can pass without the tree it audits.

97 of the 103 removed tests were pure unit tests of the scanner's own lexical logic against synthetic
fixtures (no repo dependency, all green) — removed anyway because a scanner for a contract this fork
doesn't enforce has no job left to unit-test. The other 6 were the repository-level acceptance tests
that actually broke: comparing the checked-in baseline/authority against current sources
(`test_parity_governance_acceptance.py`), and asserting specific `android/` files exist
(`test_rr_legacy_preservation_contract.py`). Both already failed on `main` before today, independent
of the current upstream-sync PR — confirmed by running them against `f0d530d51`.

**`Tools/test_steps_i18n.py`**: same shape, smaller — `test_android_all_shipped_locales` read
`android/app/src/main/res/values/steps_view.xml`, which doesn't exist. Removed just that method (and
the now-unused `RES` constant / `ElementTree` import); `test_ios_all_shipped_locales` is untouched
and still the real coverage for this fork's one shipped platform.

**`Tools/test_i18n_audit.py::test_two_word_brand_is_flagged`**: found while re-running the full suite
green, unrelated to the above and NOT a removal — a real 3-day-old regression. `0c18441e4` ("make
training load evidence-aware") added "Apple Health" to `BRAND_PHRASES` so a brand-only string is no
longer flagged as a translation gap, but the one test that named this exact string kept asserting the
PRE-change behavior and was never updated. Renamed to `test_two_word_brand_phrase_is_not` with the
assertion flipped to match the now-current, deliberate behavior, plus a new sibling
(`test_brand_phrase_with_a_real_word_is_still_flagged`) pinning the one case the module's own comment
promises but nothing tested: "Apple Health sync" still has "sync" to translate, so it must stay
flagged. Not a locale artifact — verified as a genuine code/test mismatch by reading the exempting
logic and its git blame, not assumed.

Verified: `python3 -m unittest discover -p "test_*.py"` in Tools/ — 124 tests (was 278), 0 failures,
16 skipped (unchanged skip set). `doc_comment_lint.py` and `i18n_audit.py --ci origin/main` both
exit 0. No Swift/Kotlin/product source touched; this is Tools/ and CI config only.
Copilot AI balanced review requested due to automatic review settings September 17, 2026 10:18

Copilot AI 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.

🔵 Needs a closer look

Retired parity documentation must be removed or rewritten, and the required analysis-migration declaration is missing.

Pull request overview

This PR retires obsolete Swift/Kotlin parity-governance tooling after Android removal and updates localization tests.

Changes:

  • Removes parity tooling, metadata, tests, and CI workflow.
  • Removes obsolete Android localization coverage.
  • Updates Apple Health i18n expectations.
  • Analysis migration required: no.
File summaries
File Reviewed change
Tools/tests/test_rr_legacy_preservation_contract.py Removes Android preservation tests.
Tools/tests/test_parity_ledger.py Removes parity ledger tests.
Tools/tests/test_parity_governance_acceptance.py Removes governance acceptance tests.
Tools/tests/test_parity_disposition_kinds.py Removes disposition tests.
Tools/tests/test_parity_artefact_filter.py Removes artifact-filter tests.
Tools/tests/test_parity_arity.py Removes parity arity tests.
Tools/test_steps_i18n.py Removes Android localization coverage.
Tools/test_i18n_audit.py Updates Apple Health translation tests.
Tools/parity_twin_map.json Removes parity metadata.
Tools/parity_ratchet.py Removes the governance ratchet.
Tools/parity_ledger.py Removes the parity scanner.
Tools/parity_ledger_baseline.json Removes the parity baseline.
Tools/parity_dispositions.json Removes the disposition registry.
Tools/issue_ref.py Removes parity issue-reference handling.
.github/workflows/parity-governance.yml Removes the parity governance workflow.
Review details

Suppressed comments (2)

.github/workflows/parity-governance.yml:1

  • This retires the executable parity stack but leaves Tools/PARITY_GOVERNANCE.md behind. That document still presents python3 Tools/parity_ledger.py and parity_ratchet.py as required local checks and describes the parity workflow as active, so following the repository documentation now produces missing-file errors and contradicts the fork's retired-contract policy. Please delete it or rewrite it as an explicit historical/retirement note.
    .github/workflows/parity-governance.yml:1
  • The PR description is missing the repository-required explicit Analysis migration required: no declaration. This tools/test retirement does not alter scoring or persisted derived values, but the repository rule requires a yes/no record for every local feature or upstream update; please add it to the PR description.
  • Files reviewed: 14/15 changed files
  • Comments generated: 0
  • Review effort level: Lite (auto)

Note

Copilot is running an experiment and ran this review at Lite.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

DX23876 added a commit that referenced this pull request Sep 17, 2026
…b's two broken tests

Two of PR #23's three fixable failing checks, fixed directly on this branch (the third,
github-advanced-security, is GitHub's own Copilot code-scanning backend failing with
"CAPIError: 400 The requested model is not supported" — a platform-side error, nothing in this
repo can address it).

**`check` (i18n audit, exit 1 → 0).** Upstream's sync itself introduced 12 new UI literals with no
catalog entry: 9 shared goal-placeholder examples (CoachGoalOnboardingFlow.swift /
CoachGoalView.swift, "e.g. Run 5k without stopping" etc., 18 call sites collapsing to 9 unique
keys), a breathing-pace format string (BreathingView.swift, `%.0f / %.0fs`), and two
interpolated `String` literals the audit's `swift_returned_copy_literals` rule catches even though
they never pass through `String(localized:)` (`SleepModel.swift`'s cross-midnight date span,
`WorkoutSelectionScreen.swift`'s accessibility label) — matching how every existing catalog entry
of this exact shape (`'HR eased %lld → %lld over %@.'`, `'%@ workout'`) is already handled here.
Verified the compiled catalog key for the interpolated pair by reading `swift_catalog_pattern`'s
own conversion rule (each `\(...)` → a placeholder, static text preserved verbatim) rather than
guessing: `"%@ → %@"` (both interpolations are String-typed, matching Swift's own
`String(localized:)` convention) and `"%@ workout, %@"` (reusing the exact "workout" wording each
locale already uses in the sibling `'%@ workout'` entry). All 9 languages, added to both the
catalog and `Tools/translations/`.

**`linux-capture` job's "Run Tools/ tests" step (2 failures → 0).** Cherry-picked the two isolated
test fixes from #25 (`chore/retire-parity-governance-tooling`, independently reviewed there) onto
this branch: `test_steps_i18n.py`'s Android-locale test removed (this fork ships no `android/`
tree; the iOS test is untouched), and `test_i18n_audit.py`'s stale `test_two_word_brand_is_flagged`
corrected to match `0c18441e4`'s deliberate `BRAND_PHRASES` change. #25 is base-`main`, independent
of this sync, so this branch needs the same two-line fix in its own right rather than waiting on it.

Verified locally, reproducing each CI step exactly: `python3 Tools/i18n_audit.py --ci main` exits
0. The `linux-capture` job's own two steps — `unittest discover` in `Tools/linux-capture` (234
tests) and the top-level `unittest -v <six explicit modules>` in `Tools/` (124 tests, matching the
job's `find . -maxdepth 1` module list exactly, not a broader recursive discovery) — both pass
clean, 0 failures, 16 skipped (unchanged skip set). `doc_comment_lint.py` exits 0.
@DX23876
DX23876 merged commit 346e568 into main Sep 17, 2026
8 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.

2 participants