| type | Reference | |||||
|---|---|---|---|---|---|---|
| title | Monorepo tooling rollout work queue | |||||
| description | Ephemeral phase tracker for rolling out Nx local cache, deterministic prepare graph, declaration maps, dependency-cycle linting, and dev watch in the React Native Firebase monorepo. | |||||
| tags |
|
|||||
| timestamp | 2026-07-10 00:00:00 UTC |
COMPLETE (2026-07-11): MT0.0–MT4 + docs committed. MTV closed — validation + review GREEN; branch ready for PR. Next pickup: MT-WATCH (deferred) or PR. Goal/order: update Lerna → guardrails first (cycle lint, docs, benchmark) → deterministic cached prepare (graph +
nx.jsonincl. complete outputs + scoped inputs + no-cloud +aisplit) → declaration maps → dependency-rule hardening → full validation. Dev watch / e2e-rerun is deferred to a later gap-analysis pre-phase (not on the critical path).
Ephemeral tracker; see OKF policy. Work types / tiers / gate field ids: iteration vocabulary. Loop, gates, host rule, harness: change authoring workflow — not restated. Agent commands: agent command policy only — no yarn workspace … prepare, no Jet probes.
Durable decisions: architecture-decisions.md. Design detail: prepare-and-cache.md.
| ADR | Decision |
|---|---|
| MonoTool-AD-1 | Nx local cache via Lerna runner; no Turborepo; no Nx Cloud |
| MonoTool-AD-2 | Keep Lerna for versioning + publish |
| MonoTool-AD-3 | Build order via devDependencies |
| MonoTool-AD-4 | One inlined prepare command; no wrapper script |
| MonoTool-AD-5 | Keep bob; emit declaration maps |
| MonoTool-AD-6 | dependency-cruiser as lint:deps |
| MonoTool-AD-7 | AI fixtures = Jest prerequisite, not build step |
| MonoTool-AD-8 | .nx/cache on CI (with NX_NO_CLOUD), not on publish |
| MonoTool-AD-9 | Dev watch + e2e rerun off Metro — Deferred (gap-analysis pre-phase) |
| MonoTool-AD-10 | Generated version files are declared cache outputs, not committed |
| MonoTool-AD-11 | Scope prepare cache inputs via a jsSource namedInput |
| MonoTool-AD-12 | Never Nx-cache prepare when the script is patch-package |
| Phase | Scope | Depends on | Why |
|---|---|---|---|
| MT0.0 | Update lerna to current (pulls current bundled nx) |
— | Prereq: nx.json keys + nx watch fixes; cheap |
| MT0.1 | dependency-cruiser lint:deps (no-circular) + scoped config + CI + change-authoring gate |
MT0.0 | Guardrail; cheap; catches cycles before graph edits |
| MT0.2 | Durable OKF docs (this bundle) | — | Landed (planning + adversarial-review revision) |
| MT0.3 | scripts/benchmark-prepare.sh + pre-Nx baseline numbers |
MT0.0 | Baseline before cache claims |
| MT1 | devDependency graph (17 pkgs) + nx.json (scoped inputs + complete outputs + no-cloud) + inline prepare (name unchanged) + ai prepare split + gated AI fetch + CI .nx/cache (NX_NO_CLOUD) |
MT0.3 | Deterministic, cached prepare |
| MT2 | declarationMap in base + ai + vertexai tsconfig |
MT1 | IDE go-to-definition; cheap follow-on |
| MT4 | dependency-cruiser rule hardening (not-to-own-dist scoped + hub/chain allowlist) |
MT1 | Enforce graph after devDeps land |
| MT-WATCH | Deferred — gap-analysis pre-phase: dev watch + event-driven e2e rerun | MT1 | Not built today; needs detailed analysis before implementation; off critical path |
| MTV | Branch-wide validation | MT1, MT2, MT4 | Merge gate (MT-WATCH not required) |
Gate prerequisites before any :test-cover (host rule):
- Pre-flight: host-clear probes, services ready, harness matches validation tier; serial
:test-coverruns; frozen tree forindependent-review. - Most items here are config/build/docs (no
:test-cover); e2e applies only where the row'svalidation_tiernames it (MTV, and the deferred MT-WATCH if/when it reaches implementation).
Each item is one serial loop: implementation (unit-focused) → independent-review (frozen) → commit. Gate fields: iteration vocabulary. No item touches packages/*/lib/** runtime or android/ios native, so coverage_evidence_gate: n/a throughout (verify per item against the coverage grep).
- next_work_type:
commit· validation_tier:area-focused· gates: implclosed, reviewclosed, commitclosed· commit_subject:build(deps): refresh nx for lerna runner - Do:
- Bump
lernato the latest release in rootdevDependencies; refreshyarn.lock. This pulls a current bundlednx(MonoTool-AD-1 prerequisite). - Confirm the bundled
nxversion supports thenx.jsonkeys used in MT1 (neverConnectToCloud,namedInputs, per-targetcache/inputs/outputs) and includes thenx watch --all --initialRunfix (nx PR #32282) needed by the deferred MT-WATCH.
- Bump
- Acceptance:
yarninstalls cleanly;yarn lerna:preparestill exits 0 (behavior unchanged pre-nx.json).yarn lint,yarn tsc:compile,yarn tests:jestremain green.- Record the resulting
lerna+ bundlednxversions in a note (feeds MT1/MT-WATCH version checks).
- Implementation evidence (unit-focused, 2026-07-10):
- Change:
lernawas already current at9.0.7; refreshed transitivenx/@nx/devkitfrom22.1.3→22.7.6via lockfile refresh (no rootresolutionspins; Lerna's>=21.5.3 <23.0.0range resolves to latest 22.x). - Files changed:
yarn.lock(Nx-family bump only; nopackage.jsonpin). - Version evidence:
lerna9.0.7→9.0.7; bundlednx22.1.3→22.7.6;nx-schema.jsonincludesneverConnectToCloud,namedInputs, and per-targetcache/inputs/outputs. - Validation evidence:
Command Exit Notes yarn0 Clean install; peer warnings only yarn lerna:prepare0 20 projects prepared successfully yarn lint0 JS + Android + iOS lint/checks green yarn tsc:compile0 Root TS compile clean yarn tests:jest0 82 suites / 1172 tests passed; log /tmp/mt0-jest.log
- Change:
- Independent-review findings (area-focused, 2026-07-10):
- Serious (initial): first pass used
resolutionsfornxonly;@nx/devkitskewed at22.1.3. Remediation replaced pins with lockfile refresh (no root resolutions); Nx-family aligns at22.7.6. - Minor: commit subject updated to
build(deps): refresh nx for lerna runner. - Review validation reran green before finding:
yarn0 (/tmp/mt0-review-yarn.log),yarn lerna:prepare0,yarn lint0 (/tmp/mt0-review-lint.log),yarn tsc:compile0 (/tmp/mt0-review-tsc.log),yarn tsc:compile:consumer0 (/tmp/mt0-review-tsc-consumer.log),yarn tests:jest0 (/tmp/mt0-review-jest.log, 82 suites / 1172 tests). Coverage evidence: n/a (nopackages/*/lib/**or native bridge sources).
- Serious (initial): first pass used
- Remediation evidence (unit-focused, 2026-07-10):
- Change: removed
nx/@nx/devkitresolutions;yarn installlockfile refresh aligns all Nx-family packages at22.7.6(no22.1.3entries remain). - Version evidence:
lerna9.0.7unchanged;nx22.7.6;@nx/devkit22.7.6;@nx/nx-darwin-arm6422.7.6;nx-schema.jsonkeys present;nx watch --all --initialRunsupported at22.7.6(>= 22.6.0 threshold). - Validation evidence:
Command Exit Notes yarn0 Clean install; peer warnings only; log /tmp/mt0-remediation-yarn.logyarn lerna:prepare0 20 projects prepared successfully; log /tmp/mt0-remediation-lerna-prepare.logyarn lint0 JS + Android + iOS lint/checks green; log /tmp/mt0-remediation-lint.logyarn tsc:compile0 Root TS compile clean; log /tmp/mt0-remediation-tsc.logyarn tests:jest0 82 suites / 1172 tests passed; log /tmp/mt0-remediation-jest.logyarn tsc:compile:consumer0 Consumer TS compile clean; log /tmp/mt0-remediation-tsc-consumer.log
- Change: removed
- Independent-review evidence after remediation (area-focused, 2026-07-10):
- Findings: none. Serious
@nx/devkitskew fixed; no22.1.3Nx-family entries remain inyarn.lock;nx,@nx/devkit, and all@nx/nx-*platform packages resolve to22.7.6. - Diff scope verified:
package.jsonunchanged by Nx pinning;lernaremains^9.0.7/ CLI9.0.7; lockfile churn is Nx-family transitive updates, not unrelated scope. - Validation evidence:
Command Exit Notes yarn0 Clean install + postinstall prepare; log /tmp/mt0-fresh-review-yarn.logyarn lerna:prepare0 20 projects prepared yarn lint0 JS + Android + iOS checks green; log /tmp/mt0-fresh-review-lint.logyarn tsc:compile0 Root TS compile; log /tmp/mt0-fresh-review-tsc.logyarn tests:jest0 82 suites / 1172 tests; log /tmp/mt0-fresh-review-jest.logyarn tsc:compile:consumer0 Consumer TS compile; log /tmp/mt0-fresh-review-tsc-consumer.log - Coverage evidence: n/a (no
packages/*/lib/**or native bridge sources).
- Findings: none. Serious
- next_work_type:
commit· validation_tier:area-focused· gates: implclosed, reviewclosed, commitclosed· commit_subject:build(deps): add dependency-cruiser lint:deps for lib import graph - Do:
- Add
dependency-cruiserdevDependency (root). - Add
.dependency-cruiser.cjswith ruleno-circularonpackages/*/lib/**(allowlist +not-to-own-disthardening deferred to MT4). Scope the config now (design):doNotFollow/excludefornode_modules,packages/*/dist/**,packages/*/__tests__/**,packages/*/e2e/**; setoptions.tsConfig+enhancedResolveOptionsso the@react-native-firebase/*path aliases resolve. package.json:"lint:deps": "depcruise --config .dependency-cruiser.cjs packages"; addyarn lint:depsinto the JS lint path.- CI: add a
lint:depsstep in.github/workflows/linting.ymllint job. okf-bundle/testing/validation-checklist.md§ lint +change-authoring-workflow.mdlint gate: notelint:depsblocking whenpackages/*/lib/**in diff (durable OKF edit → DRY pass).
- Add
- Acceptance:
yarn lint:depsexits 0 on current tree (graph is a DAG today).- Resolution sanity: at least one real cross-package edge (e.g. a satellite →
@react-native-firebase/app/...) is resolved, not reported as unresolvable (proves the tsconfig-alias wiring works). yarn lint(full) still exits 0.- Introducing a deliberate temporary cycle makes
yarn lint:depsexit non-zero (then revert). - CI lint job runs the step.
- Implementation evidence (unit-focused, 2026-07-10):
- Change: added
dependency-cruiser@17.4.3; new.dependency-cruiser.cjswith scoped inter-packageno-circularonpackages/*/lib/**, excludes fornode_modules/dist/__tests__/e2e, TS path-alias resolution via generatedtsconfig.depcruise.json; rootlint:depswired intoyarn lint; CI step in.github/workflows/linting.yml; OKF validation gates updated invalidation-checklist.md+change-authoring-workflow.md. - Files changed:
package.json,yarn.lock,.dependency-cruiser.cjs,.github/workflows/linting.yml,okf-bundle/testing/validation-checklist.md,okf-bundle/testing/change-authoring-workflow.md. - Validation evidence:
Command Exit Notes yarn lint:deps0 32 modules / 74 deps; log /tmp/mt01-lint-deps.logyarn lint0 JS + deps + Android + iOS; log /tmp/mt01-lint.logtemporary cycle → yarn lint:deps3 app ↔ crashlytics cycle detected; log /tmp/mt01-lint-deps-cycle.logpost-revert yarn lint:deps0 temp import reverted; clean tree restored - Resolution sanity:
packages/analytics/→packages/app/edge resolved (@react-native-firebase/app/dist/module/common, typesaliased-tsconfig-paths); 0 unresolved from analytics; log/tmp/mt01-resolution-sanity.log. - Follow-ups flagged by implementer: generated
tsconfig.depcruise.jsoneach run (consider.gitignore); graph currently analyzes compiledlib/**/*.js(excludes.ts); CI runslint:depstwice via dedicated step +yarn lint.
- Change: added
- Independent-review findings (area-focused, 2026-07-10):
- Serious: config excludes authored
lib/**/*.tsand effectively analyzes ephemeral/committed.jssidecars, not the real TS import graph; on a clean CI tree without local compile sidecars, MT0.1 acceptance is not proven. Remediation required: remove.tsexclude, cruise authored TS underpackages/*/lib/**, and re-validate on a clean tree. - Minor: gitignore generated
tsconfig.depcruise.json; tighten cruise scope/excludes (plugin/__tests__, non-lib/**noise); deduplicate CIlint:depsinvocation (dedicated step oryarn lint, not both). - Review validation:
yarn lint:deps0 (/tmp/mt01-review-lint-deps.log);yarn lint/yarn lint:jsfailed on this host due to ephemeral untrackedpackages/*/lib/**/*.jssidecars (~19.5k eslint errors), outside MT0.1 frozen scope but relevant to clean-tree proof. Coverage evidence: n/a.
- Serious: config excludes authored
- Remediation evidence (unit-focused, 2026-07-10):
- Change: TS-first depcruise config (
includeOnlyonpackages/*/lib/**/*.ts(x),moduleResolution: 'node',noEmit: true); scoped excludes; gitignoredtsconfig.depcruise.json;lint:depsscoped topackages/*/lib; CI deduped to singleyarn lintstep. - Files changed:
.dependency-cruiser.cjs,.gitignore,package.json,.github/workflows/linting.yml,okf-bundle/testing/validation-checklist.md. - Validation evidence:
Command Exit Notes yarn lint:deps(clean TS tree)0 19 modules / 23 deps; log /tmp/mt01-remediation-lint-deps-clean.logresolution sanity (analytics → app) 0 @react-native-firebase/app→packages/app/viaaliased-tsconfig-paths; log/tmp/mt01-remediation-resolution-sanity.logtemp cycle → yarn lint:deps3 app ↔ crashlytics; log /tmp/mt01-remediation-lint-deps-cycle.log; revertedpost-revert yarn lint:deps0 log /tmp/mt01-remediation-lint-deps-post-revert.logyarn lint:js0 ESLint green yarn lint1 lint:depspasses;lint:androidfailed (google-java-formatexit 1) — implementer claims pre-existing Android formatter flake unrelated to MT0.1 - Clean-tree proof: validation used authored TS only (ephemeral untracked
lib/**/*.jssidecars temporarily moved aside; tracked memidb.jsretained).
- Change: TS-first depcruise config (
- Independent-review evidence after remediation (area-focused, 2026-07-10):
- Findings: no serious findings. One minor local-only caveat: with ephemeral untracked
lib/**/*.jssidecars present, standaloneyarn lint:depscan vacuously pass (0 deps cruised); mitigated becauseyarn lintrunslint:jsfirst and CI uses clean checkout. - Validation evidence (clean TS tree):
Command Exit Notes yarn lint:deps0 19 modules / 23 deps cruised; log /tmp/mt01-fresh-review-lint-deps-clean.logresolution sanity (analytics → app) 0 @react-native-firebase/app→packages/app/yarn lint:js0 log /tmp/mt01-fresh-review-lint-jsyarn lint0 js + deps + android + ios; log /tmp/mt01-fresh-review-lint-clean.logyarn lint:android(isolated)0 prior android flake not reproduced - Coverage evidence: n/a.
- Findings: no serious findings. One minor local-only caveat: with ephemeral untracked
- work type:
documentation· validation_tier: none · gates: n/a · commit_subject:docs: add monorepo tooling OKF bundle - Do:
okf-bundle/monorepo-tooling/{index.md,architecture-decisions.md,prepare-and-cache.md,work-queue.md}; add a "Monorepo tooling" entry tookf-bundle/index.md. - Acceptance: OKF DRY/consistency pass green (canonical location, link hygiene, durable vs ephemeral split); decisions live only in
architecture-decisions.md; ephemeral phases live only here. Documentation/DRY pass completed afterdocs: correct assertion about JS bundles in dev.
- next_work_type:
commit· validation_tier: none · gates: implclosed, reviewclosed, commitclosed· commit_subject:build(scripts): add prepare benchmark script - Do:
scripts/benchmark-prepare.sh(macOS; scenarios A–D from prepare-and-cache § benchmark); capture pre-Nx B/C/D medians into a benchmarks note. - Acceptance:
- Script runs A–D, prints median-of-3 per scenario, exits 0.
- Pre-Nx baseline numbers recorded (used to prove MT1 gains).
- Implementation evidence (none tier, 2026-07-10):
- Change: added
scripts/benchmark-prepare.sh(macOS guard, scenarios A–D, median-of-3, reversible firestore edit withEXITtrap); ephemeral baseline noteprepare-benchmark-baseline.md. - Files changed:
scripts/benchmark-prepare.sh,okf-bundle/monorepo-tooling/prepare-benchmark-baseline.md. - Pre-Nx medians (s): A 125.583; B 23.686; C 23.694; D 23.758. Logs:
.tmp/prepare-benchmarks/20260710-122118/. - Validation evidence:
Command Exit Notes bash ./scripts/benchmark-prepare.sh0 Full A–D run (~624s unsandboxed); sandboxed first attempt failed on partial node_modulesremovalbash -n scripts/benchmark-prepare.sh0 Syntax check - Coverage evidence: n/a (no
packages/*/lib/**runtime or native bridge edits committed).
- Change: added
- Independent-review evidence (none tier, 2026-07-10):
- Findings: none. Script aligns with
prepare-and-cache.mdbenchmark methodology; baseline numbers live in ephemeral note only. - Validation evidence:
Command Exit Notes bash -n scripts/benchmark-prepare.sh0 Review smoke syntax check - Coverage evidence: n/a.
- Findings: none. Script aligns with
- next_work_type:
commit· validation_tier:area-focused· gates: implclosed, reviewclosed, commitclosed· commit_subject:build(deps): enforce package build order and enable nx prepare cache - Do:
- Add
"@react-native-firebase/app": "<version>"todevDependenciesof the 17 packages = every package exceptappandvertexai(16 plain satellites +ai);vertexaiorders transitively via itsaidependency (MonoTool-AD-3; counts owned by prepare-and-cache § graph). - Add
nx.json— design:neverConnectToCloud: true;namedInputs.jsSource;preparetargetdependsOn: ["^prepare"],inputs: ["jsSource"](MonoTool-AD-11),cache: true,outputs=dist/**+plugin/build/**+lib/version.ts(MonoTool-AD-10). - Add an
app-scopednx.targets.prepare.outputsoverride inpackages/app/package.jsonre-listingdist/**,plugin/build/**,lib/version.ts,ios/RNFBApp/RNFBVersion.m,android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseVersion.java(MonoTool-AD-10). - Update the
yarn lerna:preparebody (name unchanged) tocross-env NX_NO_CLOUD=true lerna run prepare(MonoTool-AD-4). packages/ai: dropyarn tests:ai:mocksfromprepare; add an AI-test-gated Jest prerequisite (single flat jest config — aglobalSetupthat no-ops unless the run includespackages/ai/__tests__/**, or aprojectssplit) running the fetch + convert scripts; make the fetch offline-idempotent (local-clone short-circuit beforegit ls-remote) (MonoTool-AD-7).- CI: restore/save
.nx/cacheviaactions/cachein PR/main jobs; setNX_NO_CLOUD=trueon every Nx-running job; do not touchpublish.yml(MonoTool-AD-8). - Remove scoped-prepare guidance from
validation-checklist.md(durable OKF edit → DRY pass).
- Add
- Acceptance:
- Determinism: from a clean dist (
rm -rf packages/*/dist packages/*/plugin/build),yarn lerna:prepareexits 0 repeatably (run ≥3×);packages/app/dist/**exists before any satellitecompile(no ordering race). If ordering is not honored, switch the inline body tonx run-many -t prepare(MonoTool-AD-4 fallback). - Cache-replay completeness (regression guard for MonoTool-AD-10): after a warm prepare, delete the generated files (
git clean -fdx -- 'packages/*/lib/version.ts' packages/app/ios/RNFBApp/RNFBVersion.m 'packages/app/android/**/ReactNativeFirebaseVersion.java') andpackages/*/dist, then re-runyarn lerna:prepare(cache hit) → all generated files are restored, andyarn tests:jest+yarn tsc:compilestill exit 0. (Simulates the fresh-CI-checkout + restored-.nx/cachepath.) yarn tsc:compileandyarn tsc:compile:consumerexit 0.yarn tests:jestexits 0, includingpackages/ai(fixtures fetched via the gated prerequisite, notprepare); a non-AIyarn tests:jestrun performs no network fetch.- Input scoping (MonoTool-AD-11): editing a package's
__tests__/e2e/android/iosfile does not invalidate itspreparecache; editing itslib/**does. - A no-op
yarn lerna:prepare(MT0.3 scenario C) is materially faster than the pre-Nx baseline (cache hit); single-package edit (D) rebuilds only that package + dependents. - Publish-flow check (MonoTool-AD-2): a
lerna versiondry run rewrites the new internal@react-native-firebase/appdevDep ranges to the bumped version and shows no other release-flow change (no side effects). git grep vertexai-sdk-test-datashows fixtures still gitignored;yarn(fresh) does not clone test data.- Optional (review discretion): one platform e2e smoke to confirm
dist/module/**output is unchanged by the ordering change.
- Determinism: from a clean dist (
- Implementation evidence (unit-focused, 2026-07-10):
- Change: 17-package
@react-native-firebase/appdevDep graph; rootnx.json(scoped inputs/outputs, no-cloud); app nx output override;cross-env NX_NO_CLOUD=true lerna run prepare; AI mocks out ofprepareinto gated JestglobalSetup; fetch script local-clone fast path; CI.nx/cacherestore/save +NX_NO_CLOUDon jest/lint/e2e jobs; validation-checklist scoped-prepare line removed. - Files changed:
nx.json,package.json,packages/{app,ai,16 satellites}/package.json,jest.config.js,scripts/jest-ai-mocks-global-setup.js,scripts/fetch_ai_mock_responses.ts,.github/workflows/{tests_jest,linting,tests_e2e_*}.yml,okf-bundle/testing/validation-checklist.md,yarn.lock. - Validation evidence:
Command Exit Notes yarn0 Fresh install + postinstallDev prepare (20 projects); /tmp/mt1-yarn-fresh.logyarn lerna:prepare×30 Warm cache ~1.38–1.40s each; /tmp/mt1-lerna-prepare-repeat.logDeterminism (clean dist ×3) 0 packages/app/dist/module/index.jspresent;/tmp/mt1-determinism.logCache-replay (AD-10) 0 20/20 cache hits; version + native files restored; /tmp/mt1-cache-replay-*.logyarn tsc:compile0 /tmp/mt1-tsc.logyarn tsc:compile:consumer0 /tmp/mt1-tsc-consumer.logyarn tests:jest0 82 suites / 1172 tests; /tmp/mt1-jest.logNon-AI jest 0 59 suites / 847 tests, no network; /tmp/mt1-jest-non-ai.logyarn lint:js+yarn lint:deps0 /tmp/mt1-lint-{js,deps}.logBenchmark (post-Nx A–D) 0 See prepare-benchmark-baseline.md§ Post-Nx; logs.tmp/prepare-benchmarks/20260710-152608/; C 1.410s vs pre-Nx 23.694s (~16.8×); B 1.880s vs 23.686s (~12.6×); D median 1.457s vs 23.758slerna changed+ devDep spot-checkn/a No --dry-runin Lerna 9; devDeps at25.1.0on analytics/ai/firestore;/tmp/mt1-lerna-changed.loggit grep vertexai-sdk-test-data0 Fixtures gitignored; /tmp/mt1-git-grep-fixtures.log - Coverage evidence: n/a (no
packages/*/lib/**or native bridge product edits). - Deviations noted: full
yarn lint(android/ios) not run; lib-edit cache bust not directly exercised; Nx intermittent flaky-task warning on cache-replay (all exit 0).
- Change: 17-package
- Independent-review findings (area-focused, 2026-07-10):
- Serious:
nx.json+scripts/jest-ai-mocks-global-setup.jsuntracked — must stage before commit. - Serious:
shouldFetchAiMocks()ignores CLI--testPathIgnorePatterns=packages/ai(Jest passes pre-CLI config to globalSetup); non-AI runs can still fetch on fresh hosts. Fix: inspectprocess.argvfor ignore patterns containingpackages/ai. - Minor: non-AI validation command misleading until #2 fixed.
- Nit: do not commit
.dependency-cruiser.min.cjs; android format warning pre-existing. - Review validation: all re-runs green; cache-replay AD-10 verified 20/20 hits. Logs
/tmp/mt1-review-*.log. - Gate: review_gate stays open — remediation required.
- Serious:
- Remediation evidence (unit-focused, 2026-07-10):
- Change:
getArgvTestPathIgnorePatterns()merges CLI--testPathIgnorePatterns(= and space forms) withglobalConfig.testPathIgnorePatterns; AI ignored via argv skips fetch. - Files changed:
scripts/jest-ai-mocks-global-setup.js. - Validation evidence:
Command Exit Notes yarn tests:jest --testPathIgnorePatterns=packages/ai0 No fetch output; /tmp/mt1-remediation-ignore-equals.logyarn tests:jest --testPathIgnorePatterns packages/ai0 No fetch output; /tmp/mt1-remediation-ignore-space.logyarn tests:jest -- packages/firestore0 No fetch; /tmp/mt1-remediation-firestore.logyarn tests:jest -- packages/ai0 Fetch invoked; /tmp/mt1-remediation-ai-fetch.lognode --check scripts/jest-ai-mocks-global-setup.js0 Syntax
- Change:
- Independent-review evidence after remediation (area-focused, 2026-07-10):
- Findings: none. Prior serious (untracked deliverables — content OK; staged at commit; globalSetup argv gating) resolved.
- Validation evidence:
Command Exit Notes yarn lerna:prepare0 20/20 cache hits; /tmp/mt1-delta-review-20260710-125221.logNon-AI jest (ignore patterns) 0 Zero fetch with clone moved aside yarn tests:jest -- packages/ai0 Fetch invoked when AI included yarn tests:jest(full)0 82 suites / 1172 tests yarn tsc:compile+ consumer0 - Coverage evidence: n/a.
- next_work_type:
commit· validation_tier:area-focused· gates: implclosed, reviewclosed, commitclosed· commit_subject:build(ts): emit declaration maps for package builds - Do: add
declaration: true+declarationMap: truetotsconfig.packages.base.json,packages/ai/tsconfig.json,packages/vertexai/tsconfig.json(MonoTool-AD-5). - Acceptance:
- After
yarn lerna:prepare,packages/*/dist/typescript/**/*.d.ts.mapexist. yarn tsc:compileexits 0;yarn lintexits 0.- Spot-check: IDE go-to-definition on a cross-package symbol lands on
lib/**source (record the check in notes). - Map resolves to shipped source: open one emitted
.d.ts.mapand confirm itssourcespoint at the publishedlib/*.ts(relative, no absolute path leak) — sincefilespublisheslib, external consumers get go-to-definition too. .d.ts.mapdo not leak into unintended published paths (bobfiles/excludestill correct).
- After
- Implementation evidence (unit-focused, 2026-07-10):
- Change: added
declaration: true+declarationMap: truetotsconfig.packages.base.json,packages/ai/tsconfig.json,packages/vertexai/tsconfig.json(MonoTool-AD-5). - Files changed:
tsconfig.packages.base.json,packages/ai/tsconfig.json,packages/vertexai/tsconfig.json. - Map spot-check:
FirebaseApp(analytics/lib/index.ts→@react-native-firebase/app→packages/app/dist/typescript/lib/index.d.ts) go-to-def targetpackages/app/lib/index.ts;index.d.ts.maphassourceRoot: "",sources: ["../../../lib/index.ts"], 0 absolute-path leaks; 310.d.ts.mapemitted, all underdist/typescript(0 indist/module). - Validation evidence:
Command Exit Notes yarn lerna:prepare0 20 projects rebuilt (base tsconfig change busted cache); /tmp/mt2-prepare.log.d.ts.mapcount/leak scan0 310 maps; 0 absolute leaks; 0 outside dist/typescript;/tmp/mt2-dtsmap-count.log,/tmp/mt2-leak-scan.logyarn tsc:compile0 /tmp/mt2-tsc.logyarn tsc:compile:consumer0 /tmp/mt2-tsc-consumer.logyarn lint(full)0 js + deps + android + ios; /tmp/mt2-lint-2.log(android formatter flaked once, clean on re-run)yarn lint:deps0 19 modules / 23 deps; /tmp/mt2-lint-deps.logyarn tests:jest0 82 suites / 1172 tests; /tmp/mt2-jest.log - Coverage evidence: n/a (tsconfig/build-config only; no
packages/*/lib/**or native bridge edits).
- Change: added
- Independent-review evidence (area-focused, 2026-07-10):
- Findings: none. Product diff is three tsconfig files only.
- Validation evidence:
Command Exit Notes yarn lerna:prepare0 20/20 cache hits; /tmp/mt2-review-prepare.log.d.ts.mapcount/leak scan0 310 maps; 0 absolute leaks; 0 in dist/module;/tmp/mt2-review-dtsmap-scan.lognpm pack --dry-run(analytics)0 11 maps in tarball under dist/typescript;/tmp/mt2-review-publish-check.logyarn tsc:compile+ consumer0 /tmp/mt2-review-tsc.log,/tmp/mt2-review-tsc-consumer.logyarn lint(full)0 js + deps + android + ios; /tmp/mt2-review-lint-full.logyarn tests:jest0 82 suites / 1172 tests; /tmp/mt2-review-jest.log - Coverage evidence: n/a.
- next_work_type:
commit· validation_tier:area-focused· gates: implclosed, reviewclosed, commitclosed· commit_subject:build(deps): enforce package import boundaries - Do: extend
.dependency-cruiser.cjs(MonoTool-AD-6):not-to-own-dist(forbid only relative../dist/**/./dist/**imports — not the mapped hub API@react-native-firebase/app/dist/module/..., which is legitimate); graph allowlist (satellites →apponly;ai→auth/app-check;vertexai→ai). - Acceptance:
yarn lint:depsexits 0 on current tree with the stricter rules (the existing@react-native-firebase/app/dist/module/...imports in ~15 satellites must not be flagged).- A deliberate off-graph import (e.g.
firestoreimportingauth) failslint:deps(then revert). - A deliberate relative own-
../distimport failslint:deps(then revert). yarn lintfull still exits 0.
- Implementation evidence (unit-focused, 2026-07-10):
- Change: extended
.dependency-cruiser.cjswithnot-to-own-dist(module scope, same-package capture),hub-no-internal,satellites-only-hub,ai-graph,vertexai-graph; dynamic tsconfig paths for all non-hub packages;includeOnlywidened to retain own-dist edges; collapse removed so module-scope violations survive. - Files changed:
.dependency-cruiser.cjs. - Probe evidence:
Probe Exit Notes Clean yarn lint:deps0 313 modules / 963 deps; /tmp/mt4-lint-deps-clean.logOff-graph (firestore → auth) 1 satellites-only-hub; reverted;/tmp/mt4-probe-off-graph.logOwn-dist (analytics ../dist/module)1 not-to-own-dist; reverted;/tmp/mt4-probe-own-dist.log - Validation evidence:
Command Exit Notes yarn lint:js0 /tmp/mt4-lint-js.logyarn lint(full)0 /tmp/mt4-lint-full.logyarn tsc:compile0 /tmp/mt4-tsc-compile.logyarn tests:jest0 82 suites / 1172 tests; /tmp/mt4-tests-jest.log - Coverage evidence: n/a (config-only).
- Change: extended
- Independent-review evidence (area-focused, 2026-07-10):
- Findings: minor (non-blocking, out of MT4 acceptance scope): (1) type-only imports bypass graph allowlist — value imports enforced; matches existing ai/vertexai patterns; (2) relative cross-package
../../pkg/dist/bypasses allowlist path matching — current tree uses alias imports only; own-dist rule catches same-package relative dist. - Validation evidence:
Command Exit Notes yarn lint:deps(clean)0 313 modules / 963 deps; /tmp/mt4-review-lint-deps-clean.logOff-graph probe (firestore → auth) 1 reverted; /tmp/mt4-review-probe-off-graph.logOwn-dist probe 1 reverted; /tmp/mt4-review-probe-own-dist.logyarn lint(full)0 /tmp/mt4-review-lint-full.logyarn tsc:compile0 /tmp/mt4-review-tsc-compile.logyarn tests:jest0 82 suites / 1172 tests; /tmp/mt4-review-tests-jest.log - Coverage evidence: n/a.
- Findings: minor (non-blocking, out of MT4 acceptance scope): (1) type-only imports bypass graph allowlist — value imports enforced; matches existing ai/vertexai patterns; (2) relative cross-package
- next_work_type:
gap-analysis· validation_tier:area-focused(only if it reaches implementation) · gates: implopen, reviewopen, commitopen· commit_subject: n/a until analysis converges - Status: Deferred — no incremental dev-watch/hot-reload loop exists today; off the critical path for MT1/MT2/MT4/MTV (MonoTool-AD-9). This pre-phase does the detailed analysis that must precede any implementation.
- Do (analysis):
- Resolve the Tier A command caveats (design): verify bundled
nxincludes the--all --initialRunfix (else first pass vianx run-many -t prepare); usenx run-many -t prepare -p $NX_PROJECT_NAMEfor multi-project watch batches. - Note: the OKF debug/release correction already landed separately as
docs: correct assertion about JS bundles in dev; running e2e § Rules #3 is now the canonical owner of that fact. MT-WATCH only needs to analyze the dev-watch and event-driven rerun mechanics. - Analyze the event-driven e2e rerun (Metro
update-done/onBundleBuilt→ JetPOST /rerunon8091; design Tier C; Jet patch workflow); confirmupdate-doneobservability and whether an app-side Jet reload hook is simpler; assess coverage-teardown-handshake bypass in fast-rerun mode.
- Resolve the Tier A command caveats (design): verify bundled
- Acceptance (analysis):
- Written findings: viability, chosen command shapes, and a go/no-go for a follow-on implementation phase (with its own gates). If no-go, close as
documentation(record findings) — do not force implementation. dev:watch, if later implemented, is human-only —agent-command-policy.mdkeepsyarn lerna:preparecanonical.
- Written findings: viability, chosen command shapes, and a go/no-go for a follow-on implementation phase (with its own gates). If no-go, close as
- next_work_type: n/a · validation_tier:
full· gates: implclosed, reviewclosed, commitclosed· commit_subject: n/a (no product edit) - Status (2026-07-11): GREEN — validation (e821793c) + independent review (4361b403); no critical/serious findings.
- Validation evidence:
- Static: prepare ×3 (21 cache hits), AD-10 replay, tsc ×2, Jest 82/1172, lint/compare:types/reference:api exit 0 —
/tmp/mtv2-full-*.log - E2e: macOS 710/0/34, iOS 848/0/85, Android 878/0/54 —
/tmp/mtv2-full-e2e-*.log - Review: lint:deps, tsc, compare:types, prepare spot-check (20/20 hits) —
/tmp/mtv2-review-*.log
- Static: prepare ×3 (21 cache hits), AD-10 replay, tsc ×2, Jest 82/1172, lint/compare:types/reference:api exit 0 —
- Review follow-ups (non-blocking, post-merge OK):
app/scripts/**in nx cache inputs;lint:depsin agent-command-policy registry; AD-4 scoped-prepare wording; CI cache key nit.
| Item | impl | review | commit | next_work_type |
|---|---|---|---|---|
| MT0.0 | closed | closed | closed | commit |
| MT0.1 | closed | closed | closed | commit |
| MT0.2 | closed | n/a | closed | documentation (landed) |
| MT0.3 | closed | closed | closed | commit |
| MT1 | closed | closed | closed | commit |
| MT2 | closed | closed | closed | commit |
| MT4 | closed | closed | closed | commit |
| MT-WATCH | open | open | open | gap-analysis (deferred) |
| MTV | closed | closed | closed | n/a (merge gate passed) |