Repository navigation
chore: bring the knip baseline to zero and run knip in J5 CI - #815
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Contract and package exports packages/contracts/src/j5*, packages/contracts/src/settings.ts, packages/client-runtime/src/j5/*, packages/provider-core/src/j5/playbookInstructions.ts, packages/shared/src/* |
Constants and RPC declarations become module-local. Their values, schemas, and described behavior remain unchanged. |
A2A module exports apps/server/src/j5/a2a/... |
A2A helpers, errors, constants, and tool declarations become module-local. The A2A barrel file and coordination MCP configuration are removed. |
Server service exports apps/server/src/cloud/j5/legacyBootService.ts, apps/server/src/j5/{agents,artifacts,cli,persistence,playbooks,sharing,skills}/..., apps/server/src/mcp/..., apps/server/src/orchestration-v2/ThreadLaunchService.ts |
Helpers and declarations become module-local across these server modules. |
Analytics ledger subscription apps/server/src/j5/analytics/ExchangeAnalytics.ts |
ExchangeAnalytics removes the daemon-dependent layer factory and manual layer. Its layer always subscribes to committed ledger events. |
Web and desktop exports apps/desktop/scripts/electron-launcher.mjs, apps/desktop/src/electron/ElectronProtocol.ts, apps/web/src/j5/..., apps/web/src/rightPanelStore.ts |
Constants, helpers, hooks, and state values become module-local. The useIsOwner helper is removed. |
Knip configuration and CI knip.jsonc, .github/workflows/j5-ci.yml, FORK.md |
The Knip configuration adds workspace entries and exclusions. J5 CI runs knip:check after typechecking. FORK.md documents the check and its configuration. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Possibly related PRs
- Jacksondr5/j5code#774: Both PRs change the export status of
J5OrchestratorCapabilitiesTool. - Jacksondr5/j5code#719: This PR makes
J5_PROMPT_LINK_ORIGINmodule-local, changing the public contract added by that PR. - Jacksondr5/j5code#714: Both PRs modify the
layerGatedMcpOAuthlayer contract.
Merge Risk: 
Minimal · up to 7c241
-
The change adds the unused-code check and narrows exports. No merge-blocking issue is established.
Pre-merge checks: 
3 · 
1
-
Failed checks: 1 inconclusive Passed checks: 3 passed-
Full details: Title check
-
Explanation
The title names the two halves of the change: clearing the knip baseline to zero and running knip in J5 CI. The changeset matches both, since it removes unused exports and dead code and adds a knip:check step to the CI workflow. The title is a single short sentence, but 'chore:' prefix is generic and it lists two items. It is specific enough for a teammate to understand the primary change.
Full details: Out of Scope Changes check
-
Explanation
Each changed area connects to issue
#812or to its CI requirement:- Export removals in J5 and upstream files address knip unused-export findings. Upstream files changed only drop exports that J5 added or that have no external callers.
- Deleted J5 code (the a2a barrel, unused constants, useIsOwner, manualLayer) is unused code that knip reports. The deletions remove no used behavior.
- knip.jsonc entries and the FORK.md case 94 record support the baseline work and the ignores for upstream code.
- The j5-ci.yml change adds the knip:check step that issue
#812asks for.
ExchangeAnalytics.ts (diff read directly):
manualLayeris removed. Thelayerexport keeps the previousmakeLayer(true)behavior: it subscribes toledger.subscribeCommittedand runshandleCommitted. The indentation changes come from removing the factory wrapper. This matches the PR's statement of no runtime behavior change for this file.No change found that is unrelated to
#812. One residual point: the summary lists no test file changes for the removal ofmanualLayer, and the comment on it says tests used it. The author reports that typecheck and tests pass. This review did not confirm that independently.
Full details: Description check
-
Explanation
The description is complete and follows the required structure. It identifies the problem and issue, explains the changes, documents upstream impact, records testing, addresses UI and live-testing applicability, completes the checklist, and names the model and harness. The supplied summaries mention FORK.md case 94, while the description states case 95; verify the case number before merge.
-
Full details: Linked Issues check
-
Explanation
Issue
#812requires three coding outcomes: (1) the knip baseline reaches zero, by deleting unused code or adding reasoned knip.jsonc ignores; (2) upstream-owned code stays unchanged unless J5 edits made it unused, in which case its entries are ignored instead; (3) J5 CI runs knip:check.Evidence that supports the changes (AI-generated PR summary; ExchangeAnalytics.ts diff read directly):
- Many unused exports lost
exportacross J5 and upstream files. Upstream files changed only drop J5-added exports. - Dead J5 code is deleted: apps/server/src/j5/a2a/index.ts, A2A_DELIVERY_CONFIG_VERSION, J5_CODEX_COORDINATION_MCP_SERVER_CONFIG, useIsOwner, and ExchangeAnalytics manualLayer.
- The summary lists upstream code kept and ignored in knip.jsonc: both T3 wordmarks, the thread CLI command, configuredHostedAppUrl, useNpmReleasePublished, and buildT3ProjectFileJsonSchema.
- The summary lists script entries in knip.jsonc: fleet-load.ts, devDeliverySeedRunner.ts, and migrate-codex-fixtures.mjs.
- The summary reports a CI step,
pnpm exec vp run knip:check, added to .github/workflows/j5-ci.yml.
Unresolved uncertainty:
- The diffs for knip.jsonc and .github/workflows/j5-ci.yml could not be read. The changed blobs are missing from the checkout. The content of the ignore entries, their stated reasons, and the CI step rests on the AI-generated summary only.
- Knip cannot be run in this review. The zero-finding baseline is the author's report that check:changed passed. It is not confirmed here.
- The summary does not give a per-finding mapping from the 6 unused files and 142 unused exports to the changes. Completeness cannot be checked.
Resolution
Provide readable content for knip.jsonc and .github/workflows/j5-ci.yml at the reviewed head. Confirm that each new ignore entry states a reason and that the CI job runs knip:check. Provide knip output at the reviewed head that reports zero unused files and zero unused exports, or the result of
vp run knip:checkon that head. - Many unused exports lost
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
knip:check failed on a clean j5/main with 6 unused files and 142 unused exports, and J5 CI didn't run it. J5 code no longer exports what only its own file uses; dead J5 exports and the unused a2a barrel are deleted; J5 scripts run by path are knip entries. Upstream code whose callers J5 removed is left as written and ignored in knip.jsonc (FORK.md case 94). J5 CI now runs knip:check, as upstream's CI does. Closes #812 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tidy case 94 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d13963b to
37ebee3
Compare
Problem
vp run check:changedfailed its knip steps on a cleanj5/main: 6 unused files and 142 unused exports. J5 CI didn't runknip:check, so the count kept growing, and every agent saw a knip FAIL that wasn't theirs. Closes #812.What changed
Upstream's CI runs
knip:checkand upstream's pin is clean, so every finding came from J5's own edits:export. That includes 9 that J5 had added to upstream files (ThreadLaunchService.make,ALL_MCP_CAPABILITIES,RIGHT_PANEL_KINDS, the desktop scheme constants,APP_DISPLAY_NAME/APP_BUNDLE_ID,J5_PROMPT_LINK_ORIGIN,DEFAULT_SKILL_CATALOG_SOURCE, and the artifact tool classes). For those files this brings the code back toward upstream.apps/server/src/j5/a2a/index.ts(an unused barrel),A2A_DELIVERY_CONFIG_VERSION,J5_CODEX_COORDINATION_MCP_SERVER_CONFIG,useIsOwner, andExchangeAnalytics.manualLayer. TheExchangeAnalyticsdiff is mostly re-indentation (git diff -wshows it): withmanualLayergone, its layer factory lost its now-constantdaemonflag.fleet-load.tsanddevDeliverySeedRunner.ts(run fromscripts/j5/*.sh), andscripts/j5/migrate-codex-fixtures.mjs(run by hand, kept per FORK.md).knip.jsonc: both T3 wordmarks, thethreadCLI command,configuredHostedAppUrl,useNpmReleasePublishedandbuildT3ProjectFileJsonSchema. Deleting them would only add merge conflicts on every advance.knip:checkin the "Format, lint, and typecheck" job, as upstream's CI does, so the baseline stays at zero.Upstream impact
knip.jsonc: new FORK.md case 95 and a ledger row. Each J5 addition there is markedJ5:.apps/desktop/scripts/electron-launcher.mjs,apps/desktop/src/electron/ElectronProtocol.ts,apps/server/src/mcp/McpInvocationContext.ts,apps/server/src/orchestration-v2/ThreadLaunchService.ts,apps/web/src/rightPanelStore.ts,packages/contracts/src/settings.ts,packages/shared/src/promptLinks.ts: each only drops a J5-addedexport, which shrinks J5's diff. Their existing FORK.md records still hold. Case 2 namedALL_MCP_CAPABILITIESas an export, and that sentence is corrected.Docs to review: FORK.md case 95, its ledger row, the one-sentence fix to case 2, and two new steps in
docs/j5/process/upstream-merge.md. The first leaves upstream code J5 stops calling in place and ignores it in knip. The second runs knip on every advance and prunes stale ignores.Checklist
check:changedran typecheck on 36 packages and 66 test files beside the changes, all passing)knip.jsoncrecorded as case 95; the others only shrink existing editsvp run check:changed: format, lint, both knip passes, graphql, typecheck (36 packages) and tests (66 files) pass.Claude Opus 5.5 in Claude Code (J5 Code).
🤖 Generated with Claude Code