diff --git a/.github/workflows/main-pipeline.yaml b/.github/workflows/main-pipeline.yaml index 047d32d9..49d56886 100644 --- a/.github/workflows/main-pipeline.yaml +++ b/.github/workflows/main-pipeline.yaml @@ -950,6 +950,8 @@ jobs: echo "Installing Maestro CLI ($MAESTRO_VERSION)..." curl -Ls "https://get.maestro.mobile.dev" | bash echo "Installing ${{ matrix.app }} APK (${{ matrix.apk }})..." + echo "Removing any cached install of ${{ matrix.package }} to avoid signature mismatches from the cached AVD..." + adb uninstall ${{ matrix.package }} >/dev/null 2>&1 || true adb install -r android-apks/${{ matrix.apk }} echo "Setting up adb reverse (harmless localhost fallback; the apps use 10.0.2.2)..." adb reverse tcp:8000 tcp:8000 || echo "::warning::adb reverse failed; apps use 10.0.2.2 so continuing" diff --git a/AGENTS.md b/AGENTS.md index 5833975c..c3c528aa 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,286 +1,179 @@ # AGENTS.md -This file defines repository-wide rules only. For any change, read this file first, then read each -applicable child `AGENTS.md` from outermost to nearest in the subtree you are editing. +Repository-wide baseline. Child files add local constraints; the nearest child file wins. ## Hierarchy -- The root `AGENTS.md` owns stable repo-wide policy. -- `packages/AGENTS.md` and `implementations/AGENTS.md` own shared policy for all packages and - reference implementations. -- `lib/*/AGENTS.md`, `packages/**/AGENTS.md`, and `implementations/*/AGENTS.md` own more specific - local instructions, commands, and gotchas. -- If local guidance conflicts with this file, follow the more specific `AGENTS.md` for that subtree. -- When adding a new workspace package or implementation, add a sibling `AGENTS.md` in the same - change. -- Keep child `AGENTS.md` files focused on local behavior. Do not duplicate root policy unless the - subtree has a local exception. +- Read this file, then each child `AGENTS.md` from the repository root to the edited path. +- Root owns stable repo policy. `packages/AGENTS.md` and `implementations/AGENTS.md` own shared + package or implementation policy. Deeper files own local boundaries, commands, and gotchas. +- Add a sibling `AGENTS.md` when adding a workspace package or reference implementation. +- Do not repeat parent policy in child files unless the subtree has a real exception. -## Environment and tooling +## Tools and source files -- Use the Node version from [`.nvmrc`](./.nvmrc) when possible. Repository engine constraints live - in the root [`package.json`](./package.json). -- Use `pnpm` only. The pinned package-manager version lives in the root +- Use the Node version in [`.nvmrc`](./.nvmrc) and the pnpm version pinned in [`package.json`](./package.json). -- Prefer `pnpm diff --git a/implementations/node-sdk/AGENTS.md b/implementations/node-sdk/AGENTS.md index 9199e1f3..e236661f 100644 --- a/implementations/node-sdk/AGENTS.md +++ b/implementations/node-sdk/AGENTS.md @@ -1,42 +1,21 @@ # AGENTS.md -Read the repository root `AGENTS.md`, then `implementations/AGENTS.md`, before this file. +Node SSR reference implementation for `@contentful/optimization-node`. -## Scope +## Rules -This is the Node SSR reference implementation for `@contentful/optimization-node`. - -## Key paths - -- `src/` -- `e2e/` -- `.env.example` - -## Local rules - -- Keep this app minimal and documentation-oriented. Reusable SDK behavior belongs in - `packages/node/node-sdk`, not here. -- This implementation uses local mock defaults from `.env.example`. -- `serve` uses PM2-managed processes. Prefer `serve:stop` over broad PM2 cleanup. - -## Common failure modes - -- Playwright reports a missing browser or executable: run `pnpm playwright:install` before retrying - E2E. -- The app or mocks fail to bind local ports such as `3000` or `8000`: stop only this - implementation's local processes with `pnpm implementation:run -- node-sdk serve:stop`. +- Keep this app minimal and documentation-oriented; reusable Node SDK behavior belongs in + `packages/node/node-sdk`. +- Local mock defaults come from `.env.example`. +- `serve` uses PM2-managed processes; use `serve:stop` when done. ## Commands -- `pnpm implementation:run -- node-sdk implementation:install` -- `pnpm implementation:run -- node-sdk typecheck` -- `pnpm implementation:run -- node-sdk serve` -- `pnpm implementation:run -- node-sdk serve:stop` -- `pnpm implementation:run -- node-sdk implementation:test:e2e:run` +- `pnpm implementation:run -- node-sdk