@1aboveio/skills 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +1 -1
- package/.codex-plugin/resources.json +157 -154
- package/README.md +1 -1
- package/package.json +5 -5
- package/skills/app-dev/airflow/SKILL.md +1 -1
- package/skills/app-dev/android-development/SKILL.md +127 -0
- package/skills/app-dev/android-development/references/android-conventions.md +117 -0
- package/skills/app-dev/{android-foundation → android-development}/references/ci.md +10 -6
- package/skills/app-dev/{android-foundation → android-development}/references/diagnosis.md +44 -15
- package/skills/app-dev/android-development/references/feature-work.md +186 -0
- package/skills/app-dev/android-development/references/framework-choice.md +88 -0
- package/skills/app-dev/{android-foundation → android-development}/references/gotchas.md +43 -6
- package/skills/app-dev/android-development/references/init.md +126 -0
- package/skills/app-dev/android-development/references/setup.md +389 -0
- package/skills/app-dev/android-development/references/workspace.md +156 -0
- package/skills/app-dev/android-development/scripts/init.mjs +477 -0
- package/skills/app-dev/app-debug/SKILL.md +1 -1
- package/skills/app-dev/better-auth/SKILL.md +1 -1
- package/skills/app-dev/data-catalog/SKILL.md +53 -16
- package/skills/app-dev/data-catalog/scripts/persist-conventions-core.mjs +231 -21
- package/skills/app-dev/data-catalog/scripts/persist-conventions.mjs +12 -1
- package/skills/app-dev/data-quality/SKILL.md +1 -1
- package/skills/app-dev/ios-foundation/SKILL.md +2 -2
- package/skills/app-dev/monorepo/SKILL.md +1 -1
- package/skills/app-dev/nextjs-fullstack/SKILL.md +1 -1
- package/skills/app-dev/prisma-setup/SKILL.md +1 -1
- package/skills/app-dev/pyspark/SKILL.md +1 -1
- package/skills/app-dev/python-backend/SKILL.md +1 -1
- package/skills/app-dev/shadcn/SKILL.md +1 -1
- package/skills/app-dev/zod-v4/SKILL.md +1 -1
- package/skills/cicd/cloud-build/SKILL.md +1 -1
- package/skills/cicd/cloud-debug/SKILL.md +1 -1
- package/skills/cicd/cloud-deploy/SKILL.md +1 -1
- package/skills/cicd/docker/SKILL.md +1 -1
- package/skills/cicd/github-actions/SKILL.md +1 -1
- package/skills/cicd/github-flow/SKILL.md +10 -1
- package/skills/cicd/github-flow/scripts/persist-conventions-core.mjs +231 -21
- package/skills/cicd/github-flow/scripts/persist-conventions.mjs +18 -1
- package/skills/cicd/google-cloud/SKILL.md +1 -1
- package/skills/cicd/mergify/SKILL.md +1 -1
- package/skills/cicd/podman/SKILL.md +1 -1
- package/skills/content/article-review/SKILL.md +1 -1
- package/skills/content/article-to-image/SKILL.md +1 -1
- package/skills/content/flowchart-svg/SKILL.md +1 -1
- package/skills/content/image-gen/SKILL.md +1 -1
- package/skills/content/mermaid/SKILL.md +1 -1
- package/skills/content/wechat-article-writer/SKILL.md +1 -1
- package/skills/content/wechat-publisher/SKILL.md +1 -1
- package/skills/content/wechat-search/SKILL.md +1 -1
- package/skills/content/xai-search/SKILL.md +1 -1
- package/skills/core/distill-writing/SKILL.md +7 -1
- package/skills/core/doc-to-md/SKILL.md +1 -1
- package/skills/core/editorial-review/SKILL.md +1 -1
- package/skills/core/house-style/SKILL.md +1 -1
- package/skills/core/house-style/references/persistence.md +8 -3
- package/skills/core/house-style/scripts/init-guidance.mjs +1 -1
- package/skills/core/plain-language/SKILL.md +1 -1
- package/skills/core/polish-cn/SKILL.md +1 -1
- package/skills/core/reg-parser/SKILL.md +1 -1
- package/skills/core/terminology/SKILL.md +1 -1
- package/skills/core/terminology/references/init.md +11 -0
- package/skills/core/write-doc/SKILL.md +1 -1
- package/skills/core/write-report/SKILL.md +1 -1
- package/skills/engineering/better-review/SKILL.md +1 -1
- package/skills/engineering/e2e-test/SKILL.md +1 -1
- package/skills/engineering/engineering/SKILL.md +25 -4
- package/skills/engineering/engineering/references/init-scope.md +10 -3
- package/skills/engineering/engineering/references/scope-management.md +11 -0
- package/skills/engineering/engineering/scripts/init.mjs +65 -17
- package/skills/engineering/engineering/scripts/persist-conventions-core.mjs +231 -21
- package/skills/engineering/engineering/scripts/persist-conventions.mjs +48 -21
- package/skills/engineering/engineering-runtime/SKILL.md +1 -1
- package/skills/engineering/engineering-runtime/coherence/workflow.json +13 -13
- package/skills/engineering/ensure-coverage/SKILL.md +1 -1
- package/skills/engineering/golden-path/SKILL.md +1 -1
- package/skills/engineering/harness-runtime/SKILL.md +1 -1
- package/skills/engineering/resolve-issues/SKILL.md +1 -1
- package/skills/engineering/resolve-issues/references/exploration.md +1 -1
- package/skills/engineering/resolve-issues/references/review.md +27 -4
- package/skills/engineering/resolve-release/SKILL.md +1 -1
- package/skills/engineering/rush-issues/SKILL.md +1 -1
- package/skills/engineering/rush-release/SKILL.md +1 -1
- package/skills/engineering/test-quality/SKILL.md +3 -1
- package/skills/engineering/test-quality/scripts/persist-conventions-core.mjs +231 -21
- package/skills/engineering/test-quality/scripts/persist-conventions.mjs +13 -1
- package/skills/risk-compliance/compliance-audit/SKILL.md +1 -1
- package/skills/risk-compliance/contract-compare/SKILL.md +1 -1
- package/skills/risk-compliance/contract-review/SKILL.md +1 -1
- package/skills/risk-compliance/doc-authenticity/SKILL.md +1 -1
- package/skills/risk-compliance/fraud-detection/SKILL.md +1 -1
- package/skills/risk-compliance/payment-analysis/SKILL.md +1 -1
- package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +1 -1
- package/skills/risk-compliance/similar-domain/SKILL.md +1 -1
- package/skills/risk-compliance/tld-detection/SKILL.md +1 -1
- package/skills/app-dev/android-foundation/SKILL.md +0 -248
- package/skills/app-dev/android-foundation/references/delivery-focus.md +0 -31
- package/skills/app-dev/android-foundation/references/feature-work.md +0 -50
- package/skills/app-dev/android-foundation/references/setup.md +0 -188
- package/skills/app-dev/android-foundation/references/workspace.md +0 -81
- /package/skills/app-dev/{android-foundation → android-development}/LICENSE +0 -0
- /package/skills/app-dev/{android-foundation → android-development}/assets/android-ci-job.yml +0 -0
- /package/skills/app-dev/{android-foundation → android-development}/release-check.mjs +0 -0
- /package/skills/app-dev/{android-foundation → android-development}/scripts/device-run.sh +0 -0
- /package/skills/app-dev/{android-foundation → android-development}/scripts/workspace-runtime/bin/workspaces.mjs +0 -0
- /package/skills/app-dev/{android-foundation → android-development}/scripts/workspace-runtime/native-workspace.mjs +0 -0
- /package/skills/app-dev/{android-foundation → android-development}/scripts/workspace-runtime/workspace-lifecycle.mjs +0 -0
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: android-foundation
|
|
3
|
-
description: "Prove and debug Expo / React Native apps on an owned Android emulator. Use for stuck Android debugging, post-deploy startup or rendering failures, Metro answering while the app does not render, UiAutomator failures, missing controls, ADB drops, harness-test failures, APK builds, assigned or fresh SDK/NDK/JDK workspace setup, and native journey validation. Before fixing and rerunning or redispatching a failed Android CI job, reproduce its failing checkpoint off CI: a rerun is not a debugger. Diagnose existing setups without rebuilding the whole environment. NOT for workflow YAML, CI speed or runner design (github-actions), browser tests (e2e-test), iOS (ios-foundation), plain Jest component tests, or signing and store release."
|
|
4
|
-
release-version: 0.45.2
|
|
5
|
-
---
|
|
6
|
-
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
|
-
# Android foundation
|
|
8
|
-
|
|
9
|
-
Prove or debug a native Expo / React Native device journey using the repo's existing
|
|
10
|
-
build scripts, native project, harness and wrapper. Use `github-actions` for CI YAML
|
|
11
|
-
and runner integration. The CI template is a starting point; preserve existing workflows.
|
|
12
|
-
|
|
13
|
-
Pick the mode first:
|
|
14
|
-
|
|
15
|
-
- **Diagnosis:** an existing workspace or CI run fails or stalls. Follow
|
|
16
|
-
[Diagnosis](#diagnosis) first; a harness change does not automatically require a cold
|
|
17
|
-
setup. Re-run only the setup stages whose assumptions changed.
|
|
18
|
-
- **Setup proof:** a new workspace or CI job, or a toolchain, dependency or native
|
|
19
|
-
change that invalidates setup. Run every stage and write the
|
|
20
|
-
[evidence record](#evidence-record).
|
|
21
|
-
- **Feature work:** validating a product change in a workspace already set up. Follow
|
|
22
|
-
[Feature work](#feature-work): focused checks per candidate, targeted device checks
|
|
23
|
-
where needed, and integrated journeys at explicit checkpoints.
|
|
24
|
-
|
|
25
|
-
## Routing
|
|
26
|
-
|
|
27
|
-
| Step | Read |
|
|
28
|
-
| --- | --- |
|
|
29
|
-
| Workspace resolution, then shell snippets for every stage | [references/workspace.md](references/workspace.md), [references/setup.md](references/setup.md) |
|
|
30
|
-
| Stages 6–8 in one command | [scripts/device-run.sh](scripts/device-run.sh) |
|
|
31
|
-
| Adding the Android job to CI | [references/ci.md](references/ci.md), template [assets/android-ci-job.yml](assets/android-ci-job.yml) |
|
|
32
|
-
| Proving a product change on the emulator | [Feature work](#feature-work) |
|
|
33
|
-
| A stage failed or a worker appears stuck | [Diagnosis](#diagnosis), then [references/diagnosis.md](references/diagnosis.md) and [Triage](#triage) |
|
|
34
|
-
| Writing up setup proof | [Evidence record](#evidence-record) |
|
|
35
|
-
|
|
36
|
-
## Rules
|
|
37
|
-
|
|
38
|
-
- Resolve the workspace first; [references/workspace.md](references/workspace.md) owns
|
|
39
|
-
precedence: an assigned isolated workspace and candidate HEAD win, feature work, fixes and
|
|
40
|
-
diagnosis reuse the owned workspace, and standalone setup creates one managed workspace
|
|
41
|
-
only with no usable assignment. Read its actual HEAD; never substitute `origin/main`, a new
|
|
42
|
-
branch or another checkout, mutate a peer's checkout or symlink its writable `node_modules`.
|
|
43
|
-
- Tool shells keep no variables, functions or traps between calls. Write the environment
|
|
44
|
-
to `.cache/android-env.sh` once and source it at the start of every command. Use the
|
|
45
|
-
repo's existing owned-resource launcher. For a new local setup without one, use
|
|
46
|
-
`scripts/device-run.sh` for stages 6–8 in one command. Do not wrap an existing owner
|
|
47
|
-
with a second emulator/database lifecycle.
|
|
48
|
-
- Keep local writable caches private under `.cache/`: Gradle home, Android user/AVD
|
|
49
|
-
homes, temporary files, npm, node-gyp and pnpm. In CI, an already isolated runner slot
|
|
50
|
-
may provide those paths; verify its ownership contract rather than layering another
|
|
51
|
-
cache system on top. Never share writable state across concurrent owners.
|
|
52
|
-
- Read toolchain versions from the repo: the root `packageManager` and `engines`, the
|
|
53
|
-
native Gradle config, and the CI preflight. The repo is the source of truth, not this skill.
|
|
54
|
-
- Check that every required SDK component (platform, build-tools, NDK, CMake,
|
|
55
|
-
platform-tools, emulator, system image) is already installed. If one is missing, stop and
|
|
56
|
-
provision it separately. Never upgrade or install into a shared SDK during a journey;
|
|
57
|
-
build with `-Pandroid.builder.sdkDownload=false`.
|
|
58
|
-
- Install with `--frozen-lockfile`. Do not routinely run `clean`, reinstall dependencies or
|
|
59
|
-
run `expo prebuild`. The native project is tracked, and prebuild needs a reviewed native
|
|
60
|
-
change.
|
|
61
|
-
- Build every configured ABI for setup proof and release acceptance. An x86_64-only CI
|
|
62
|
-
APK only proves the emulator ABI. For feature work, the emulator ABI is enough unless the
|
|
63
|
-
change touches native code or ABI configuration.
|
|
64
|
-
- Determine how the selected build loads code and assets. A typical debug build needs
|
|
65
|
-
Metro; a release build normally embeds its bundle. Do not introduce Metro or debug
|
|
66
|
-
preferences into a release failure without evidence that the build uses them.
|
|
67
|
-
A successful build does not prove execution on a device.
|
|
68
|
-
|
|
69
|
-
## Stages
|
|
70
|
-
|
|
71
|
-
These are the full setup-proof stages, not a per-candidate checklist. For established
|
|
72
|
-
workspaces, select checks under [Feature work](#feature-work). Run the selected stages
|
|
73
|
-
in dependency order. Stop at the first failure and triage it.
|
|
74
|
-
|
|
75
|
-
1. **Workspace and environment.** Resolve the assigned or standalone workspace
|
|
76
|
-
([references/workspace.md](references/workspace.md)) and export the private cache paths,
|
|
77
|
-
`JAVA_HOME` (JDK 17), `ANDROID_HOME` and `ANDROID_SDK_ROOT`. Print the versions of
|
|
78
|
-
node, pnpm, java, python3, adb and the emulator. Assert that each SDK component
|
|
79
|
-
directory exists. Read the journey wrapper and device harness for the names they expect:
|
|
80
|
-
the venv path, the port variables, the database variables and the database-name prefix
|
|
81
|
-
the harness accepts.
|
|
82
|
-
2. **Install and check.** Run a frozen install, the app's unit tests, typecheck, and
|
|
83
|
-
`expo export --platform android` with a placeholder `EXPO_PUBLIC_API_URL`. Create a
|
|
84
|
-
Python venv for UI automation at the path the journey wrapper reads, and pin the
|
|
85
|
-
`uiautomator2` version the harness expects.
|
|
86
|
-
3. **Gradle dependencies.** Pick one:
|
|
87
|
-
- Seed: `rsync --ignore-existing` only `caches/modules-2/files-2.1/` from a trusted
|
|
88
|
-
Gradle home, excluding `*.lock`, `*.lck` and `*.tmp`. Never share writable caches,
|
|
89
|
-
metadata, credentials or APKs.
|
|
90
|
-
- Proxy: a private Gradle home does not inherit `~/.gradle/init.d`. Install the proxy's
|
|
91
|
-
init script into `$GRADLE_USER_HOME/init.d/` and export a route for every repository
|
|
92
|
-
the build uses, JitPack included. Ping the proxy first.
|
|
93
|
-
- Neither: build against upstream and expect a long cold build.
|
|
94
|
-
If the opted-in proxy fails, treat it as an error. Never fall back to direct downloads
|
|
95
|
-
and never disable TLS checks. The proxy covers Gradle Maven repositories only. Route the
|
|
96
|
-
Gradle wrapper ZIP and pnpm as the repo's CONTRIBUTING says.
|
|
97
|
-
4. **Build.** Run the repo's Android build script with `--max-workers=2
|
|
98
|
-
-Dorg.gradle.parallel=false -Pandroid.builder.sdkDownload=false --console=plain
|
|
99
|
-
--info`, keeping the log. For setup proof, hash the APK and list its `lib/<abi>/`
|
|
100
|
-
entries.
|
|
101
|
-
5. **Owned emulator.** Create a new private AVD in `$ANDROID_AVD_HOME` by copying only
|
|
102
|
-
`config.ini` from an installed AVD. Never copy its user data or snapshots. Check that
|
|
103
|
-
`image.sysdir.1` points to an installed, host-compatible image, and set `target` to
|
|
104
|
-
match it. Writing `config.ini` from scratch needs the hardware keys:
|
|
105
|
-
[gotchas](references/gotchas.md#a-hand-written-avd-misses-the-screen). Give the guest
|
|
106
|
-
4 GB: replace any `hw.ramSize` with `hw.ramSize=4096` (`device-run.sh` also passes
|
|
107
|
-
`-memory 4096`). At 2 GB, the usual `avdmanager` value, adb drops mid-journey ([gotchas](references/gotchas.md#the-adb-transport-drops-mid-journey)).
|
|
108
|
-
6. **Register cleanup before starting anything.** `device-run.sh` installs the `EXIT`
|
|
109
|
-
trap and the `INT`/`TERM` handlers first.
|
|
110
|
-
7. **Start resources.** The script refuses an emulator console port outside 5554–5584
|
|
111
|
-
(adb scans only that range) and any busy port, starts the ADB server, then the emulator
|
|
112
|
-
(PID recorded) and `postgres` (`--cidfile`, random loopback port), and waits for
|
|
113
|
-
`sys.boot_completed=1` and `pg_isready` with a time limit on every command.
|
|
114
|
-
8. **Journey.** The script hands the harness a database named with its accepted prefix and
|
|
115
|
-
runs the journey wrapper. Expect every scenario's `PASS` marker, plus screenshots, the
|
|
116
|
-
backend log and the Metro log.
|
|
117
|
-
|
|
118
|
-
## Owned-resource cleanup
|
|
119
|
-
|
|
120
|
-
- Clean up only what this run started: the emulator child PID, the container ID from the
|
|
121
|
-
CID file, and the named database; these are short-lived, unlike the development workspace
|
|
122
|
-
and its private caches. Signal the PID with `TERM`, wait up to 10 seconds, then `KILL`.
|
|
123
|
-
Then `wait` for it and confirm nothing is left. Count wait status 0 or 143 (ended by your
|
|
124
|
-
`TERM`) as a clean stop; count a needed `KILL` or any other status as a failure.
|
|
125
|
-
- Never use broad `pkill`, `docker system prune` or a shared `adb kill-server` for cleanup.
|
|
126
|
-
Use the live child's process owner, not an ADB serial that may be reused. A numeric
|
|
127
|
-
PID can also be reused after exit; it is not durable ownership evidence.
|
|
128
|
-
- Give every startup, readiness and cleanup command a 30-second limit that kills the
|
|
129
|
-
command's whole process group. Treat exit 124 (timeout) as a terminal failure, not as
|
|
130
|
-
"not ready yet".
|
|
131
|
-
- Preserve the stage's original non-zero exit status even when cleanup succeeds. Print
|
|
132
|
-
`original_stage_exit=<n> cleanup_exit=<n>`.
|
|
133
|
-
- After SIGKILL or a host crash, verify recorded resources before recovery: process
|
|
134
|
-
start identity, command/run scope and boot identity where available, or container ID
|
|
135
|
-
and ownership labels. Never signal a numeric PID solely because an old record names
|
|
136
|
-
it. If ownership cannot be verified, leave it alone and report the gap. Keep logs.
|
|
137
|
-
- For the local setup flow, point the database URL only at its disposable loopback
|
|
138
|
-
container. An existing isolated remote test flow must use its own disposable data and
|
|
139
|
-
ownership checks. Never use development, production or another worker's database for
|
|
140
|
-
fixture writes or cleanup. A public render-only smoke needs no database.
|
|
141
|
-
- Expo may rewrite `android/tsconfig.json` or delete `android/expo-env.d.ts` while it runs.
|
|
142
|
-
Inspect those changes and restore them before you commit.
|
|
143
|
-
|
|
144
|
-
## Delivery focus
|
|
145
|
-
|
|
146
|
-
Read [references/delivery-focus.md](references/delivery-focus.md) before starting or
|
|
147
|
-
continuing work. Keep an existing acceptance checkpoint, reuse available evidence,
|
|
148
|
-
justify new infrastructure and carry failure history across workers. Required CI and
|
|
149
|
-
the full acceptance criteria still apply; report delivered behavior before activity.
|
|
150
|
-
|
|
151
|
-
## Diagnosis
|
|
152
|
-
|
|
153
|
-
Follow the procedure below and [references/diagnosis.md](references/diagnosis.md).
|
|
154
|
-
`diagnosing-bugs`, when available, can help with deeper hypothesis testing; it is not
|
|
155
|
-
required to use this skill.
|
|
156
|
-
|
|
157
|
-
The developer owns technical diagnosis. The coordinator owns its scope and broader
|
|
158
|
-
acceptance scheduling. Failures in focused implementation validation stay with the
|
|
159
|
-
developer within that task's scope. Failures after review handoff or in broader
|
|
160
|
-
acceptance get a separate bounded diagnosis assignment, which may use the same developer:
|
|
161
|
-
name the failed checkpoint, retained evidence, next question and return condition.
|
|
162
|
-
Return scope growth or inconclusive evidence to the coordinator; do not silently extend
|
|
163
|
-
implementation into a full acceptance campaign. Independent review checks the fix.
|
|
164
|
-
|
|
165
|
-
1. Record the failed SHA, actual checkout, build variant, device type and retained
|
|
166
|
-
evidence. Locate the earliest failing stage: build/install → launch → load code/assets
|
|
167
|
-
→ initialize → render → interact. Distinguish host/CI, harness, transport and product
|
|
168
|
-
failures; an absent screen alone does not identify which one failed.
|
|
169
|
-
2. Choose the smallest test that can expose the suspected defect: a host test for logic,
|
|
170
|
-
real producer/consumer composition for a contract, or a device test for native/runtime
|
|
171
|
-
behavior. Collect evidence appropriate to that stage. A service probe proves only the
|
|
172
|
-
probe, not that the application used the same path.
|
|
173
|
-
3. State competing explanations and a distinguishing observation. Change one variable.
|
|
174
|
-
For reversible defects, a failure → correction → failure comparison can strengthen
|
|
175
|
-
the finding; it is optional, not a gate. For intermittent failures, use a bounded,
|
|
176
|
-
repeatable trigger and compare failure rates. Do not replay Authentication or financial
|
|
177
|
-
actions merely to obtain a comparison.
|
|
178
|
-
4. Keep the first exception and its evidence separate from cleanup errors. Bound the
|
|
179
|
-
full command and each subprocess wait, allowing the resource owner time to clean up.
|
|
180
|
-
A live worker or an outstanding tool call is not evidence of progress.
|
|
181
|
-
5. Verify the fix at the failing checkpoint, then run the affected validation once.
|
|
182
|
-
Broader acceptance belongs to its scheduled integration or release checkpoint, not
|
|
183
|
-
automatically to this diagnosis assignment. Preserve any explicitly required gate.
|
|
184
|
-
Report local reproduction, source CI and post-deploy acceptance separately. A local
|
|
185
|
-
result on another API/ABI or a copied APK is not proof of the original CI artifact.
|
|
186
|
-
|
|
187
|
-
Continue when the next attempt tests a new prediction, collects a missing observation,
|
|
188
|
-
reduces the reproduction, or adds a justified sample for an intermittent failure. Name
|
|
189
|
-
that purpose and bound its cost. Changing workers or repeating an unchanged run without
|
|
190
|
-
such a purpose is not progress. When no available experiment distinguishes the remaining
|
|
191
|
-
explanations, report the missing evidence or access instead of restarting the campaign.
|
|
192
|
-
|
|
193
|
-
## Triage
|
|
194
|
-
|
|
195
|
-
Name the earliest stage that failed. In CI, that is the first failed step. If the same
|
|
196
|
-
journey passed on another run of the same commit, suspect the run or the journey before
|
|
197
|
-
the product.
|
|
198
|
-
|
|
199
|
-
| Stage | Typical signal |
|
|
200
|
-
| --- | --- |
|
|
201
|
-
| Prerequisites / install | missing SDK directory, wrong JDK, lockfile drift |
|
|
202
|
-
| Harness unit tests (CI, before the APK) | a harness test fails on host state its fixture should fake (`requires 2 GiB reserve`) |
|
|
203
|
-
| Export / APK | Metro bundling error, Gradle compile or dependency-resolution error |
|
|
204
|
-
| Gradle network | Maven download or TLS-handshake errors on a cold build: fix routing, not code |
|
|
205
|
-
| Emulator boot / ADB | `sys.boot_completed` never reaches 1, device offline, exit 124 |
|
|
206
|
-
| Device to Metro | red box, "unable to load script", missing `adb reverse` mapping |
|
|
207
|
-
| Bridge passes, debug app fails to load | possible app/probe endpoint mismatch; inspect the actual request before choosing a cause ([React Native example](references/diagnosis.md#example-react-native-debug-app-uses-another-metro)) |
|
|
208
|
-
| Device to Metro, mid-journey | a screen's first Metro asset fails (`Unable to download asset from url: http://127.0.0.1:8081/assets/…`) while API calls still succeed |
|
|
209
|
-
| Backend / Login | backend log errors, verification code not found in the database |
|
|
210
|
-
| Backend tool, CI only | a Backend-backed step gets a 5xx in CI only; the log names a missing program (`Browser was not found at the configured executablePath`) |
|
|
211
|
-
| adb transport, mid-journey | `connection terminated: read failed` in the adb trace after boot, then lost `adb reverse`: usually guest RAM |
|
|
212
|
-
| UiAutomator server | `RemoteDisconnected` while the adb transport stays up: the on-device server was relaunched |
|
|
213
|
-
| Journey harness | a wait right after a navigation times out while the destination is on screen |
|
|
214
|
-
| Journey harness, short screen | a wait for a label times out only on a short or landscape screen, which shows the content above it |
|
|
215
|
-
| Product assertion | a screen or state mismatch with a screenshot |
|
|
216
|
-
|
|
217
|
-
Then match the signal against [references/gotchas.md](references/gotchas.md). If nothing
|
|
218
|
-
matches, [confirm the suspected cause](references/gotchas.md#confirm-a-suspected-cause)
|
|
219
|
-
before changing code.
|
|
220
|
-
|
|
221
|
-
Preserve the failure evidence. Do not blindly replay steps that send codes, verify sessions
|
|
222
|
-
or charge payments just to get a passing screenshot. One passing run does not prove the
|
|
223
|
-
build is reliable.
|
|
224
|
-
|
|
225
|
-
## Feature work
|
|
226
|
-
|
|
227
|
-
Read [references/feature-work.md](references/feature-work.md) before validating a
|
|
228
|
-
product change in an established workspace. Preserve required CI and acceptance gates.
|
|
229
|
-
|
|
230
|
-
## Evidence record
|
|
231
|
-
|
|
232
|
-
For setup proof only. Record:
|
|
233
|
-
|
|
234
|
-
- Source SHA and the workspace root/path/base/branch/owner from the lifecycle record; host OS
|
|
235
|
-
and architecture, the Expo SDK, and the node, pnpm, JDK, Python and emulator versions.
|
|
236
|
-
- System image API, image type and ABI. The AVD name, serial and ports are run
|
|
237
|
-
identifiers, not shared resources.
|
|
238
|
-
- Each stage's exit status and duration.
|
|
239
|
-
- The APK's SHA-256 (`shasum -a 256` or `sha256sum`) and its per-ABI `lib/` entries
|
|
240
|
-
(`unzip -l`), checked on the APK itself rather than inferred from Gradle flags.
|
|
241
|
-
- The journey's `PASS` markers and the cleanup results: database dropped, emulator exited,
|
|
242
|
-
container removed, no listeners left on the backend or Metro ports.
|
|
243
|
-
- Earlier failed or incomplete attempts. A later pass does not erase them.
|
|
244
|
-
|
|
245
|
-
State what the run does not prove: tablet, accessibility (TalkBack), physical devices,
|
|
246
|
-
signing, distribution, and any feature acceptance beyond the journey. Publish only
|
|
247
|
-
sanitized evidence: no authentication codes, session cookies, customer data or raw
|
|
248
|
-
payment payloads.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Delivery focus
|
|
2
|
-
|
|
3
|
-
Name one immediate checkpoint from the task's existing acceptance criteria: for example,
|
|
4
|
-
open the app and render the expected screen. Keep that target visible while diagnosing;
|
|
5
|
-
passing setup or adding helper code is not a substitute. Each independent work unit has
|
|
6
|
-
its own checkpoint, so this does not serialize unrelated work.
|
|
7
|
-
|
|
8
|
-
- Preserve a known-working source/artifact and relevant environment as a comparison when
|
|
9
|
-
one already exists. Do not start a baseline campaign or count that old artifact as proof
|
|
10
|
-
of the candidate. Reuse caches and valid results under the repo's ownership rules.
|
|
11
|
-
- Run the smallest test that reaches the failing behavior. After it supports the fix,
|
|
12
|
-
complete focused validation and hand off to independent review. Run affected integrated
|
|
13
|
-
acceptance at its explicit plan checkpoint and preserve required CI; do not repeatedly
|
|
14
|
-
rebuild the full campaign to discover the next local defect or defer all journeys to
|
|
15
|
-
the final task.
|
|
16
|
-
- Before adding a service, transport or test abstraction, state which existing criterion
|
|
17
|
-
needs it, why the current path cannot answer the question and the smallest alternative.
|
|
18
|
-
Make routine choices within authorization; preserve shared-resource and acceptance
|
|
19
|
-
approval boundaries. Do not expand infrastructure merely because a screen failed.
|
|
20
|
-
- Every continuation states the current checkpoint, new evidence or concrete blocker,
|
|
21
|
-
and the next distinguishing test. Carry prior failures across worker changes. If
|
|
22
|
-
successive attempts leave the same checkpoint unproved, reassess and reduce the case
|
|
23
|
-
or change the approach before assigning another similar attempt. Diagnostics can guide
|
|
24
|
-
that decision but do not count as delivered functionality or reset coordinator limits.
|
|
25
|
-
- Report behavior delivered and criteria still unproved first. Reuse existing results for
|
|
26
|
-
time to reproduce, time to verified fix and full CI runs when available; never invent
|
|
27
|
-
those measurements or create a reporting project to obtain them.
|
|
28
|
-
|
|
29
|
-
When a coordinator owns the run, keep this context in its existing plan note and worker
|
|
30
|
-
result. Follow its retry/replan rules; add no separate ledger, check or acceptance gate.
|
|
31
|
-
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Feature work
|
|
2
|
-
|
|
3
|
-
Read the repository's validation and delivery policy first. Preserve required CI and
|
|
4
|
-
acceptance gates; this skill does not authorize skipping them or rewriting project
|
|
5
|
-
policy. Keep validation early without repeating the entire campaign per candidate.
|
|
6
|
-
|
|
7
|
-
| Stage | Scope | Ownership |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| Every candidate | Relevant tests, typecheck and applicable build/export checks; targeted device checks for runtime-sensitive behavior. | Developer validates, reports evidence and gaps, then hands off to independent review. |
|
|
10
|
-
| Integration checkpoint | Affected journeys through combined changes. | Coordinator schedules a separate validation task as soon as its prerequisites are ready. |
|
|
11
|
-
| Final acceptance | Remaining cross-feature, device-matrix and release obligations, plus checks invalidated by later changes. | Coordinator accounts for all required gates, reusing earlier evidence only within its proven scope. |
|
|
12
|
-
|
|
13
|
-
- Name focused checks and integrated journey checkpoints in the plan before implementation,
|
|
14
|
-
with real prerequisites, an owner and observable results. Do not put all device testing
|
|
15
|
-
in the last task. Start independent ready work concurrently within device/host capacity
|
|
16
|
-
and existing ownership boundaries.
|
|
17
|
-
- Choose the smallest check that proves the affected behavior. Host tests can prove logic
|
|
18
|
-
or a harness correction; native integration, navigation, keyboard, lifecycle and
|
|
19
|
-
accessibility changes need targeted owned-device evidence where host tests cannot prove
|
|
20
|
-
runtime behavior. A successful build/export alone is not device proof.
|
|
21
|
-
- Use existing supported journey selectors. If the harness cannot select the affected
|
|
22
|
-
flow, report that limitation and schedule the smallest existing journey that covers it.
|
|
23
|
-
Do not invent a flag, weaken assertions or silently omit device validation. For example,
|
|
24
|
-
a filter change needs open/edit/apply/result evidence, not an unrelated payment campaign.
|
|
25
|
-
- Reuse the workspace's private caches, venv and AVD configuration. Rerun setup stages only
|
|
26
|
-
when their assumptions change. Rebuild when build inputs change, using the emulator ABI
|
|
27
|
-
for focused work only where repository policy permits it. Do not require a fresh full
|
|
28
|
-
build or full journey solely because the candidate HEAD changed. APK reuse still needs
|
|
29
|
-
the source/configuration and artifact checks the repo requires; never relabel an old
|
|
30
|
-
artifact or result as current-source proof.
|
|
31
|
-
- At each checkpoint, state what changed and which earlier evidence that change invalidates.
|
|
32
|
-
Reuse evidence only while source, configuration, artifact and environment remain applicable
|
|
33
|
-
to the claimed behavior. Required current-source CI still runs; evidence reuse cannot
|
|
34
|
-
replace a gate that requires a new run.
|
|
35
|
-
- After a failed journey, local or a CI dispatch, enter Diagnosis mode and reproduce the
|
|
36
|
-
failing checkpoint off CI before running it again. A fake UI can reproduce a harness
|
|
37
|
-
navigation/scrolling bug; it cannot prove that the app loaded a bundle or rendered.
|
|
38
|
-
Show the fix passes at the appropriate boundary, then rerun the affected check once.
|
|
39
|
-
Never send a guessed fix to CI to see whether it passes. Use the Diagnosis continuation
|
|
40
|
-
rule for unreproduced or intermittent failures; report uncertainty until evidence
|
|
41
|
-
supports the cause.
|
|
42
|
-
- Report source SHA, commands, results and remaining gaps at review handoff. For device
|
|
43
|
-
checks, include the selected scenarios, `PASS` markers and cleanup exit. For a failure,
|
|
44
|
-
name the earliest failing checkpoint and link retained evidence; preserve failed attempts.
|
|
45
|
-
Separate build duration, device-check duration and total worker time when discussing cost.
|
|
46
|
-
- Broader device acceptance (all ABIs, tablet, TalkBack, physical devices, a release device
|
|
47
|
-
campaign) runs at the integration, release or campaign checkpoint the spec or repo assigns
|
|
48
|
-
it. Do not recreate it per feature or postpone affected runtime checks until release.
|
|
49
|
-
Record outstanding criteria as pending in their owning task or issue, never as passed.
|
|
50
|
-
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
# Android foundation: shell snippets
|
|
2
|
-
|
|
3
|
-
Replace each `<placeholder>` with the repo's real value. Tool shells do not keep variables,
|
|
4
|
-
functions or traps between calls: step 1 resolves the workspace and writes
|
|
5
|
-
`.cache/android-env.sh`, which also `cd`s into it; every later block starts by sourcing it by
|
|
6
|
-
absolute path, and steps 6–8 run as one command through the bundled `scripts/device-run.sh`.
|
|
7
|
-
|
|
8
|
-
## 1. Workspace and environment
|
|
9
|
-
|
|
10
|
-
Workspace precedence is owned by [workspace.md](workspace.md). Do not create a worktree,
|
|
11
|
-
switch branch, fetch or reset when the caller supplied an isolated workspace.
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
set -euo pipefail
|
|
15
|
-
ASSIGNED_WORKSPACE=<assigned-workspace-or-empty>
|
|
16
|
-
CANDIDATE_HEAD=<candidate-head-or-empty>
|
|
17
|
-
WORKSPACE="${ASSIGNED_WORKSPACE:?use the caller assignment or native-start result from workspace.md}"
|
|
18
|
-
test -d "$WORKSPACE"
|
|
19
|
-
git -C "$WORKSPACE" rev-parse --is-inside-work-tree >/dev/null
|
|
20
|
-
cd "$WORKSPACE"
|
|
21
|
-
actual_head="$(git rev-parse HEAD)"
|
|
22
|
-
test -z "$CANDIDATE_HEAD" || test "$actual_head" = "$(git rev-parse "$CANDIDATE_HEAD^{commit}")" || {
|
|
23
|
-
echo "workspace HEAD $actual_head != candidate $CANDIDATE_HEAD; report it; do not switch" >&2
|
|
24
|
-
exit 1
|
|
25
|
-
}
|
|
26
|
-
mkdir -p .cache
|
|
27
|
-
{ echo 'set -euo pipefail'; printf 'cd %q\n' "$PWD"; printf 'export ANDROID_SOURCE_HEAD=%q\n' "$actual_head"; } > .cache/android-env.sh
|
|
28
|
-
cat >> .cache/android-env.sh <<'ENV'
|
|
29
|
-
|
|
30
|
-
# Repo-specific names, read from the repo's journey wrapper and device harness.
|
|
31
|
-
export APP_FILTER=<android-workspace-package> # pnpm --filter target
|
|
32
|
-
export DEVICE_PYTHON_DIR=<venv-dir-the-wrapper-reads> # e.g. the default in the wrapper
|
|
33
|
-
export DB_NAME_PREFIX=<db-prefix-the-harness-accepts> # the harness rejects other names
|
|
34
|
-
export DB_URL_VAR=<harness-admin-url-variable> # e.g. SHARD_ADMIN_URL
|
|
35
|
-
export DB_NAME_VAR=<harness-db-name-variable> # e.g. SHARD_DB_NAME
|
|
36
|
-
|
|
37
|
-
# Host paths. Example values are for Apple Silicon with Android Studio.
|
|
38
|
-
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
|
|
39
|
-
export ANDROID_HOME="$HOME/Library/Android/sdk"
|
|
40
|
-
export ANDROID_SDK_ROOT="$ANDROID_HOME"
|
|
41
|
-
export SOURCE_AVD="$HOME/.android/avd/<installed-avd>.avd"
|
|
42
|
-
export SEED_GRADLE_HOME="$HOME/.gradle"
|
|
43
|
-
export PATH="$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$PATH"
|
|
44
|
-
|
|
45
|
-
# Private caches.
|
|
46
|
-
export GRADLE_USER_HOME="$PWD/.cache/gradle"
|
|
47
|
-
export ANDROID_USER_HOME="$PWD/.cache/android-user"
|
|
48
|
-
export ANDROID_AVD_HOME="$PWD/.cache/android-avd"
|
|
49
|
-
export TMPDIR="$PWD/.cache/tmp"
|
|
50
|
-
export npm_config_cache="$PWD/.cache/npm"
|
|
51
|
-
export npm_config_devdir="$PWD/.cache/node-gyp"
|
|
52
|
-
export PNPM_CONFIG_STORE_DIR="$PWD/.cache/pnpm-store"
|
|
53
|
-
export PNPM_CONFIG_CACHE_DIR="$PWD/.cache/pnpm"
|
|
54
|
-
case "${JAVA_TOOL_OPTIONS:-}" in *java.io.tmpdir*) ;; *)
|
|
55
|
-
export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS:+$JAVA_TOOL_OPTIONS }-Djava.io.tmpdir=$TMPDIR" ;; esac
|
|
56
|
-
|
|
57
|
-
# Run identifiers: an even console port in 5554-5584 (adb scans only that range),
|
|
58
|
-
# and backend/Metro ports under the names the journey wrapper reads.
|
|
59
|
-
export SETUP_AVD=<new-unique-avd-name>
|
|
60
|
-
export EMULATOR_PORT=<even-port-5554-5584>
|
|
61
|
-
export ANDROID_BACKEND_PORT=<free-port>
|
|
62
|
-
export ANDROID_METRO_PORT=<free-port>
|
|
63
|
-
# Choose the whole-journey deadline; zero disables it and is not suitable for unattended runs.
|
|
64
|
-
export JOURNEY_SECONDS=<positive-journey-timeout-seconds>
|
|
65
|
-
ENV
|
|
66
|
-
source .cache/android-env.sh
|
|
67
|
-
mkdir -p "$TMPDIR" "$npm_config_cache" "$npm_config_devdir" \
|
|
68
|
-
"$ANDROID_USER_HOME" "$ANDROID_AVD_HOME" .cache/logs
|
|
69
|
-
|
|
70
|
-
node --version; pnpm --version; java -version; python3 --version
|
|
71
|
-
adb version; "$ANDROID_HOME/emulator/emulator" -version
|
|
72
|
-
# Versions come from the repo's native config and CI preflight.
|
|
73
|
-
for component in platforms/android-<api> build-tools/<build-tools> ndk/<ndk> cmake/<cmake>; do
|
|
74
|
-
test -d "$ANDROID_HOME/$component" || { echo "Missing SDK: $component" >&2; exit 1; }
|
|
75
|
-
done
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
The recorded standalone path is reused on retries; verify its lifecycle record names this
|
|
79
|
-
run, branch and base. If an assigned path is missing, is not a Git worktree, or is at another
|
|
80
|
-
revision, stop and report instead of creating another checkout. Never fall back to
|
|
81
|
-
`../<repo>-android-setup`.
|
|
82
|
-
|
|
83
|
-
If the wrapper reads ports or Python under other names, export aliases in
|
|
84
|
-
`android-env.sh` **as well as** the bundled runner's required names. For example,
|
|
85
|
-
`export APP_METRO_PORT="$ANDROID_METRO_PORT"`; both must select the same port. Adapt
|
|
86
|
-
`DB_URL_VAR` and `DB_NAME_VAR` to the actual harness, not its fallback defaults.
|
|
87
|
-
|
|
88
|
-
## 2. Install and check
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
source <worktree>/.cache/android-env.sh
|
|
92
|
-
pnpm install --frozen-lockfile --store-dir "$PWD/.cache/pnpm-store"
|
|
93
|
-
pnpm --filter "$APP_FILTER" test
|
|
94
|
-
pnpm --filter "$APP_FILTER" typecheck
|
|
95
|
-
EXPO_PUBLIC_API_URL=https://app.invalid \
|
|
96
|
-
pnpm --filter "$APP_FILTER" exec expo export --platform android
|
|
97
|
-
python3 -m venv "$DEVICE_PYTHON_DIR"
|
|
98
|
-
"$DEVICE_PYTHON_DIR/bin/python3" -m pip install uiautomator2==<harness-pinned-version>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## 3. Gradle dependencies (pick one)
|
|
102
|
-
|
|
103
|
-
Seed from a trusted Gradle home:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
source <worktree>/.cache/android-env.sh
|
|
107
|
-
mkdir -p "$GRADLE_USER_HOME/caches/modules-2/files-2.1"
|
|
108
|
-
rsync -r --ignore-existing \
|
|
109
|
-
--exclude='*.lock' --exclude='*.lck' --exclude='*.tmp' \
|
|
110
|
-
"$SEED_GRADLE_HOME/caches/modules-2/files-2.1/" \
|
|
111
|
-
"$GRADLE_USER_HOME/caches/modules-2/files-2.1/"
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Or wire a trusted Maven proxy into the private Gradle home. Append the exports to
|
|
115
|
-
`android-env.sh` so the build in step 4 sees them. Route every repository the build uses,
|
|
116
|
-
JitPack included; a route left unset goes straight upstream.
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
source <worktree>/.cache/android-env.sh
|
|
120
|
-
cat >> "$PWD/.cache/android-env.sh" <<'ENV'
|
|
121
|
-
export GRADLE_MAVEN_REPOSITORY=<proxy>/maven/
|
|
122
|
-
export GRADLE_GOOGLE_REPOSITORY=<proxy>/google-maven/
|
|
123
|
-
export GRADLE_PLUGIN_REPOSITORY=<proxy>/gradle-plugins/
|
|
124
|
-
export GRADLE_JITPACK_REPOSITORY=<proxy>/jitpack/
|
|
125
|
-
ENV
|
|
126
|
-
curl --fail --silent --show-error --max-time 10 <proxy-health-url>
|
|
127
|
-
install -d "$GRADLE_USER_HOME/init.d"
|
|
128
|
-
install -m 0644 <path/to/proxy.init.gradle> "$GRADLE_USER_HOME/init.d/proxy.init.gradle"
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## 4. Build
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
source <worktree>/.cache/android-env.sh
|
|
135
|
-
pnpm build:android --max-workers=2 -Dorg.gradle.parallel=false \
|
|
136
|
-
-Pandroid.builder.sdkDownload=false --console=plain --info \
|
|
137
|
-
2>&1 | tee .cache/logs/gradle.log
|
|
138
|
-
APK=<path/to/app/build/outputs/apk/debug/app-debug.apk>
|
|
139
|
-
shasum -a 256 "$APK" # sha256sum on Linux
|
|
140
|
-
unzip -l "$APK" | grep -E 'lib/[^/]+/libreactnative\.so'
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## 5. Owned emulator
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
source <worktree>/.cache/android-env.sh
|
|
147
|
-
test -f "$SOURCE_AVD/config.ini"
|
|
148
|
-
test ! -e "$ANDROID_AVD_HOME/$SETUP_AVD.ini"
|
|
149
|
-
test ! -e "$ANDROID_AVD_HOME/$SETUP_AVD.avd"
|
|
150
|
-
grep '^image.sysdir.1' "$SOURCE_AVD/config.ini" # must be an installed, host-compatible image
|
|
151
|
-
mkdir "$ANDROID_AVD_HOME/$SETUP_AVD.avd"
|
|
152
|
-
# Copy without the source's RAM size and give the guest 4 GB (gotchas: adb transport drops).
|
|
153
|
-
grep -Ev '^hw\.ramSize[[:space:]]*=' "$SOURCE_AVD/config.ini" > "$ANDROID_AVD_HOME/$SETUP_AVD.avd/config.ini"
|
|
154
|
-
echo 'hw.ramSize=4096' >> "$ANDROID_AVD_HOME/$SETUP_AVD.avd/config.ini"
|
|
155
|
-
printf 'avd.ini.encoding=UTF-8\npath=%s\ntarget=android-<api>\n' \
|
|
156
|
-
"$ANDROID_AVD_HOME/$SETUP_AVD.avd" > "$ANDROID_AVD_HOME/$SETUP_AVD.ini"
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## 6–8. Cleanup, resources and journey: one command
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
source <worktree>/.cache/android-env.sh
|
|
163
|
-
bash <skill-base-dir>/scripts/device-run.sh \
|
|
164
|
-
--drop node <path/to/device-harness.mjs> drop \
|
|
165
|
-
-- bash <path/to/foundation-journey-wrapper.sh>
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Pass each command as separate words, not as one quoted string. The script:
|
|
169
|
-
|
|
170
|
-
1. Registers the cleanup trap before anything starts.
|
|
171
|
-
2. Refuses an emulator port outside 5554–5584 and any busy port.
|
|
172
|
-
3. Starts the ADB server, then the emulator (its PID recorded), then `postgres` with
|
|
173
|
-
`--cidfile` on a random loopback port. Override the image with `POSTGRES_IMAGE`.
|
|
174
|
-
4. Waits for `sys.boot_completed=1` and `pg_isready`. Startup/readiness and cleanup
|
|
175
|
-
commands have a 30-second limit (`BOUNDED_SECONDS`); exit 124 is terminal. The journey
|
|
176
|
-
uses the separate `JOURNEY_SECONDS` deadline. Leave time for cleanup after that deadline.
|
|
177
|
-
5. Exports `$DB_URL_VAR`, `$DB_NAME_VAR` (`$DB_NAME_PREFIX` plus a unique suffix) and
|
|
178
|
-
`ANDROID_EMULATOR_SERIAL`, then runs the journey.
|
|
179
|
-
6. Drops the database, stops the emulator PID (`TERM`, then `KILL` after 10 seconds),
|
|
180
|
-
removes the container by its CID, and prints `original_stage_exit=<n> cleanup_exit=<n>`.
|
|
181
|
-
It exits with the journey's status if the journey failed, else the cleanup status.
|
|
182
|
-
|
|
183
|
-
The runner supervises the journey's process group. Journey children must stay in that
|
|
184
|
-
group; a wrapper that deliberately creates detached services must stop those services
|
|
185
|
-
through its own owner. Send TERM to the launcher and allow its cleanup to finish rather
|
|
186
|
-
than killing it immediately. The generic runner inherits the caller's ADB endpoint and
|
|
187
|
-
does not stop that server: use a verified private endpoint on a shared host and close it
|
|
188
|
-
through the caller's owner. Capture the command's exit status and final summary line.
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# Android workspace lifecycle
|
|
2
|
-
|
|
3
|
-
The coordinator or caller owns workspace selection. Resolve it once, before any setup stage,
|
|
4
|
-
and record the result. This reference owns only that lifecycle: private caches, SDK isolation,
|
|
5
|
-
emulator ownership and process cleanup stay in [setup.md](setup.md) and
|
|
6
|
-
[Owned-resource cleanup](../SKILL.md#owned-resource-cleanup).
|
|
7
|
-
|
|
8
|
-
## Precedence
|
|
9
|
-
|
|
10
|
-
1. **Assigned workspace and candidate HEAD.** When the caller supplies an isolated workspace
|
|
11
|
-
and a candidate HEAD, use that workspace and that revision. Do not create a worktree or
|
|
12
|
-
branch, fetch, reset or switch revisions. Read `git rev-parse HEAD` and report it as the
|
|
13
|
-
source SHA. If it differs from the candidate HEAD, stop and report the mismatch; never
|
|
14
|
-
switch the workspace to match.
|
|
15
|
-
2. **Existing owned workspace.** Feature work, fixes and diagnosis reuse the workspace this
|
|
16
|
-
run or unit already owns, with its private caches, venv and AVD profile. Do not make a
|
|
17
|
-
second workspace for a retry, a correction or a read-only investigation.
|
|
18
|
-
3. **Standalone fresh setup.** Only when the coordinator reports no usable assignment. Create
|
|
19
|
-
one managed workspace at
|
|
20
|
-
`<repo>/.resolve-issues/rush/<run-id>/units/native`. Never create a sibling checkout such
|
|
21
|
-
as `../<repo>-android-setup`, and never add a second managed path for a retry.
|
|
22
|
-
|
|
23
|
-
Android and iOS setup in the same run share that one managed workspace; their private cache
|
|
24
|
-
subdirectories and short-lived processes stay separate.
|
|
25
|
-
|
|
26
|
-
An assigned path that is missing, is not a Git worktree, or is at another revision is not an
|
|
27
|
-
invitation to substitute a fresh checkout: stop and report it. For diagnosis, name the actual
|
|
28
|
-
checkout and HEAD and confirm it contains the failing code; the repository root or another
|
|
29
|
-
checkout may lag the candidate.
|
|
30
|
-
|
|
31
|
-
## Record before creating
|
|
32
|
-
|
|
33
|
-
The bundled `scripts/workspace-runtime` is generated from the shared lifecycle
|
|
34
|
-
engine and ships with this skill. Only for standalone fresh setup, run:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
node <skill-base-dir>/scripts/workspace-runtime/bin/workspaces.mjs native-start --repo <canonical-root> \
|
|
38
|
-
--platform android --target <verified-target-branch> --base <candidate-SHA> --json
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
The command records root, owner, exact base, branch, workspace and disposable cache
|
|
42
|
-
paths before creating anything. Use its returned `workspace` as `ASSIGNED_WORKSPACE`
|
|
43
|
-
and `sourceSha` as `CANDIDATE_HEAD` in setup. Keep `run` and `runId`; repeat with
|
|
44
|
-
`--run-id <returned-run-id>` and the same base, target and kind for retries. Never
|
|
45
|
-
invoke it inside a coordinator-assigned unit. It never substitutes `origin/main`
|
|
46
|
-
for the requested source or resets an existing workspace.
|
|
47
|
-
For a package below the root, pass `--native-dir <package-root-containing-android>`.
|
|
48
|
-
Declare other installs or build directories before use with repeated
|
|
49
|
-
`--disposable <exact-workspace-relative-path>`, including package-local `node_modules`.
|
|
50
|
-
|
|
51
|
-
## Development workspace vs short-lived processes
|
|
52
|
-
|
|
53
|
-
The workspace, its private caches under `.cache/`, its venv and its AVD profile are
|
|
54
|
-
development resources: retain them across retries and fixes, and keep them private to this
|
|
55
|
-
workspace. Never relocate them to a global cache or share them with a concurrent owner.
|
|
56
|
-
|
|
57
|
-
Emulators, containers, databases, Metro and ADB endpoints are short-lived: start only those
|
|
58
|
-
the selected checks need and stop only the ones this run started, under the existing
|
|
59
|
-
[cleanup rules](../SKILL.md#owned-resource-cleanup). Never delete a worktree, remove a cache
|
|
60
|
-
with a chmod or `rm` pattern, or use a broad kill to end a process.
|
|
61
|
-
|
|
62
|
-
A read-only diagnosis does not require a clean environment. Reuse the owned workspace and its
|
|
63
|
-
caches, create only the services the observation needs, and preserve the failed environment's
|
|
64
|
-
evidence. Do not rebuild, reinstall or re-provision merely because the failure is being
|
|
65
|
-
investigated.
|
|
66
|
-
|
|
67
|
-
## Completion
|
|
68
|
-
|
|
69
|
-
At the end of the assignment, return the workspace, its cache paths and any retained process
|
|
70
|
-
records to the coordinator for final cleanup. The coordinator owns deletion and retention.
|
|
71
|
-
Register the path with the run's cleanup owner so final cleanup can tell a delivered
|
|
72
|
-
standalone run from unfinished or unpublished work.
|
|
73
|
-
|
|
74
|
-
- A successful, delivered standalone run must not retain an unbounded cache: mark the
|
|
75
|
-
workspace and its disposable caches for final cleanup. After stopping its owned
|
|
76
|
-
services, run `node <skill-base-dir>/scripts/workspace-runtime/bin/workspaces.mjs native-finish --run <run> --json`
|
|
77
|
-
from the owner checkout. This uses the same cleanup engine as issue workflows.
|
|
78
|
-
- Unfinished or unpublished standalone work keeps the workspace and caches for the next
|
|
79
|
-
attempt; report what is retained and why.
|
|
80
|
-
|
|
81
|
-
The parent lifecycle record is authoritative for ownership, retention and final cleanup.
|
|
File without changes
|
/package/skills/app-dev/{android-foundation → android-development}/assets/android-ci-job.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|