Skip to content

feat: lift deploy-targets parser into substrate (FEIP-7130 slice 1)#49

Merged
kevin-hartman merged 1 commit into
mainfrom
kevin.hartman/feip-7130-apps-deploy
May 31, 2026
Merged

feat: lift deploy-targets parser into substrate (FEIP-7130 slice 1)#49
kevin-hartman merged 1 commit into
mainfrom
kevin.hartman/feip-7130-apps-deploy

Conversation

@kevin-hartman
Copy link
Copy Markdown
Collaborator

@kevin-hartman kevin-hartman commented May 28, 2026

Summary

First slice of the FEIP-7130 lift: move DeployService from lakebase-scm-extension into the kit as the lakebase-apps-deploy substrate domain. Slice 1 covers the deploy-targets.yaml parser + types. Subsequent slices land as their own PRs.

Slice plan

Slice Surface Status
1 deploy-targets.yaml parser + types (substrate-clean API) this PR
2 deploy entrypoint: build phase + app.yaml generation next PR
3 per-branch app endpoint provision (paired with createPairedBranch) pending
4 per-branch app endpoint teardown (paired with deletePairedBranch) pending
5 OBO / credential propagation through single seam pending
6 rollback on failed deploy + extension migration PR pending

What's in slice 1

  • scripts/lakebase/deploy-targets.ts (new): DeployTarget + DeployTargetsConfig types, parseTargetsYaml, readTargets, writeTargets, getTargetNames. workspaceRoot is a required arg (no getWorkspaceRoot fallback) so the parser is host-agnostic. The deploy-targets.yaml file format is unchanged.
  • tests/bdd/deploy-targets.test.ts (new): 12 tests covering parse / read / write / round-trip / optional-field emission / file-missing / empty-targets / comments + quoted values.

Why a regex parser (not js-yaml)

The deploy-targets.yaml file has a fixed two-level structure (targets → name → key: value). A regex-based parser keeps the kit's dependency surface small. This is what the extension shipped with originally; this PR lifts the same parser behind a substrate-friendly API.

Rebased onto post-FEIP-7092 main

Originally branched from main before PR #48 landed. Re-validated hermetic suite on rebased branch: 445 passed (433 from #48's surface + 12 new from this slice), 44 skipped, 0 failed.

Test plan

  • npm run typecheck clean
  • npx vitest run tests/bdd/deploy-targets.test.ts: 12 / 12
  • npm test (full suite): 445 passed, 44 skipped, 0 failed
  • npm run build clean

Composition

This pull request and its description were written by Isaac.

First slice of the lakebase-apps-deploy lift. Moves DeployService.{parse,
read,write}TargetsYaml + getTargetNames + the DeployTarget /
DeployTargetsConfig type defs from the lakebase-scm-extension into the
kit at scripts/lakebase/deploy-targets.ts. The substrate version drops
VS Code dependencies (workspaceRoot becomes a required arg; no
getWorkspaceRoot fallback) so the same parser is callable from any
host (the extension, the kit's own CLIs, agent skills, CI scripts).

The deploy-targets.yaml format is unchanged. Layout: targets → target_name
→ key: value; two-level indent, regex-based parser (no full YAML
dependency — the file structure is fixed). Optional fields (uc_*,
lakebase_secret_*, ai_model) are only emitted on write when set.

Slice 2 (deploy entrypoint + app.yaml generation) consumes this. Slice
6 will flip the extension's local DeployService import to the substrate
package.

Tests
- tests/bdd/deploy-targets.test.ts: 12 tests covering minimal + full
  parsing, multiple targets, comments + blank lines, quoted values,
  empty-targets input, file-missing readTargets, write/read round-trip,
  optional-field emission, getTargetNames.

Co-authored-by: Isaac
@kevin-hartman kevin-hartman changed the title feat(WIP): lakebase-apps-deploy lift (FEIP-7130) feat: lift deploy-targets parser into substrate (FEIP-7130 slice 1) May 31, 2026
@kevin-hartman kevin-hartman force-pushed the kevin.hartman/feip-7130-apps-deploy branch from 88faff9 to 1a5c345 Compare May 31, 2026 04:46
@kevin-hartman kevin-hartman marked this pull request as ready for review May 31, 2026 04:46
@kevin-hartman kevin-hartman merged commit aac5c31 into main May 31, 2026
@kevin-hartman kevin-hartman deleted the kevin.hartman/feip-7130-apps-deploy branch May 31, 2026 04:46
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.

1 participant