FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: testing architecture + rename apps/example → apps/integration by gmaclennan · Pull Request #143 · digidem/comapeo-core-react-native · GitHub

docs: testing architecture + rename apps/example → apps/integration - #143

Merged
gmaclennan merged 14 commits into
mainfrom
docs/testing-architecture
Jun 23, 2026
Merged

docs: testing architecture + rename apps/example → apps/integration#143
gmaclennan merged 14 commits into
mainfrom
docs/testing-architecture

Conversation

gmaclennan commented Jun 23, 2026
edited
Loading

Copy link
Copy Markdown
Member

Starts the testing/CI documentation requested separately from #142, renames the integration-test app, refreshes the stale docs, and removes a vestigial test suite that was creating folder-layout confusion. Draft — for review.

1. docs/TESTING.md (new) — the maintainer-facing why

  • The seven test layers, what each verifies, and where the sources live.
  • §2.1 The two test apps — apps/integration hosts compiled native test targets (XCTest + androidTest/JVM, layers 3–6) and doubles as the dev app; apps/e2e hosts an in-app JS suite driven by Maestro on BrowserStack (layer 7).
  • A workflow → trigger → check-context map, §3.1 enumerating every e2e-reusable job, the merge queue + required-checks model (skipped-but-required gotcha, the always-reporting e2e / Gate), when the expensive e2e runs, and the secrets/trust boundary. Intra-doc §-refs are anchor links.

CONTRIBUTING.md stays the how-to; points at the new doc.

2. Rename apps/example → apps/integration (full)

Directory (history-preserving git mv), app.json name/slug, iOS bundle id + Android package → com.comapeo.core.integration, the Expo-derived iOS scheme → corereactnativeintegration, all path refs, the config plugins, the injected Kotlin package id. Check-context names left unchanged so the ruleset needs no edit. Also fixed pre-existing stale paths (open:ios/open:android, the iOS failure-dump log path).

3. Refresh the stale docs

  • agents.md (predated the apps/ reorg, referenced a top-level example/): tree now shows apps/integration + apps/e2e + maestro/; Testing section points at docs/TESTING.md; dropped the "canonical" wording.
  • e2e/README.md: removed (see §4) — local-run guidance now lives in docs/TESTING.md.

4. Resolve the e2e/ ↔ maestro/ layout confusion

The top-level e2e/ folder ran integration tests (against apps/integration) while the real e2e suite lives in maestro/ + apps/e2e — backwards. Investigated whether the e2e/.maestro flows earned their keep: they were the original local Maestro POC (untouched since #3), never in CI, and fully redundant — lifecycle/IPC is gated by the instrumented tests (ServiceLifecycleTest, NodeJSIPCTest); the full real-device path is gated by the apps/e2e BrowserStack suite. Their only unique coverage was a throughput number on a throwaway demo UI.

So, rather than rename dead weight:

  • Deleted e2e/.maestro/ (5 flows) + e2e/run-e2e.sh.
  • Moved the still-useful local runner → scripts/run-instrumented-tests.sh; repointed apps/integration's test:android* scripts (and dropped the now-broken e2e:android).
  • The top-level e2e/ folder is gone; maestro/e2e.yaml is now the sole, unambiguous Maestro flow.
  • docs/TESTING.md now documents running both suites locally — instrumented via the script (§8), and the e2e suite on a local Android emulator via expo run:android + maestro test maestro/e2e.yaml (§7.2); iOS stays BrowserStack-only.

Validation

actionlint clean; shellcheck clean on the moved runner (one pre-existing style nit left as-is); JSON valid; 0 residual old-identifier tokens and 0 dangling refs to the deleted suite; the runner kept its +x bit; all doc anchors and relative links resolve. The rename's real proof is CI — android-tests.yml/ios-tests.yml build and run against the renamed app on this PR.

Sequencing

The e2e gate + run-e2e label behaviour the docs describe is introduced by #142; this PR should land with or after it. Did not migrate docs/build-architecture-plan.md (separate follow-up).

🤖 Generated with Claude Code

The workflow set has grown (lint, android, ios, three e2e workflows,
pr-title, release) and the cross-cutting models — the required merge
queue, the single e2e gate, the secrets/trust boundary, the cost
controls on the paid device suite — were only legible by reading every
workflow's inline comments.

Add docs/TESTING.md as the maintainer-facing architecture doc: the seven
test layers and where each lives, a workflow→trigger→check map, the merge
queue + required-checks model (including the skipped-but-required gotcha
and the always-reporting gate), when the expensive e2e runs, the trust
boundary for Dependabot/fork PRs, and the BrowserStack e2e mechanics.

CONTRIBUTING.md stays the how-to; point it at the new doc and update its
merge-queue section for the e2e-in-the-queue / `run-e2e` strategy.

The e2e gate + `run-e2e` behaviour is introduced by #142; this doc
describes that target state and should land with or after it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
github-actions Bot added the documentation Improvements or additions to documentation label Jun 23, 2026
gmaclennan force-pushed the docs/testing-architecture branch from 42c8433 to a65fb62 Compare June 23, 2026 10:42
…o apps

Addresses review feedback on docs/TESTING.md:

- Add §3.1 enumerating every e2e-reusable job (changes, build-android,
  build-ios, the three uploads, the two test jobs, gate) with the
  holds-secrets / runs-PR-code split — the Build (Android)/(iOS) jobs
  were previously collapsed into "nested build/run jobs". Note
  e2e-trusted's remove-label / reset-on-push hygiene jobs too.
- Turn intra-doc §N references into anchor links to the headers.
- Add §2.1 "The two test apps" contrasting apps/example (compiled native
  XCTest/androidTest targets, run by xcodebuild/Gradle — layers 3–6)
  with apps/e2e (in-app JS suite driven by Maestro on BrowserStack —
  layer 7), and flag that apps/example is misleadingly named.
- Note the stale root open:ios/open:android scripts (point at example/,
  not apps/example/).
The app's main job is hosting the native integration-test targets (iOS
XCTest, Android instrumented/JVM) that android-tests.yml and ios-tests.yml
run; "example" undersold that and invited confusion with apps/e2e (the
separate Maestro/BrowserStack device-test app). Rename it to apps/integration
and carry the rename through every identifier:

