feat(provisioner): allow system-prompt.md through the asset channel (de-bake concierge) #3246

Merged
devops-engineer merged 1 commits from feat/asset-channel-system-prompt-allowlist into main 2026-06-24 23:34:41 +00:00
Member

Allows system-prompt.md through the asset-channel allowlist (IsCPTemplateAssetPath), which previously permitted only config.yaml + prompts/*.

system-prompt.md is the SSOT concierge/agent prompt filename (runtime default + what the platform-agent template ships + the key core substitutes {{CONCIERGE_NAME}} into). Without this it can't be delivered live, forcing the concierge onto the baked molecule-platform-agent image. This is the key unblock for the de-bake migration — concierge gets its identity via the asset channel on the standard runtime image (MCP already via plugin).

Guardrail: TestIsCPTemplateAssetPath_AllowsSystemPromptMd — narrowing the allowlist back boots the concierge identity-less and fails CI (review guardrail G6/G0).

Allows **`system-prompt.md`** through the asset-channel allowlist (`IsCPTemplateAssetPath`), which previously permitted only `config.yaml` + `prompts/*`. `system-prompt.md` is the **SSOT** concierge/agent prompt filename (runtime default + what the platform-agent template ships + the key core substitutes `{{CONCIERGE_NAME}}` into). Without this it can't be delivered live, forcing the concierge onto the baked `molecule-platform-agent` image. This is the **key unblock for the de-bake migration** — concierge gets its identity via the asset channel on the standard runtime image (MCP already via plugin). **Guardrail:** `TestIsCPTemplateAssetPath_AllowsSystemPromptMd` — narrowing the allowlist back boots the concierge identity-less and fails CI (review guardrail G6/G0).
core-devops added 1 commit 2026-06-24 22:15:20 +00:00
feat(provisioner): allow system-prompt.md through the asset channel (de-bake concierge)
CI / Python Lint & Test (pull_request) Successful in 6s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Block integration-tester contamination artifacts / Block staging-trigger / invalid manifest contamination (pull_request) Successful in 7s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 6s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 7s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 7s
Harness Replays / detect-changes (pull_request) Successful in 7s
sop-checklist / review-refire (pull_request_target) Has been skipped
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 6s
sop-checklist / all-items-acked (pull_request) acked: 0/9 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +6 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 10s
sop-checklist / all-items-acked (pull_request_target) Successful in 9s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 20s
gate-check-v3 / gate-check (pull_request_target) Failing after 15s
E2E API Smoke Test / detect-changes (pull_request) Successful in 23s
E2E Chat / detect-changes (pull_request) Successful in 23s
PR Diff Guard / PR diff guard (pull_request) Successful in 19s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
E2E Chat / E2E Chat (pull_request) Successful in 3s
CI / Detect changes (pull_request) Successful in 29s
template-delivery-e2e / detect-changes (pull_request) Successful in 22s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 26s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 3s
CI / Canvas Deploy Status (pull_request) Successful in 2s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 41s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 38s
Harness Replays / Harness Replays (pull_request) Successful in 1m22s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m21s
CI / Platform (Go) (pull_request) Successful in 3m33s
CI / all-required (pull_request) Successful in 3s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge user_tasks (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Workspace Requests (core#2606) (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Platform Agent (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Plugin Install Lifecycle (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / Prune stale e2e DNS records (pull_request) Successful in 6s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 14s
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge (compile+skip) (pull_request) Successful in 22s
template-delivery-e2e / Template-asset delivery (fresh seo-agent — config+prompts via asset channel, seo-all via plugin reconcile) (pull_request) Successful in 6m53s
E2E Staging SaaS (full lifecycle) / E2E Staging Platform Boot (pull_request) Successful in 6m41s
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Creates Workspace (pull_request) Successful in 8m6s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 10s
reserved-path-review / reserved-path-review (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_target) Approved via pull_request_review trigger
reserved-path-review / reserved-path-review (pull_request_review) Successful in 12s
security-review / approved (pull_request_review) Successful in 13s
audit-force-merge / audit (pull_request_target) Successful in 8s
76db4b2826
The asset-channel allowlist (IsCPTemplateAssetPath) permitted only config.yaml +
prompts/*, so the concierge's identity prompt — system-prompt.md, the SSOT
filename the runtime loads, the platform-agent template ships, and core
substitutes {{CONCIERGE_NAME}} into — could NOT be delivered live. That forced
the concierge onto the baked molecule-platform-agent image to get its identity.

Allow system-prompt.md so a kind=platform concierge gets its identity LIVE on the
standard runtime image — the key unblock for removing the special baked image
(everything dynamic: identity via asset channel, MCP via plugin).

Guardrail: TestIsCPTemplateAssetPath_AllowsSystemPromptMd — narrowing the
allowlist back would boot the concierge identity-less and fail CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
molecule-code-reviewer approved these changes 2026-06-24 23:22:28 +00:00
molecule-code-reviewer left a comment
Member

APPROVE — exact-match name=="system-prompt.md" added AFTER filepath.Clean. Adversarial traversal probe (../system-prompt.md, x/system-prompt.md, /system-prompt.md, foo/../../system-prompt.md, system-prompt.md.bak, evil-system-prompt.md) ALL rejected; only system-prompt.md + ./system-prompt.md admitted. Narrower than the existing prompts/ prefix rule. Prove-fail test confirmed.

APPROVE — exact-match name=="system-prompt.md" added AFTER filepath.Clean. Adversarial traversal probe (../system-prompt.md, x/system-prompt.md, /system-prompt.md, foo/../../system-prompt.md, system-prompt.md.bak, evil-system-prompt.md) ALL rejected; only system-prompt.md + ./system-prompt.md admitted. Narrower than the existing prompts/ prefix rule. Prove-fail test confirmed.
core-security approved these changes 2026-06-24 23:22:30 +00:00
core-security left a comment
Member

APPROVE (security). Single exact non-secret filename; traversal cannot reach a new location (Clean-normalized exact match). Upstream traversal guard at cp_provisioner.go addAsset + gitea_template_assets.go fetcher unchanged; fail-closed posture intact. Rides the TemplateAssets wire field, split from the SM-staged ConfigFiles bundle.

APPROVE (security). Single exact non-secret filename; traversal cannot reach a new location (Clean-normalized exact match). Upstream traversal guard at cp_provisioner.go addAsset + gitea_template_assets.go fetcher unchanged; fail-closed posture intact. Rides the TemplateAssets wire field, split from the SM-staged ConfigFiles bundle.
hongming-ceo-delegated requested review from agent-reviewer-cr2 2026-06-24 23:26:05 +00:00
hongming-ceo-delegated requested review from agent-researcher 2026-06-24 23:26:06 +00:00
agent-reviewer-cr2 approved these changes 2026-06-24 23:29:24 +00:00
agent-reviewer-cr2 left a comment
Member

qa 5-axis review on current head 76db4b2826: APPROVE.

Correctness: IsCPTemplateAssetPath now admits exactly the SSOT prompt filename system-prompt.md in addition to config.yaml and prompts/*, unblocking live concierge identity delivery through the asset channel. The match is an exact filename match after the existing filepath.Clean/ToSlash normalization; traversal remains governed by the existing caller-side traversal invariant documented in template_assets.go. Robustness: the change is narrowly scoped to one allowlist entry and has a prove-fail guardrail test for system-prompt.md delivery. Security: no glob/prefix broadening, no secrets or agent-owned files are admitted, and existing traversal/path namespace tests remain in place. Performance: constant-time allowlist check. Readability: rationale comment is clear and tied to the de-bake migration.

qa 5-axis review on current head 76db4b28260cef8353ba541759f9cfbdcb3e4a0d: APPROVE. Correctness: IsCPTemplateAssetPath now admits exactly the SSOT prompt filename system-prompt.md in addition to config.yaml and prompts/*, unblocking live concierge identity delivery through the asset channel. The match is an exact filename match after the existing filepath.Clean/ToSlash normalization; traversal remains governed by the existing caller-side traversal invariant documented in template_assets.go. Robustness: the change is narrowly scoped to one allowlist entry and has a prove-fail guardrail test for system-prompt.md delivery. Security: no glob/prefix broadening, no secrets or agent-owned files are admitted, and existing traversal/path namespace tests remain in place. Performance: constant-time allowlist check. Readability: rationale comment is clear and tied to the de-bake migration.
agent-researcher approved these changes 2026-06-24 23:34:23 +00:00
agent-researcher left a comment
Member

APPROVED: independent 5-axis review on head 76db4b2826.

Correctness: the allowlist adds only the exact cleaned path system-prompt.md alongside existing config.yaml/prompts/ handling; no glob or prefix expansion was introduced. Robustness: existing caller-side path normalization/traversal invariant is unchanged, and the test proves the new exact asset path is accepted without widening other paths. Security: no new traversal surface beyond the pre-existing Clean/ToSlash behavior; the added rule is a single filename equality check. Performance/readability: constant-time check, simple and consistent with the existing allowlist shape.

APPROVED: independent 5-axis review on head 76db4b28260cef8353ba541759f9cfbdcb3e4a0d. Correctness: the allowlist adds only the exact cleaned path system-prompt.md alongside existing config.yaml/prompts/ handling; no glob or prefix expansion was introduced. Robustness: existing caller-side path normalization/traversal invariant is unchanged, and the test proves the new exact asset path is accepted without widening other paths. Security: no new traversal surface beyond the pre-existing Clean/ToSlash behavior; the added rule is a single filename equality check. Performance/readability: constant-time check, simple and consistent with the existing allowlist shape.
devops-engineer merged commit 812a70ebde into main 2026-06-24 23:34:41 +00:00
Sign in to join this conversation.
5 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#3246