Repository navigation
fix(deploy): resolve a namespace-qualified deploy key by exact match first - #678
Conversation
…first resolveDeployNodeByPath split the name unconditionally on '.', so a namespaced top-level deploy key (charly.check-dsh-pod) was read as a root named 'charly' plus a member path, missed, and returned false. deployNodePluginContext then collected ZERO plugin words for the deploy, so loadDeployPlugins never connected its substrate provider and every namespaced pod bed failed at deploy-add with target "pod" is a known substrate but its deploy provider is not connected Fix: try the EXACT full key first; fall back to the member-path split only when absent. This mirrors spec.ResolveNodePath's exact-key-first contract (spec#164) — the same rule at the core pre-connect layer. Test: TestResolveDeployNodeByPath gains the qualified-key cases (charly.check-dsh-pod and its vm:-prefixed form); they FAIL against the pre-fix source and PASS with the fix. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: Go source ( The diff itself is clean: the +11/-0 exact-key-first guard and the +13/-0 regression cases are internally consistent (hunk counts match; the new tree entry Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…jection) charly pinned sdk v0.2026269.145, whose deploykit.ProjectDeployConfig projects the root-only uf.Deploy map. That is the missing half of the namespaced-deploy fix: even with resolveDeployNodeByPath's exact-key match, a namespaced bed's substrate provider never connects (MEASURED: check-docs deploy-add fails 'provider is not connected'). Adopt sdk v0.2026269.920 (#297), whose ProjectDeployConfig folds uf.Deploys() — with it, the same deploy-add PASSES. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS — no scope mismatch (diff = the two fixes + dep pin the body claims), no secrets/egress, no guardrail weakening, no rulebook/spec edit; the sdk pin bump is the documented supply-chain change. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: Go source ( Blocks
Comments considered
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS — diff is exactly the two claimed hunks (no scope expansion, no secrets/egress, no guardrail/spec/rulebook edit, no embedded directives, no supply-chain change in the diff). Comments: all three Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Fix
resolveDeployNodeByPathto resolve a namespace-qualified deploy key byexact match first, so a namespaced bed's substrate provider is connected.
RCA (8-step, measured live)
Unexpected. From the umbrella root, every namespaced pod bed failed at
deploy-add:Mechanism.
deployNodePluginContext→resolveDeployNodeByPathsplit thedeploy name unconditionally on
., so a namespaced top-level key(
charly.check-dsh-pod) was read as rootcharly+ member path, missed, andreturned
false—deployNodePluginContextthen collected ZERO plugin words andloadDeployPluginsnever connected itspodsubstrate provider.Root cause.
spec.ResolveNodePath(spec#164) had already adoptedexact-key-first for the plugin-side walk, but this core pre-connect
collector — a second, independent resolver — was not updated: a producer/consumer
split across the spec/core boundary.
Fix
Mirrors
spec.ResolveNodePath's exact-key-first contract — the same rule at thecore pre-connect layer.
Note on the SDK pin: charly
origin/mainalready carriessdk v0.2026269.1159,whose
ProjectDeployConfigfoldsuf.Deploys()(the namespace-aware projection),so no pin change is needed — the only missing half was this core resolver. This
PR's diff vs
origin/mainis exactly the 2 files below.How tested
R7 regression test — FAILS pre-fix, PASSES post-fix
charly/deploy_plugin_load_test.go::TestResolveDeployNodeByPathgains thequalified-key cases (
charly.check-dsh-pod,vm:charly.check-dsh-pod):Go gate
Live R10 — full namespaced bed green, from the final tree
Proof binary built from this final tree:
Target:
charly.check-docs—disposable: trueincharly/charly.yml(
check-docs: { pod: { image: docs-site-app, disposable: true } }).Rulebook compliance
core owns the pre-connect collector).
charly version.Change classification
charly/plugin_loader.go) + test.go test ./charly/(fails-then-passes regression) + thelive
charly.check-docsR10 bed on adisposable: truetarget (14/14).fully tested and validated.Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)