- Directory (git mv, history preserved).
- app.json name/slug → core-react-native-integration; iOS bundle id and
  Android package → com.comapeo.core.integration. The Expo-derived iOS
  scheme/workspace becomes corereactnativeintegration accordingly.
- All path references: android-tests.yml, ios-tests.yml, dependabot.yml,
  babel.config.cjs, CONTRIBUTING.md, docs.
- The with-ios-tests / with-android-tests plugins and the injected
  tests/android Kotlin (package id).
- The local Maestro helpers (e2e/.maestro/*.yaml, e2e/run-e2e.sh) and
  e2e/run-instrumented-tests.sh, which targeted the example bundle id /
  a non-existent top-level example/ dir.

Also fixes pre-existing stale paths uncovered on the way: the root
open:ios/open:android scripts pointed at example/ (now apps/integration),
and ios-tests.yml's failure-dump grepped example/ios/xcodebuild-test.log
instead of the apps/integration/ios/ path the test actually writes.

Check-context names (e.g. "Integration Tests (Example App)") are left
unchanged so the branch ruleset's required checks keep matching.
gmaclennan changed the title docs: testing & CI architecture (docs/TESTING.md) docs: testing architecture + rename apps/example → apps/integration Jun 23, 2026
Both predated the apps/ reorg and referenced a top-level example/ app.

agents.md: update the directory tree to show apps/integration + apps/e2e
(and maestro/), point the Testing section at docs/TESTING.md, fix every
example/ path and "example app" reference to apps/integration, and drop
the "canonical" wording.

e2e/README.md: rewrite as a focused guide to the local helper scripts
(run-instrumented-tests.sh, run-e2e.sh) that points to docs/TESTING.md
for the architecture. Removes the stale Maestro-Cloud CI block, the
Node 18 prerequisite, the example/ paths, and the per-test tables that
had drifted — the test directories are the source of truth.

(agents.md and AGENTS.md are the same file on a case-insensitive FS;
git tracks agents.md.)
gmaclennan added the run-e2e Run the full BrowserStack e2e on this PR (otherwise it runs only in the merge queue) label Jun 23, 2026
…ripts/

The top-level e2e/ folder ran integration tests (against apps/integration),
while the real end-to-end suite lives in maestro/ + apps/e2e — a confusing
inversion. The e2e/.maestro flows + run-e2e.sh were the original local
Maestro POC (untouched since #3), never wired into CI, and fully redundant:
the lifecycle/IPC behaviour they exercised is gated by the instrumented
tests (ServiceLifecycleTest, NodeJSIPCTest), and the full real-device path
is gated by the apps/e2e BrowserStack suite. Their only unique coverage was
a throughput number on a throwaway demo UI.

- Delete e2e/.maestro/ (5 flows) and e2e/run-e2e.sh.
- Move e2e/run-instrumented-tests.sh → scripts/run-instrumented-tests.sh
  (the local Android instrumented-test runner; same depth, paths unchanged).
- Drop the now-broken apps/integration `e2e:android` script and repoint
  `test:android` / `test:android:unit` at scripts/.
- e2e/README.md is removed; local-run guidance now lives in docs/TESTING.md
  (§7.2 runs the e2e suite locally; §8 the cheap layers + instrumented).
- Update agents.md, CONTRIBUTING.md, and the sentry plan for the new path.

Result: no e2e/ ↔ maestro/ inversion, one fewer test app's scaffolding to
maintain, and maestro/ is unambiguously the sole e2e flow.
…ture

* origin/main:
  docs: document running iOS e2e on a local simulator
  ci: drop single-value matrix on instrumented tests so the gated check reports
  ci: report PR-title lint in the merge queue so it can be required
  ci: defer slow native test jobs to the merge queue
  ci: run e2e in the merge queue, not on every PR
  ci: skip BrowserStack e2e on config-/docs-only PRs via an e2e gate
  feat: add defaultOnlineStyleUrl Expo plugin prop
…146 local iOS e2e)

After merging main, square the docs with what actually shipped:

- #142 landed a shared detect-heavy-ci.yml that gates the *heavy native*
  suites too (Instrumented Tests, Integration Tests, iOS Device Build) on
  the same merge-queue / run-e2e / docs-skip logic as e2e — they skip as
  passing when gated out. Only the fast suites (JVM unit, Swift package,
  lint) stay always-on. Update the §3 workflow map, the §4.2 gate
  discussion (native suites use skipped=passing; only e2e needs the
  always-reporting gate), the §5 "always-on" claim + run-e2e label scope,
  and the CONTRIBUTING merge-queue section.
- #146 corrected the iOS-e2e-can't-run-locally claim: it runs fine on a
  simulator via `expo run:ios` (local signing → keychain works); the
  BrowserStack-only failure was the unsigned device archive. Rewrite §7.2
  to cover local iOS + Android via maestro/e2e.local.yaml.
- Drop the stale "ruleset change lands with #142" note — the swap to the
  single `e2e / Gate` required check is done.
- Add detect-heavy-ci.yml and maestro/e2e.local.yaml to the references.
gmaclennan marked this pull request as ready for review June 23, 2026 12:57
…ighten prose

Per review:
- Reframe layer 6 (iOS device build) as a real test — it tests that the app
  builds for a physical device (links the device xcframework slice + runs
  Xcode's embed step), which the simulator integration tests never exercise.
  Explain why there's genuinely no Android equivalent: Android addons are bare
  .so files packaged into the APK and dlopen'd at runtime, with no per-library
  signing or build-time link/embed step, so the only device-ABI failure mode is
  a runtime one the layer-7 device run already covers. Note CI builds with
  signing disabled, so it verifies link+embed, not real signatures.
- Clarify layer 7 includes its own build steps (build-android / build-ios).
- Correct the cost framing: BrowserStack isn't billed per minute — it's limited
  by the parallel-session quota. Real timings (from recent runs): the device run
  is ~2 min/platform; the app builds dominate (~8-9 min each), not 15-25 min.
- Rewrite the "GitHub has a sharp edge" paragraph and §6.1 for directness.
- Remove references to build-architecture-plan.md and the rollout "Phase N"
  language so the doc is self-contained and durable.
gmaclennan enabled auto-merge June 23, 2026 13:43
gmaclennan added this pull request to the merge queue Jun 23, 2026
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jun 23, 2026
gmaclennan and others added 2 commits June 23, 2026 20:37
Resolve the two e2e/ runner conflicts (main incidentally fixed their stale
`example/` → `apps/example/` paths in the rootkey-migration PR, both files this
branch had already removed/moved):
- e2e/run-e2e.sh: kept deleted — this branch removed the vestigial local Maestro
  suite (the e2e/.maestro flows it drives are gone too).
- scripts/run-instrumented-tests.sh: kept this branch's moved version
  (apps/integration paths); main's change was only the superseded example path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ture

* origin/main:
  ci(android): pre-install NDK with retry to fix corrupt-zip flake
  Release v1.0.0-pre.4
gmaclennan enabled auto-merge June 23, 2026 19:40
gmaclennan added this pull request to the merge queue Jun 23, 2026
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jun 23, 2026
gmaclennan enabled auto-merge June 23, 2026 20:14
gmaclennan disabled auto-merge June 23, 2026 20:15
gmaclennan enabled auto-merge June 23, 2026 20:16
gmaclennan added this pull request to the merge queue Jun 23, 2026
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 23, 2026
gmaclennan removed the run-e2e Run the full BrowserStack e2e on this PR (otherwise it runs only in the merge queue) label Jun 23, 2026
gmaclennan enabled auto-merge June 23, 2026 21:48
gmaclennan added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit b9d1570 Jun 23, 2026
24 checks passed
gmaclennan deleted the docs/testing-architecture branch June 23, 2026 22:18
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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL