Repository navigation
refactor(platform): colocate the HarmonyOS, Linux and web interactors behind lazy factory facades - #3713
Conversation
… with their platform packages
…nyOS, Linux and web packages
…tin registry and let web use the canonical positional-ref selectors subpath
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Size Report
Startup median (7 runs, lower is better):
|
|
The move itself looks clean at 78b0602, and all 20 checks pass at that commit. Evidence is still pending: I did not rerun the affected checks or the layering scan, and I did not measure the module load graph at runtime, so please show a run of the layering scan on this head. No conflicts are known. Nothing else blocks merge once that evidence is in. Could each package export its createXInteractor from the root index instead of adding the Not blocking: the new subpath mechanism sits beside the existing root-import carve-out (https://github.com/callstack/agent-device/blob/78b0602/scripts/layering/platform-package-policy.ts#L98), and The only other thread, from cubic-dev-ai, no longer applies, because the summary now names the interactor subpaths, so please resolve it: #3713 (comment) |
|
Thanks. I tried the root-factory design, and fallow's circular-dependency gate blocks it. I left the PR head unchanged at Layering on What I tried: each package root exports Why it fails: The interactors statically import their deferred operations from the root, and fallow counts the factory's dynamic The only ways to keep the root factory are a |
|
Keeping the existing lazy facades for this extraction. The root-export experiment introduces three I independently checked the fresh evidence on unchanged head |
|
Thanks, that settles it at 78b0602. The root-export experiment shows why the smaller design does not work: it adds three |
|
Summary
unsupported-interactor) with their tests intoplatform-harmonyos,platform-linuxandplatform-web; no root implementation remains. Android, Apple and Vega are untouched../interactorexport is a lazy factory facade (src/interactor-facade.ts): type-only imports plus a function-scopedawait import('./interactor.ts'). The implementation stays private, so the facade's eager closure is one module and platform mechanics load only when the factory is called.register-builtins.tskeeps its dynamic imports, now of the package subpaths. The layering policy admits those subpaths only from that file and only dynamically. Web uses the canonicalselectors/interaction-positionalsstripAtPrefix.check:layeringnow names the dynamic-only interactor subpath exception (78b06026b1).Validation
Head
78b06026b1, merge-baseb7c93e3a37(origin/main is now87fe3ea83e; no rebase needed):pnpm check:affected --runon this exact head (pnpm 11.17.0,AGENT_DEVICE_VITEST_MAX_WORKERS=1, under the shared gate lock): all runnable checks passed, exit 0. Vitest-related: 1852 files, 15577 tests passed. GitHub-authoritative lanes (coverage, native, smoke) are CI-only.0776567d70) ran the same full gate green; the only change since is the one-line summary string.