fix(inspect): finish Workbench and documentation audits - #649
Merged
Conversation
`agent-bundle inspect --bundler` rendered the composed Rslib/Rsbuild author config — the framework profile with the `tools` hatch merged over it — not what the compiler receives. Each entry's `config` is now the lowered Rspack configuration from `inspection.origin.bundlerConfigs`, produced by the build's own lowering step and stopped where the build would start compiling. - rslib.ts: extract `lowerEntries` (create instance, compose every entry, `inspectProductionConfig`, `assertExecutableConfig`) and share it between `buildRslibSurfaces` and the new `inspectRslibEntries`; generalize `inspectProductionConfig` (NODE_ENV restore) to any `inspectConfig` owner. - mcp-apps.ts: extract `lowerViews` (Rsbuild instance, compile-time plugins, production inspection, `assertResolvedViewConfig`) and share it between `compileMcpApps` and the new `inspectMcpAppsConfig`. - inspect-bundler.ts: plan every Rslib output (scripts, routed CLI bins, MCP entries and flight workers, hook wrappers, package bin/lib) and lower each run through the shared step; render configs JSON-safe (`[function <name>]`, `[object <Class>]`, `[regexp /src/]`) with the artifact root folded to `<output>` and the synthesized dts tsconfig to `<generated-dts-tsconfig>` so the output is deterministic per project. - api.ts: `AB7001` for a refused bundler inspection carries the lowering's refusal message. - Tests: inspect-bundler.test.ts asserts the lowered shape (resolved aliases, externals, framework plugins, output.path tokens, determinism, refusal); cli.test.ts asserts the CLI JSON and human output against the same shape. - Docs: entry-conventions, diagnostics (AB7001), framework-mode, READMEs, and the en/zh CLI reference, package-entries, and distribution pages.
Ship hashed JS/CSS/assets so the foreground can cache them for a year, while index.html and other unhashed files stay no-store. Contributor HMR keeps stable unhashed names.
The prebuilt Workbench tree ships THIRD_PARTY_NOTICES and src/mcp/APP-RENDERER-LICENSE without an extension, so the asset source fell through to application/octet-stream and browsers downloaded them instead of rendering. Extensionless files whose basename is a conventional notice name (LICENSE, NOTICE, COPYING, and -/_ prefixed variants) are now typed text/plain; charset=utf-8. Other extensionless files keep the binary fallback and asset path containment is unchanged.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🦋 Changeset detectedLatest commit: 89df366 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
This was referenced Sep 5, 2026
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.
Summary
inspection.origin.bundlerConfigsininspect --bundlerindex.htmlno-store, target Chrome 120, and serve extensionless notices astext/plainRefs #566 and #572.
Measurement
pnpm docs:site:buildimproved from 102.42s to 91.48s in same-worktree single runs (10.7%); CI now builds declarations before docs.Validation
pnpm buildpnpm typecheck,pnpm lint,pnpm test:unit(concurrent after build)pnpm test:packedpnpm docs:site:buildReview hygiene
errorMessage.distPath.rootdocs, generated DTS tsconfig lowering parity/cleanup, AB7001 guidance, and release-note accuracy. Thepatchbump is retained per the audit delivery requirement despite the inspection JSON shape change. Two follow-up reviews found no remaining merge risk.