Repository navigation
Conversation
Add a private, workspace-only Rozenite plugin (packages/repack-devtools-plugin) that records ScriptManager activity, Module Federation runtime state and events, uncaught errors, dev-server compilations and requests, and turns them into diagnostics. - Panels for scripts, federation, dev server and errors/symbolication - 16 `rozenite agent callstack/repack-devtools` tools, including actions to reproduce issues headlessly (load-script, load-remote, invalidate-scripts, symbolicate, reload) - `withRepackDevTools` adds a compilation collector and `/repack-devtools/state` endpoints to any Re.Pack dev server - MF 2 runtime plugin export for recording from container start-up Wire it into all tester apps behind WITH_ROZENITE=true and add the repack-debug-runtime and repack-reproduce-issue skills describing how to use it to reproduce and root-cause issues.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
dannyhw
added this pull request to stack #1511
October 22, 2026 13:24
…ults Add agent tools to check retry, dedup and cache behaviour and to test failure handling without changing app code: - list-script-calls: every loadScript/prefetchScript/invalidateScripts call with outcome, duration, whether resolvers ran and whether it reused a stored attempt (the #1506 signature). The tracer returns a derived promise so unhandled rejections are still reported. - get-script-manager: stored promises with their state, resolvers, hook taps and cache; flags stored rejected promises. - inject-script-fault: fail or delay the resolve/load stage through ScriptManager hooks. - inject-server-fault / list-faults / clear-faults: make any dev server wrapped with withRepackDevTools (MF remotes included) answer with an error status, a delay or a dropped connection; also available as GET|POST|DELETE /repack-devtools/faults. The request log now records connections closed before a response (status 0) and marks faulted responses. The MF runtime plugin records the manifest HTTP status, since MF parses error pages as JSON and only reports a parse error.
…nostics Panels: - Detail boxes no longer collapse over the next section and scroll into view when opened from a table row. - Table cells keep long ids, URLs and messages on one line (full value on hover) instead of breaking every few characters; times, sizes and durations do not wrap; tables scroll sideways in narrow panels instead of clipping columns. - Diagnostics show identical messages once and only the first three until expanded. - Dev server: requests come before build output, warnings/errors and assets are collapsible, platforms that were never built show "not requested". - The symbolication result scrolls into view; the federation load box is hidden without an MF runtime. Data: - Strip ANSI colour codes from /symbolicate code frames. - Report a shared-package problem once when instances share a scope. - Group MF load failures per URL and downgrade them to warnings when a later load of the same URL succeeded.
This branch was successfully deployed
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1509.
Summary
Adds
packages/repack-devtools-plugin(@callstack/repack-devtools-plugin), a private, workspace-only Rozenite plugin. It makes Re.Pack runtime and dev-server state inspectable in DevTools and by fully automated agents. The aim is to reproduce issues and find root causes without a human driving the app.What it records
__webpack_require__.S.Diagnostics (
get-overview, severity-sorted, each with arefto the details):requiredVersionmismatchescatalog:/workspace:)/symbolicate400s with the reasonHow to reach it
rozenite agent callstack/repack-devtools <tool>. Besides reads, they include actions to reproduce issues headlessly:load-script,prefetch-script,invalidate-scripts,load-remote,symbolicate,clear,reload. Typed descriptors are exported from/sdkfor@rozenite/agent-sdk.withRepackDevTools(config)addsGET /repack-devtools/state,/compilation?platform=andPOST /clearto any dev server, including MF mini-app servers. These work with curl even when the bundle doesn't build.Tester apps
All four depend on the plugin from the workspace. Everything is behind
WITH_ROZENITE=true, as in #1509. tester-federation-v2's host also registers the runtime plugin viaruntimePluginsin development.Agent skills (
.agents/skills, symlinked into.claude/skills):repack-debug-runtime: setup, tool and endpoint reference, playbooks per failure type, and gotchas found while testing on device.repack-reproduce-issue: the issue → tester repro → evidence → root cause → fix → regression test loop.The design doc is in
agent_context/repack-devtools-oct2026.Notes
rozenite buildemits the CommonJS entry withmoduleResolution: node10, which TypeScript 7 removed.scripts/rozenite.mjsruns the CLI with TypeScript 5 (typescript-5alias) astsc. The package's owntypescriptstays at the workspace version. Pinning TS 5 directly gavereact-nativea different pnpm peer variant, so the MF host bundled two React Native copies and crashed (Tried to register two views with the same name DebuggingOverlay).@swc/helpersdevDependency: the testers' SWC loader transforms the linked package'sdist(it isn't undernode_modules), as with@callstack/repack.react-native-safe-area-contextandreact-native-screenswith versioncatalog:testers(copied from package.json). MF logs "does not satisfy the requirement" for these. Not fixed here.Test plan
pnpm --filter @callstack/repack-devtools-plugin test: 38 unit tests covering the ScriptManager reducer, error parsing, stack parsing and symbolication alignment, semver/federation diagnostics, the collector, request diagnostics, the middlewares against a real HTTP server, and the config wrapper.pnpm lint:ci,pnpm build.pnpm test: 17/17. No new tsc errors in the testers vs. base.get-overviewreports boot-recorded chunk loads and the/symbolicate400 from app start.load-scriptwith a bogus chunk produced aRequestFailurerecord plus a 404 diagnostic pointing atsrc_asyncChunks_Async_local_tsx.chunk.bundle.symbolicatemaps frames correctly. This caught and fixed an off-by-one: Re.Pack's symbolicator drops non-http frames.get-federationshows instances, remotes and share scopes, and the runtime plugin is active.load-remote MiniApp/MiniAppNavigatorloads the container and chunks through ScriptManager.get-dev-server --originexplains it.