feat: enforce unified security mode across Web, CLI, and Wiki with test hardening#539
feat: enforce unified security mode across Web, CLI, and Wiki with test hardening#539Pan311 wants to merge 3 commits into
Conversation
|
@phatphamhong-tech is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
|
23b14a7 to
37899f9
Compare
|
@claude is it ready to be merged? |
|
Claude finished @magyargergo's task in 1m 42s —— View job PR Merge Readiness Assessment
Verdict: Not quite ready — two items need attention before mergingThe implementation is solid and well-thought-out, but there are two blockers and several minor issues worth addressing. Blockers1. Pending Prettier formatting PR (#563) The comment from @magyargergo warns that PR #563 adds Prettier as the repo formatter and will touch ~350 files. This branch will conflict when that merges. The rebase instructions are already in the comments above — this branch should be rebased and reformatted after #563 lands before this PR is merged. 2. Breaking behavior change: The value === undefined || value === '' || (value !== '0' && value !== 'false')This means when This is a significant behavioral change and should be explicitly confirmed as intentional. If it is intentional, it needs a changelog/migration note. If it's not intentional (i.e., the default should be Non-blocking issues3. Code duplication of The same helper is copy-pasted in three CLI/server files:
The web side nicely centralizes this in 4. Double local-only enforcement in The local-only enforcement block appears at lines 223-235 and again at lines 447-459 in 5. Residual Vitest worker-exit error Noted in the PR body — 6. Vercel deployment authorization pending The Vercel bot requires a team member to authorize the deployment. This is a deployment concern, not a code concern, but should be handled before the PR is considered fully validated. What's done well
TL;DR: Rebase after #563 merges, confirm/fix the default-on local-only behavior, then this is ready. |
|
Please submit a new PR if this is still relevant |
add centralized security-mode configuration for runtime decisions
align proxy, LLM settings, clone flow, and API/serve/wiki paths under the same security policy
reduce misconfiguration risk by making security behavior consistent across entry points
Summary
This PR enforces a unified security-mode policy across Web and CLI/server/wiki paths, and adds test hardening for local-only provider behavior and integration DB isolation. Together, this reduces config drift and improves test reliability for security-sensitive paths.
Motivation / context
Runtime security behavior previously varied by entry point, increasing misconfiguration risk. This change makes policy handling consistent across key flows and aligns tests with the intended local-only constraints and shared DB lifecycle behavior.
Areas touched
gitnexus/(CLI / core / MCP server)gitnexus-web/(Vite / React UI).github/(workflows, actions)eval/or other toolingAGENTS.md,CLAUDE.md,.cursor/,llms.txt, etc.)Scope & constraints
In scope
Explicitly out of scope / not done here
Implementation notes
withTestLbugDBnow copies the shared DB template into per-suite temp paths, reducing cross-suite lock contention.5b5f742.Testing & verification
cd gitnexus && npm testResult: tests passed (
111files passed,3995tests passed,2skipped), but Vitest still reportsErrors 1with unhandled worker exit.cd gitnexus && npm run test:integration(if core/indexing/MCP paths changed)Result: integration files passed (
45files passed,1931tests passed), but same Vitest unhandled worker-exit error remains.cd gitnexus && npx tsc --noEmitcd gitnexus-web && npm test(if web changed)Result: passed (
11/11files,198/198tests).cd gitnexus-web && npx tsc -b --noEmit(if web changed)Risk & rollout
Medium risk due to cross-path security behavior alignment, with low code churn in test hardening changes.
No intended API-breaking change.
Known residual issue: Vitest pool intermittently reports an unhandled worker-exit error despite passing assertions; worth follow-up in test infra.
Checklist
AGENTS.md/ overlays changed: headers, scope block, and changelog updated per project conventions