9f720930ea
- Remove compose-level user: 0:0 override from manifest_compiler.py so the entrypoint can start as root, fix mount ownership, and drop privileges to the container user internally. - Add get_manifest_container_user() helper to resolve the manifest-declared container user (with uid:gid fallback). - Pass container user through TerminalSession, TerminalManager, and the terminal WebSocket handler so docker exec is invoked with --user <user>. - Update and add unit tests for the manifest compiler and terminal session. - Record the additional root-user fix in the fix-pi-container-mount-permissions OpenSpec change/tasks. Quality gates: pytest tests/unit/ (226 passed), pytest tests/services/test_terminal_manager_multi.py (7 passed), ruff check on changed files (clean), mypy on changed files (clean)
17 lines
1.1 KiB
Markdown
17 lines
1.1 KiB
Markdown
# Tasks: fix pi container repo mount and npm update permissions
|
|
|
|
- [x] Investigate root cause (manifest target, missing variables, npm prefix)
|
|
- [x] Create Alembic data migration to update pi-agent manifest
|
|
- [x] Update manifest_compiler.py: {{WORKSPACE_NAME}} substitution, env var, entrypoint runtime var, npm prefix
|
|
- [x] Update instance_service.py to pass REPO_NAME/WORKSPACE_NAME
|
|
- [x] Remove explicit repo mount from pi-agent manifest; synthesize mount in compile_compose
|
|
- [x] Add _get_repository_mount_name() helper to derive workspace name from remote URL
|
|
- [x] Switch workspace storage layout to /data/working-copies/{workspace_id}/{repo_name}/
|
|
- [x] Update unit tests for workspace/home-directory migration
|
|
- [x] Run quality gates for workspace/home-directory migration
|
|
- [x] Remove compose-level `user: 0:0` override so entrypoint can drop privileges
|
|
- [x] Pass manifest-declared container user to terminal sessions via `docker exec --user`
|
|
- [x] Update unit tests for container user/terminal changes
|
|
- [ ] Run quality gates for container user/terminal changes
|
|
- [ ] Commit and push
|