Skip to content

fix(slm): fix frontend ownership before npm build in self-sync (#1624)#1628

Merged
mrveiss merged 1 commit intoDev_new_guifrom
fix/1624-self-sync-frontend-ownership
Mar 13, 2026
Merged

fix(slm): fix frontend ownership before npm build in self-sync (#1624)#1628
mrveiss merged 1 commit intoDev_new_guifrom
fix/1624-self-sync-frontend-ownership

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Mar 13, 2026

Summary

  • Add sudo chown -R autobot:autobot for SLM frontend dir before npm ci
  • Prevents permission errors when Ansible previously deployed root-owned files

Root Cause

Ansible deploys with become: true (root), creating root-owned node_modules/ and dist/. The self-sync path runs as the autobot service user, so npm ci fails trying to modify root-owned files.

Changed Files

  • api/code_sync.py — ownership fix step in _build_slm_frontend()

Test Plan

  • Create root-owned file in /opt/autobot/autobot-slm-frontend/node_modules/
  • Trigger SLM self-sync via code-sync UI
  • Verify chown runs before npm ci (check logs)
  • Verify frontend build succeeds

Closes #1624

Add sudo chown -R autobot:autobot before npm ci to handle
root-owned node_modules/dist from previous Ansible deploys.
@mrveiss mrveiss merged commit 25766f1 into Dev_new_gui Mar 13, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss mrveiss deleted the fix/1624-self-sync-frontend-ownership branch March 13, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant