feat(platformctl): implement read-only plan drift check #159
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!159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/issues/142-phase3-plan"
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 3+3 manually before merge
Canary Context Pack
Product story
Phase 3 needs a read-only way to compare platform desired state with runtime state before RS2000 cutover work proceeds. This PR gives the operator a bounded drift signal for one module without applying anything to production.
What changed
platformctl plan <module>now fetches remote read-only state throughTailscaleTransportby runningdocker inspect home-platform-<compose-service>-1.module.yaml.--jsonemits the plan object; default output is compact human-readable text.--outaccepts either an explicit plan file path or an output directory.Why it changed
This is Packet 3.2 of the cutover flight. It moves
platformctl planfrom skeleton/no observation to a small real read-only inspection primitive, while keeping mutation for later gated packets.Files touched
control-plane/platformctl/plan.pycontrol-plane/platformctl/cli.pycontrol-plane/platformctl/tests/test_plan_phase3.pyRelevant context
prompts/codex-cutover-flight/phase-3-operational.mdPacket 3.2.prompts/03-control.mdfor the older platform-wide exit-code contract.Runtime evidence
No production command was executed by this PR. Remote access is tested with a mocked
TailscaleTransportonly.Verification run locally:
PYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_plan_phase3.py -q-> 7 passedPYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_smoke.py -q-> 5 passedPYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests control-plane/platformctl/transport/tests -q-> 325 passedPYTHONPATH=control-plane python3 -m platformctl.cli validate modules/honcho-redis --strict-v2 --json-> exitCode 0git diff --check-> cleanKnown constraints
docker inspect <container>cannot prove the cataloged repo digest when compose is not digest-pinned. If the tag matches andimage_digest_pinned_in_compose: false, the plan recordsIMAGE_DIGEST_NOT_VERIFIEDinstead of inventing false digest certainty.Packet 3.2 requested plan exit code
0=no drift, 1=drift found, 2=error; this PR implements that as a command-localplatformctl plancontract while preserving existing platform-wide constants used byapply/validate.Explicit out-of-scope
applychanges.Requested decision
Review whether this is a safe Packet 3.2 read-only drift primitive and whether the command-local plan exit-code contract is acceptable for this stack.
Merge blockers
plan.Spec sources read
prompts/codex-cutover-flight/dispatch.md— cutover flight framing.prompts/codex-cutover-flight/phase-3-operational.md— Packet 3.2 scope and acceptance criteria.prompts/03-control.md— older platformctl plan/apply exit-code contract; read because Packet 3.2 conflicts with the existing global constants.control-plane/platformctl/plan.py— implementation target.control-plane/platformctl/cli.py— command wiring target.control-plane/platformctl/transport/tailscale.py— mocked transport contract from PR #158.control-plane/platformctl/manifest.py—Manifestfields and loading behavior.control-plane/platformctl/safety.py— safety guard already used by transport/plan.modules/honcho-redis/module.yaml— concrete v2 module used for fixture-backed expectations.control-plane/platformctl/tests/test_smoke.pyandcontrol-plane/platformctl/tests/test_validate.py— local test patterns.control-plane/platformctl/transport/tests/test_tailscale.py— mocked transport test style.Refs #142
Ollama Cloud review for PR #159 (Packet 3.2 plan):
Models:
Nonblocking notes consolidated:
image_observedproduces a warning rather than drift; acceptable for now because there is no manifest image claim to compare, but should be tightened when image policy is made stricterapply.pylocally and it consumesplan["changes"], not artifactexitCode, so this is not currently a blockerVerification before review:
PYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_plan_phase3.py -q— 7 passedPYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_smoke.py -q— 5 passedPYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests control-plane/platformctl/transport/tests -q— 325 passedPYTHONPATH=control-plane python3 -m platformctl.cli validate modules/honcho-redis --strict-v2 --json— exitCode 0git diff --check— cleanOfficial platform canary remains missing; this comment is the requested external Ollama review checkpoint, not a substitute for the platform canary.