Skip to content

feat(template): command and mountPath, release 0.1.17 - #327

Merged
CarmenDou merged 3 commits into
mainfrom
feat/template-runtime-fields
Oct 2, 2026
Merged

CarmenDou merged 3 commits into
mainfrom
feat/template-runtime-fields

Conversation

@CarmenDou

@CarmenDou CarmenDou commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Add local validation for two optional service runtime fields that the platform's provisioning layer supports: command (non-empty string, entrypoint override) and mountPath (absolute path for volume mount, requires volume: true). Refuse both fields on managed datastores (postgres, redis, mysql, mongodb) matching platform behavior.

Also display mountPath in the template info output when present, falling back to the default /data mount point for manifests authored before this release.

How

  1. Extend ManifestService type to include command and mountPath fields in src/template-manifest.ts
  2. Add command and mountPath to the managed datastore bare-field list to refuse them on postgres/redis/mysql/mongodb services
  3. Add validation rules for both fields that match platform/provisioning/templateManifest.ts exactly
  4. Update normalizeInfoServices in src/commands/template.ts to copy mountPath from service specs
  5. Update templateInfoLines to render the service's mountPath instead of hardcoded /data

Verify

Verified on Node 22.23.3 with PATH="/Users/carmen/.claude/jobs/e0bc4f26/tmp/node-v22.23.3-darwin-arm64/bin:$PATH":

  • npx vitest run test/template.test.ts -t "managed datastore": passed (3 tests covering postgres/redis/mysql/mongodb refusing command and mountPath)
  • npx vitest run test/template.test.ts: passed (89 tests, 22ms)
  • npm run typecheck: passed (no TypeScript errors)
  • npm test: passed (95 test files, 1943 tests, 18.57s)

Template info now renders custom mount paths correctly:

  • Service with volume: true, mountPath: '/app/storage' renders as persistent /app/storage
  • Service with volume: true and no mountPath still renders as persistent /data

Managed datastore validation:

  • postgres/redis/mysql/mongodb services reject both command and mountPath with "carries no" message
  • Non-managed services accept both fields when properly formatted

This PR merges after insta-platform#593 is deployed. The v0.1.17 tag is pushed after merge (main had already released 0.1.15 and 0.1.16).

@jwfing jwfing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The change correctly adds command and mountPath support while preserving legacy /data rendering behavior.

Requirements context

Intent was derived from the PR description and the repository’s statement that local validation mirrors the platform’s authoritative template parser (src/template-manifest.ts:1-7). No separate in-repo design document or linked issue was found; the referenced private platform PR was unavailable from this environment. This is a manifest-schema change, not a command/flag change, so the CLI-reference mirroring requirement does not apply.

Findings

Critical

(none)

Suggestion

(none)

Information

  • Software engineering / functionality: The implementation declares both runtime fields, rejects them on all managed datastore types, validates non-empty commands and absolute volume-backed mount paths, and preserves the manifest for submission (src/template-manifest.ts:25-36, src/template-manifest.ts:134-197). Tests cover valid fields, invalid shapes, every managed datastore, custom rendering, and the /data fallback (test/template.test.ts:143-151, test/template.test.ts:319-326, test/template.test.ts:398-405).
  • Compatibility: Template info accepts both array and map service shapes, retains legacy volumeGib handling, and falls back to /data when no custom path exists (src/commands/template.ts:42-57, src/commands/template.ts:93-102).
  • Security: No security-relevant regression found. The CLI validates and forwards the intended runtime strings but does not execute command locally; there are no authentication, secret-handling, dependency, SQL, or local shell-execution changes (src/template-manifest.ts:190-197).
  • Performance: No performance concerns. The additions are constant-time checks within the existing per-service validation and rendering passes (src/template-manifest.ts:124-198, src/commands/template.ts:93-102).
  • Verification: git diff --check passed. The repository typecheck/test gate could not run because node_modules is absent and tsc is unavailable; no dependency installation was performed in this read-only review (package.json:30-33).

Verdict

Approved — no Critical findings.

@CarmenDou CarmenDou changed the title feat(template): command and mountPath, release 0.1.14 feat(template): command and mountPath, release 0.1.17 Oct 1, 2026

@jwfing jwfing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - approved.

@CarmenDou
CarmenDou marked this pull request as ready for review October 2, 2026 00:34
@CarmenDou
CarmenDou merged commit 3618e8a into main Oct 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants