feat(platformctl): automated truth-verification layer — lint --cross-refs + drift-check #772
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/platform!772
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "deepseek/audit-2026-06-08"
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
Every audit burns tokens on the same checks: "is INDEX.yaml consistent with modules?", "are ADR numbers unique?", "do referenced ADRs exist?", "are images drifted?". This PR makes these checks automatic — zero tokens, instant feedback, CI-enforceable.
What changed
platformctl lint --cross-refs— 4 static integrity checks:platformctl drift-check [module|--all]— compareimage_observedagainst live Docker digests via SSHWhy it changed
DeepSeek audit 2026-06-08 identified that the #1 systemic risk is the platform not knowing when it lies about itself. These commands prevent the drift that every manual audit has been rediscovering.
Files touched
control-plane/platformctl/lint.py(new, 283 lines)control-plane/platformctl/drift_check.py(new, 224 lines)control-plane/platformctl/cli.py(added 2 commands + formatters)Relevant context
state/audit/deepseek-2026-06-08-multiperspective.mdRuntime evidence
platformctl lint --cross-refsruns on Mac and RS2000, identical resultsplatformctl drift-check honcho-apitested; SSH transport works through existing Tailscale infrastructure--jsonmode for CI integrationKnown constraints
drift-checkrequiresplatform-host-agentSSH key setup (same ashealthandplancommands)lintis fully offline — no runtime dependenciesExplicit out-of-scope
Requested decision
Review and merge. This is the foundation for CI-enforced platform integrity.
Merge blockers
Spec sources read
control-plane/platformctl/cli.py— command structure, exit codes, patternscontrol-plane/platformctl/plan.py—container_name,inspect_command, transport contractcontrol-plane/platformctl/health.py— SSH health check patternscontrol-plane/platformctl/manifest.py—load_manifest,all_module_ids,find_modules_dircontrol-plane/platformctl/transport/tailscale.py— SSH transportmodules/INDEX.yaml— data structuredecisions/— ADR file patternsstate/audit/deepseek-2026-06-08-multiperspective.md— audit findings that motivated thisVerification
Closes #767, closes #771
Patchwarden PR sanity
advisory_findings7722aa6d7bc855304ce7bb5a7dd6974cc5eb6891938missingDeterministic findings
No deterministic findings.
Model reviewers
global-glm/glm-5.1:cloudStatus:
okVerdict:
NOT_OKhighKeyError crash in _check_index_consistency when manifest lacks nested classificationcontrol-plane/platformctl/lint.py lines ~155-160:m.data["spec"]["classification"]["area"]uses direct dict access while INDEX.yaml side uses.get()with defaults. If any module.yaml lacksspec.classification.area, this raises KeyErrom.data["spec"]["classification"]["area"]tom.data.get("spec", {}).get("classification", {}).get("area")or wrap in try/except KeyError to match the defensive pattern used for INDEX.yaml access.lowWeak type contract on transport parameter allows unsafe callscontrol-plane/platformctl/drift_check.py lines 42, 54, 67:transport: TailscaleTransport | Any | None = None— theAnytype defeats type checking and could allow invalid transport objects at runtime.Anyfrom the union type. UseTailscaleTransport | None = Noneor define a Protocol for the transport interface if polymorphism is needed.global-deepseek/deepseek-v4-pro:cloudStatus:
okVerdict:
OKmediumNo tests for new lint and drift-check commandsDiff adds 507 lines of new logic across lint.py and drift_check.py, but no test files are included. PR description only confirms existing tests pass, not that new functionality is covered.lowCanary review not yet performedPR description states 'Canary status: missing — fire canary 3+3 manually before merge'. The canary process is required by project policy for medium/large changes.redteam/kimi-k2.6:clouderror-Policy notes
PLATFORMCTL_PR_SANITY_REDTEAM_MODELis configured.PR-zero queue collapse: closing this parked/conflicted mega-PR without merge. The part has now landed via narrower PR #783. The part should come back only as a fresh, smaller PR/issue with current tests and no stale Honcho/live assumptions. No runtime mutation was performed.
Correction to the previous close comment: shell interpolation stripped the inline command names.
Intended wording: the
lint --cross-refspart has landed via narrower PR #783; thedrift-checkpart should return only as a fresh, smaller PR/issue with current tests and no stale Honcho/live assumptions.Pull request closed