refactor(app/deps): move redux-logger to devDependencies (#2625)
Summary
- Move
redux-logger ^3.0.6fromapp/package.jsondependenciestodevDependencies. - Auto-regenerated
pnpm-lock.yamlreflects the move (3 insertions / 3 deletions in the importer block). debugis deliberately untouched — it is the project's primary namespaced logger and is load-bearing in 10+ production code paths (CoreStateProvider,ChatRuntimeProvider, voice/mascot features,app/src/utils/tauriCommands/common.ts, etc.). Audit #2575 (M-2) overstated this; tracked in #2575's tracking comment.
Problem
app/package.json:104 listed "redux-logger": "^3.0.6" under dependencies. The actual consumer at app/src/store/index.ts:175-178 already gates createLogger behind if (IS_DEV) — so at runtime, production builds do not invoke redux-logger. Still, listing it under dependencies is an audit smell: the manifest advertises a runtime dependency on a dev-only logger. CWE-532 (Insertion of Sensitive Information into Log File).
Identified by audit #2575 (M-2). Supersedes #2623, which incorrectly bundled debug into the same change.
Solution
- Move
"redux-logger": "^3.0.6"fromdependenciestodevDependenciesinapp/package.json(alphabetical slot betweenprettierandtailwindcss). - Run
pnpm installto regeneratepnpm-lock.yaml— the workspace root lockfile, NOTapp/pnpm-lock.yamlwhich doesn't exist in this repo (single lockfile at root per pnpm workspaces convention). - No source changes:
app/src/store/index.ts:175-178already has theIS_DEVruntime guard. Staticimport { createLogger } from 'redux-logger'at line 2 is unchanged.
Notable finding (out of scope, flagged for follow-up): grep -r 'redux-logger' app/dist/ returned 11 matches — the redux-logger runtime library is being bundled into production despite the IS_DEV gate. Vite isn't tree-shaking the static import. This is pre-existing on main, not caused by this PR; the deps move is correct as audit-smell cleanup, but the bundling concern is orthogonal and worth a separate ticket.
Submission Checklist
- [x] N/A: Tests added or updated — dependency-block move; no source change. Existing
app/src/test/setup.ts:208-209already mocksredux-loggerfor tests and still passes. - [x] Diff coverage ≥ 80% — manifest + lockfile change; no source line coverage applies.
- [x] N/A: Coverage matrix updated — build/dep configuration change
- [x] N/A: All affected feature IDs from the matrix are listed in
## Related— dep management is not a matrix-tracked feature - [x] No new external network dependencies introduced — opposite, removes a runtime dependency advertisement
- [x] N/A: Manual smoke checklist updated — no behaviour change
- [x] Linked issue closed via
Closes #NNNin the## Relatedsection
Impact
- Security: closes CWE-532 surface in the dependency manifest. The bundled-bytes concern (Vite not tree-shaking the static import) remains and is flagged as a follow-up.
- Build: no change to dev or prod build behaviour;
pnpm installregenerates the lockfile without other dependency drift. - Tests: 3495 / 3500 pass (3 pre-existing failures in Conversations render + a port-selection flake, none related to redux-logger; same on main).
- Compatibility: dev still gets the existing collapsed-groups redux logging via the
IS_DEVbranch inapp/src/store/index.ts.
Related
- Closes #2625
- Supersedes #2623
- Parent: #2575
- Follow-up: separate ticket for Vite tree-shaking the static
redux-loggerimport out of the production bundle (today the gated dead-code branch still ships the runtime library bytes).
AI Authored PR Metadata
Linear Issue
- Key: N/A
- URL: N/A
Commit & Branch
- Branch:
refactor/2625-redux-logger-devdeps - Commit SHA:
053ad91c
Validation Run
- [x]
pnpm --filter openhuman-app format:check— PASS (no formatting changes) - [x]
pnpm typecheck— PASS - [x] Focused tests:
pnpm test3495/3500 PASS (3 pre-existing failures unrelated to this PR — Conversations render + port-selection flake) - [x] Rust fmt/check: N/A — no Rust touched
- [x] Tauri fmt/check: N/A
Validation Blocked
command:N/Aerror:N/Aimpact:N/A
Behavior Changes
- Intended behavior change: none at runtime; dependency manifest reflects actual usage shape.
- User-visible effect: none.
Parity Contract
- Legacy behavior preserved: yes —
IS_DEVguard atapp/src/store/index.ts:175-178keeps the existing dev-only redux logging path. - Guard/fallback/dispatch parity checks: N/A — dep management only.
Duplicate / Superseded PR Handling
- Duplicate PR(s): #2623 (closed as superseded)
- Canonical PR: this PR
- Resolution: superseded — #2623 incorrectly bundled
debuginto the same change; this PR is scoped to redux-logger only.
Summary by CodeRabbit
- Chores
- Updated development dependencies configuration for improved build optimization.
Redux-logger is relocated from production Dependency reclassification 🎯 1 (Trivial) | ⏱️ ~2 minutes 🐰 A logger once lived in the main, ✏️ Tip: You can configure your own custom pre-merge checks in the settings.📝 Walkthrough
Walkthrough
dependencies to devDependencies in app/package.json. The package is already guarded by an IS_DEV runtime check and only runs in development builds, making this reclassification more accurate for production packaging.Changes
Layer / File(s)
Summary
Move redux-logger to devDependencies
app/package.jsonRedux-logger is removed from
dependencies at lines 103–104 and added to devDependencies at line 148, reflecting its development-only usage.Estimated code review effort
Possibly related issues
#2623: Superseded by this PR; that issue incorrectly bundled both redux-logger and debug migrations, whereas this PR moves only redux-logger while keeping debug in dependencies per its load-bearing production use.Poem
Guarded by IS_DEV's refrain.
Now to devDeps it hops away,
Where dev-time logs safely play!🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name
Status
Explanation
Resolution
Linked Issues check
❓ Inconclusive
The PR substantially addresses issue
#2625's core requirements: redux-logger moved to devDependencies, debug left in dependencies, and existing IS_DEV guard preserved. However, the acceptance criterion requiring production bundle verification (no redux-logger reference in app/dist) is not explicitly documented as completed.Clarify whether production bundle verification (pnpm build && grep app/dist) was performed to confirm no redux-logger references remain, as required by issue
#2625's acceptance criteria.✅ Passed checks (4 passed)
Check name
Status
Explanation
Title check
✅ Passed
The title accurately reflects the main change: moving redux-logger from dependencies to devDependencies, which is the primary objective of the PR.
Out of Scope Changes check
✅ Passed
All changes are directly related to moving redux-logger to devDependencies and regenerating the lockfile, with no unrelated modifications observed in the changeset.
Docstring Coverage
✅ Passed
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Comment @coderabbitai help to get the list of available commands and usage tips.
CI status (post body fix)
PR Submission Checklist: now passing after marking N/A items as [x] N/A: <text> per the parser regex in scripts/lib/checklist-parser.mjs.
Other failures all inherited, none caused by the redux-logger devDeps move:
test / Rust Core Tests + Quality:openhuman::memory::ops::documents::tests::envelope_memory_handlers_report_counts_and_statusespanics in the memory domain. This is the PII guard (safety::pii::has_likely_pii) added in PR #2574 / commita47740d4tripping on test namespaces. Memory-domain regression on main; this manifest-only PR doesn't touch any Rust path. Re-running the failed job.e2e / E2E (Linux / Appium Chromium): same job failing onupstream/main(run 26391619635) — inherited.
Note that #2627 (sibling security-batch PR) passed test / Rust Core Tests + Quality on the same main snapshot, confirming the failure is order/selection-dependent and not coupled to this PR's diff.