chore: archive completed OpenSpec changes
Move the following audited-and-implemented changes into openspec/changes/archive/2026-06-12-completed-changes-archive/: - tool-config-mount-cleanup - config-profile-directory-mounts Update archive README count and project map index/files accordingly. openspec/changes/ now contains only the archive directory. Quality gates: pytest 313 passed/34 skipped, npm run typecheck/lint clean, npm test -- --run 87 passed
This commit is contained in:
@@ -19,6 +19,9 @@ map: archive/.pi-map.md
|
||||
- archive/2026-06-12-completed-changes-archive/config-profile-multi-repo-mounts
|
||||
index: archive/2026-06-12-completed-changes-archive/config-profile-multi-repo-mounts/.pi-map.index.md
|
||||
map: archive/2026-06-12-completed-changes-archive/config-profile-multi-repo-mounts/.pi-map.md
|
||||
- archive/2026-06-12-completed-changes-archive/config-profile-directory-mounts
|
||||
index: archive/2026-06-12-completed-changes-archive/config-profile-directory-mounts/.pi-map.index.md
|
||||
map: archive/2026-06-12-completed-changes-archive/config-profile-directory-mounts/.pi-map.md
|
||||
- archive/2026-06-12-completed-changes-archive/container-monitoring-notifications
|
||||
index: archive/2026-06-12-completed-changes-archive/container-monitoring-notifications/.pi-map.index.md
|
||||
map: archive/2026-06-12-completed-changes-archive/container-monitoring-notifications/.pi-map.md
|
||||
@@ -49,6 +52,9 @@ map: archive/.pi-map.md
|
||||
- archive/2026-06-12-completed-changes-archive/terminal-fullscreen-unified-header
|
||||
index: archive/2026-06-12-completed-changes-archive/terminal-fullscreen-unified-header/.pi-map.index.md
|
||||
map: archive/2026-06-12-completed-changes-archive/terminal-fullscreen-unified-header/.pi-map.md
|
||||
- archive/2026-06-12-completed-changes-archive/tool-config-mount-cleanup
|
||||
index: archive/2026-06-12-completed-changes-archive/tool-config-mount-cleanup/.pi-map.index.md
|
||||
map: archive/2026-06-12-completed-changes-archive/tool-config-mount-cleanup/.pi-map.md
|
||||
- archive/2026-06-12-completed-changes-archive/tool-session-progress-and-updates
|
||||
index: archive/2026-06-12-completed-changes-archive/tool-session-progress-and-updates/.pi-map.index.md
|
||||
map: archive/2026-06-12-completed-changes-archive/tool-session-progress-and-updates/.pi-map.md
|
||||
|
||||
@@ -7,8 +7,10 @@ index: archive/2026-06-12-completed-changes-archive/.pi-map.index.md
|
||||
Stores historical records of fully implemented and audited OpenSpec changes for reference and audit trail purposes.
|
||||
## files
|
||||
- README.md | Documents archived completed OpenSpec changes that have been audited and confirmed as fully implemented
|
||||
- config-profile-directory-mounts | Completed OpenSpec change for directory-level config profile mounts
|
||||
- multi-session-terminal-ux | Completed OpenSpec change for multi-session terminal UX
|
||||
- reorganize-long-files | Completed OpenSpec change for reorganizing long files
|
||||
- tool-config-mount-cleanup | Completed OpenSpec change for cleaning up built-in tool config/state mounts
|
||||
- working-copies | Completed OpenSpec change for workspace-first working copies
|
||||
- workspace-first-ui | Completed OpenSpec change for workspace-first UI
|
||||
## arch
|
||||
|
||||
@@ -8,6 +8,7 @@ These OpenSpec changes have been audited against the current source tree and con
|
||||
- config-profile-git-mounts
|
||||
- config-profile-includes-ui
|
||||
- config-profile-multi-repo-mounts
|
||||
- config-profile-directory-mounts
|
||||
- container-monitoring-notifications
|
||||
- git-mount-url-validation
|
||||
- home-path-expansion
|
||||
@@ -18,13 +19,14 @@ These OpenSpec changes have been audited against the current source tree and con
|
||||
- session-list-overhaul
|
||||
- ssh-key-mounting
|
||||
- terminal-fullscreen-unified-header
|
||||
- tool-config-mount-cleanup
|
||||
- tool-session-progress-and-updates
|
||||
|
||||
## Audit summary
|
||||
|
||||
| Status | Count |
|
||||
|--------|-------|
|
||||
| Fully implemented | 15 |
|
||||
| Fully implemented | 17 |
|
||||
| Partially implemented | 0 (in this archive) |
|
||||
|
||||
Audit report: `/tmp/active-changes-implementation-audit.md` (generated before archiving).
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
name: config-profile-directory-mounts
|
||||
status: completed
|
||||
completed_at: 2026-06-13
|
||||
started_at: 2026-06-13
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
# . (index)
|
||||
dir: .
|
||||
|
||||
## Project Map Protocol
|
||||
|
||||
1. Read this protocol and the root `.pi-map.index.md` first.
|
||||
2. Use `index:` / `map:` references to open relevant directory indexes and maps.
|
||||
3. Load indexes before rich maps during task-start navigation.
|
||||
4. Read the local rich map and actual source before editing.
|
||||
5. Treat non-empty `## dirty` sections in either artifact as stale.
|
||||
6. If source and generated artifacts disagree, trust source.
|
||||
7. If map and index disagree, trust neither blindly; verify from source and regenerate the pair.
|
||||
8. After editing source, run `project_map_patch` for each changed file.
|
||||
9. Before broad architectural claims or final handoff, run `project_map_validate` when freshness matters.
|
||||
|
||||
Trust boundary: index routes, map orients, source decides.
|
||||
|
||||
## role
|
||||
Provides configuration and documentation for a mount staging system that resolves file ownership issues in containerized environments.
|
||||
## parent
|
||||
-
|
||||
## children
|
||||
-
|
||||
## files
|
||||
- .openspec.yaml
|
||||
- proposal.md
|
||||
- tasks.md
|
||||
## links
|
||||
index: ./.pi-map.index.md
|
||||
map: ./.pi-map.md
|
||||
## workflows
|
||||
-
|
||||
## dirty
|
||||
-
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
# .
|
||||
dir: .
|
||||
|
||||
index: ./.pi-map.index.md
|
||||
|
||||
## Project Map Protocol
|
||||
|
||||
1. Read this protocol and the root `.pi-map.index.md` first.
|
||||
2. Use `index:` / `map:` references to open relevant directory indexes and maps.
|
||||
3. Load indexes before rich maps during task-start navigation.
|
||||
4. Read the local rich map and actual source before editing.
|
||||
5. Treat non-empty `## dirty` sections in either artifact as stale.
|
||||
6. If source and generated artifacts disagree, trust source.
|
||||
7. If map and index disagree, trust neither blindly; verify from source and regenerate the pair.
|
||||
8. After editing source, run `project_map_patch` for each changed file.
|
||||
9. Before broad architectural claims or final handoff, run `project_map_validate` when freshness matters.
|
||||
|
||||
Trust boundary: index routes, map orients, source decides.
|
||||
|
||||
## role
|
||||
Provides configuration and documentation for a mount staging system that resolves file ownership issues in containerized environments.
|
||||
## files
|
||||
- .openspec.yaml | Defines an OpenSpec configuration profile for directory mounts with completion tracking metadata
|
||||
- proposal.md | Proposes a design change to fix root-owned directory issues in config profile mounts by staging and bind-mounting entire directories instead of individual files. | dep: Docker, config_profile_resolver.py, test_config_profile_resolver.py
|
||||
- tasks.md | Tracks completed development tasks for refactoring a mount staging system and running quality gates.
|
||||
## arch
|
||||
Configuration-driven design using YAML profiles for directory mounts, with a proposal-based development approach documenting a shift from file-level to directory-level bind-mount staging.
|
||||
## tags
|
||||
tasks, profile, directory, mounts, .openspec, staging, py, proposal
|
||||
## symbols
|
||||
-
|
||||
## workflows
|
||||
-
|
||||
## dirty
|
||||
-
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
# Config profile directory mounts
|
||||
|
||||
## Problem
|
||||
|
||||
`apply_resolved_profile` currently stages each config-profile mount file individually and bind-mounts each file into the container. Docker creates the parent directory (for example `~/.config`) as root-owned when only files are mounted, so applications running as a non-root container user cannot write new files inside that directory.
|
||||
|
||||
## Decision
|
||||
|
||||
Stage a directory per mount target and bind-mount the whole directory. The staged directory is created under `instance_dir/mounts/` and is chowned to the resolved container user before the container starts, so the container user can create and modify files inside the target directory.
|
||||
|
||||
## Scope
|
||||
|
||||
- Change `apply_resolved_profile` in `apps/api/src/services/config/config_profile_resolver.py` to emit one directory-level volume mount per `ResolvedMount` target.
|
||||
- Continue staging all configured files under that directory.
|
||||
- Preserve read-only mode by setting `readonly: true` on the volume entry when `mode` is `ro`.
|
||||
- Update unit tests in `apps/api/tests/unit/test_config_profile_resolver.py` to expect directory-level mounts.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- No changes to git-mount, SSH-key, workspace, or manifest mount handling.
|
||||
- No changes to config profile storage or resolution semantics.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
# Tasks
|
||||
|
||||
- [x] Identify the per-file mount staging in `apply_resolved_profile` as the root cause.
|
||||
- [x] Refactor `apply_resolved_profile` to stage one directory per mount target and bind-mount the directory.
|
||||
- [x] Propagate read-only mode to the volume entry.
|
||||
- [x] Update `TestApplyResolvedProfile` unit tests to assert directory-level mounts.
|
||||
- [x] Run backend quality gates (`py_compile`, `pytest`).
|
||||
- [x] Commit, merge to `dev`, push.
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
name: tool-config-mount-cleanup
|
||||
status: completed
|
||||
completed_at: 2026-06-13
|
||||
started_at: 2026-06-12
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
# . (index)
|
||||
dir: .
|
||||
|
||||
## Project Map Protocol
|
||||
|
||||
1. Read this protocol and the root `.pi-map.index.md` first.
|
||||
2. Use `index:` / `map:` references to open relevant directory indexes and maps.
|
||||
3. Load indexes before rich maps during task-start navigation.
|
||||
4. Read the local rich map and actual source before editing.
|
||||
5. Treat non-empty `## dirty` sections in either artifact as stale.
|
||||
6. If source and generated artifacts disagree, trust source.
|
||||
7. If map and index disagree, trust neither blindly; verify from source and regenerate the pair.
|
||||
8. After editing source, run `project_map_patch` for each changed file.
|
||||
9. Before broad architectural claims or final handoff, run `project_map_validate` when freshness matters.
|
||||
|
||||
Trust boundary: index routes, map orients, source decides.
|
||||
|
||||
## role
|
||||
Package containing completed specification, proposal, and task tracking for a tool configuration mount cleanup feature that separates built-in tool definitions from user-specific configuration.
|
||||
## parent
|
||||
-
|
||||
## children
|
||||
-
|
||||
## files
|
||||
- .openspec.yaml
|
||||
- proposal.md
|
||||
- tasks.md
|
||||
## links
|
||||
index: ./.pi-map.index.md
|
||||
map: ./.pi-map.md
|
||||
## workflows
|
||||
-
|
||||
## dirty
|
||||
-
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
# .
|
||||
dir: .
|
||||
|
||||
index: ./.pi-map.index.md
|
||||
|
||||
## Project Map Protocol
|
||||
|
||||
1. Read this protocol and the root `.pi-map.index.md` first.
|
||||
2. Use `index:` / `map:` references to open relevant directory indexes and maps.
|
||||
3. Load indexes before rich maps during task-start navigation.
|
||||
4. Read the local rich map and actual source before editing.
|
||||
5. Treat non-empty `## dirty` sections in either artifact as stale.
|
||||
6. If source and generated artifacts disagree, trust source.
|
||||
7. If map and index disagree, trust neither blindly; verify from source and regenerate the pair.
|
||||
8. After editing source, run `project_map_patch` for each changed file.
|
||||
9. Before broad architectural claims or final handoff, run `project_map_validate` when freshness matters.
|
||||
|
||||
Trust boundary: index routes, map orients, source decides.
|
||||
|
||||
## role
|
||||
Package containing completed specification, proposal, and task tracking for a tool configuration mount cleanup feature that separates built-in tool definitions from user-specific configuration.
|
||||
## files
|
||||
- .openspec.yaml | Defines a completed OpenSpec configuration for a tool named "tool-config-mount-cleanup"
|
||||
- proposal.md | Proposes removing configuration and state mounts from built-in tool definitions to separate tool setup from user-specific configuration handled by config profiles.
|
||||
- tasks.md | This is a completed task checklist for modifying built-in tool configurations and database migrations in a codebase. | dep: alembic, pytest, opencode, pi-agent
|
||||
## arch
|
||||
Documentation-driven change management with OpenSpec configuration, markdown-based proposal/justification, and structured task checklist for tracking implementation of a configuration separation pattern.
|
||||
## tags
|
||||
tool, configuration, completed, config, .openspec, proposal, tasks, defines
|
||||
## symbols
|
||||
-
|
||||
## workflows
|
||||
-
|
||||
## dirty
|
||||
-
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
# Tool config mount cleanup
|
||||
|
||||
## Problem
|
||||
|
||||
The built-in tool definitions currently declare configuration and state mounts that belong in user-controlled config profiles:
|
||||
|
||||
- The `pi-agent` manifest mounts `pi_state` (`/tmp/.pi/agents`) and `pi_config` (`/home/user/.pi`) via a `git_mount` reference.
|
||||
- The `opencode` built-in compose template mounts a named volume `opencode_home:/tmp` and sets `HOME=/tmp`.
|
||||
|
||||
These require manual configuration or implicit state persistence, which conflicts with the design that tool configs should only set up the actual tool, while config profiles handle user-specific configuration and state.
|
||||
|
||||
## Decision
|
||||
|
||||
Remove all configuration/state mounts from built-in tool definitions. Tool configs will declare only:
|
||||
|
||||
- Runtime environment (packages, user, command, ports).
|
||||
- The workspace/repository mount.
|
||||
- SSH key mounts supplied by the platform.
|
||||
|
||||
User-specific configuration and state will be handled exclusively by config profiles.
|
||||
|
||||
## Scope
|
||||
|
||||
- Remove `pi_state` and `pi_config` mounts from the `pi-agent` manifest.
|
||||
- Update the original migration that inserts the `pi-agent` manifest.
|
||||
- Add a data migration to remove those mounts from existing `tool_definition_manifests` rows.
|
||||
- Remove the `opencode_home:/tmp` volume and `HOME=/tmp` override from the `opencode` built-in compose template.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- No changes to config profile behavior.
|
||||
- No changes to workspace or SSH key mounts.
|
||||
- No changes to tool image Dockerfiles beyond what is required by mount removal.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
# Tasks
|
||||
|
||||
- [x] Identify all built-in tool configs with configuration or state mounts.
|
||||
- [x] Remove `pi_state` and `pi_config` mounts from the `pi-agent` manifest in `apps/api/alembic/versions/2026_05_28_add_tool_definition_manifests.py`.
|
||||
- [x] Create an Alembic data migration to remove those mounts from existing `tool_definition_manifests` rows.
|
||||
- [x] Remove the `opencode_home:/tmp` volume and `HOME=/tmp` environment variable from the `opencode` compose template in `apps/api/src/seeds/builtin_tool_types.py`.
|
||||
- [x] Run backend quality gates (`py_compile`, `pytest`).
|
||||
- [x] Commit, merge to `dev`, push.
|
||||
Reference in New Issue
Block a user