mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 08:55:58 +03:00
[PR #415] [MERGED] Enforce runtime-only directory creation for startup modules #720
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#720
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/415
Author: @AJaySi
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @AJaySi
Base:
main← Head:codex/apply-no-filesystem-writes-policy📝 Commits (1)
3ebe884Enforce runtime-only workspace directory creation policy📊 Changes
12 files changed (+241 additions, -105 deletions)
View changed files
📝
backend/alwrity_utils/environment_setup.py(+14 -17)📝
backend/api/youtube/handlers/audio.py(+2 -5)📝
backend/api/youtube/handlers/avatar.py(+5 -7)📝
backend/api/youtube/handlers/images.py(+3 -9)➕
backend/api/youtube/paths.py(+21 -0)📝
backend/api/youtube/router.py(+6 -11)📝
backend/middleware/logging_middleware.py(+11 -4)📝
backend/routers/seo_tools.py(+9 -1)📝
backend/services/user_workspace_manager.py(+12 -48)➕
backend/services/workspace_dirs.py(+80 -0)➕
backend/tests/test_no_import_time_mkdir.py(+72 -0)📝
backend/utils/media_utils.py(+6 -3)📄 Description
Motivation
user_idand capabilities).Description
backend/services/workspace_dirs.pyprovidingensure_user_workspace_dirs(user_id, capabilities)andensure_global_operational_dirs(...)to create only required directories at runtime.backend/alwrity_utils/environment_setup.pyto only create operational directories (logs,temp) and to useensure_global_operational_dirs.backend/middleware/logging_middleware.py,backend/routers/seo_tools.py,backend/utils/media_utils.pyto create directories lazily.backend/api/youtube/paths.pyand updatedbackend/api/youtube/router.pyand handlers (avatar.py,images.py,audio.py) to callensure_youtube_media_dirs(user_id)after resolving the user.backend/services/user_workspace_manager.pyto useensure_user_workspace_dirsfor capability-driven per-user folder creation (AI services, integrations, content, media, assets).backend/tests/test_no_import_time_mkdir.pythat parses startup modules and fails when top-levelmkdir/os.makedirscalls are present, excluding calls inside functions/classes (runtime-safe).Testing
python -m py_compileagainst the modified backend modules to ensure they are syntactically valid (succeeded).pytest -q backend/tests/test_no_import_time_mkdir.py, which passed and will fail if a top-level filesystem write is reintroduced (succeeded).Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.