fix(apply): force compose PROJECT_ROOT to remote root #413
No reviewers
Labels
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/platform!413
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/fix/apply-project-root-override"
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?
Canary status: missing — fire canary via
python -m platformctl.tools.run_reviewbefore mergeSummary
Fixes a deploy-runner drift where
/opt/pdurlej-platform/runtime/compose.envcan still containPROJECT_ROOT=/opt/vps-home-platform-infra, causingdocker composebuild contexts to resolve against the legacy tree even whenPLATFORMCTL_REMOTE_ROOT=/opt/pdurlej-platform/current.Changes
platformctl applynow prefixes both compose preflight and apply commands withPROJECT_ROOT=<remote_root>.--env-filevalues for compose interpolation.Verification
PYTHONPATH=control-plane pytest -q control-plane/platformctl/tests/test_apply*.py→ 58 passedgit diff --check/opt/vps-home-platform-infra/scripts/audio-mcpand/opt/vps-home-platform-infra/scripts/playwright-mcp.PROJECT_ROOT=/opt/pdurlej-platform/current docker compose ... configrendered those build contexts under/opt/pdurlej-platform/current/scripts/....Test plan
/opt/pdurlej-platform/runtime/compose.env, but this fix removes the apply-path dependency on that stale value.Canary Context Pack
Product story
After the control-plane cutoff, deploys must build and mount from the trusted release-root, not the legacy tree. A stale env file must not silently pull build context from
/opt/vps-home-platform-infra.What changed
Compose commands generated by
platformctl applynow explicitly setPROJECT_ROOTto the sameremote_rootused for the compose file.Why it changed
The Things rollout found that the runtime compose env still had
PROJECT_ROOT=/opt/vps-home-platform-infra. Docker Compose uses that variable in local build contexts, so a merge/apply could build local-image modules from legacy code.Files touched
control-plane/platformctl/apply.pycontrol-plane/platformctl/tests/test_apply_env_file.pycontrol-plane/platformctl/tests/test_apply_phase3.pyRelevant context
/opt/pdurlej-platform/currentis the operational control-plane root.Runtime evidence
Read-only checks on RS2000 showed:
/opt/pdurlej-platform/runtime/compose.env:PROJECT_ROOT=/opt/vps-home-platform-infra.audio-mcpandplaywright-mcp.PROJECT_ROOT=/opt/pdurlej-platform/currentused current release-root build contexts.No secrets were printed.
Known constraints
This PR changes command construction only. It does not edit runtime env files, restart services, apply production, or delete legacy material.
Explicit out-of-scope
/opt/pdurlej-platform/runtime/compose.env.Requested decision
Merge before any more local-build module applies, so stale env-file
PROJECT_ROOTcannot pull source from the legacy tree.Merge blockers
Spec sources read
control-plane/platformctl/apply.py— compose command generation.control-plane/platformctl/tests/test_apply_env_file.py— env-file command tests.control-plane/platformctl/tests/test_apply_phase3.py— apply transport command tests.compose/apps/compose.yaml—PROJECT_ROOTusage in build contexts and mounts.docs/forgejo-agent-operations.md— Forgejo identity/write contract.