Skip to content

feat: no-piggyback program (P0–P7) + hardening H1–H7 - #56

Merged
b68-pilot[bot] merged 52 commits into
mainfrom
feat/the-big-update
Aug 2, 2026
Merged

feat: no-piggyback program (P0–P7) + hardening H1–H7#56
b68-pilot[bot] merged 52 commits into
mainfrom
feat/the-big-update

Conversation

@BRAVO68WEB

@BRAVO68WEB BRAVO68WEB commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Ships the no-piggyback product architecture on feat/the-big-update: dual-license monorepo, deployment-mode org-create matrix, enterprise package seams, entitlement gates, Hosted FE enterprise build, and post-program hardening (H1–H7).

Program (P0–P7)

  • P0–P1 / 1b: ENVSYNC_DEPLOYMENT_MODE, org-create channel policy, self-host setup-token path
  • P2–P3: Landing off self-host; OSS vs enterprise deploy CLI split
  • P4: Coder-style Ed25519 entitlement feature gates
  • P5 / 5b / 5c: envsync-kernel + envsync-enterprise + envsync-enterprise-web; kill management SPA
  • P6–P7: Dual-license docs, Organization naming, POST /auth/create-organization only; max_orgs from claims

Hardening (H1–H7)

  • H1: Hosted CF build:hosted (not OSS); SDKs call create-organization
  • H2: Organization provisioning naming cleanup
  • H3 + H7: EE services/engines/migrations owned by envsync-enterprise (API re-export shims)
  • H4: Entitlement lease docs + verify tests; license-server EdDSA (private/gitignored)
  • H5: envsync-ui design tokens
  • H6: Support matrix, CONTRIBUTING footguns, EE web as web devDependency
  • H7: HOSTED-CUTOVER.md, check:hosted-cutover, LICENSE-SERVER-DEPLOY.md

Plans

Test plan

  • bun run check:boundaries
  • bun run check:hosted-cutover (repo invariants)
  • Hosted web build:hosted (EE chunks present)
  • Mock tests for enterprise-sync / entitlement lease (sampled)
  • CI green on this PR
  • Hosted staging: apply H1.4 secrets from docs/HOSTED-CUTOVER.md
  • Hosted staging smoke: HOSTED_SMOKE_BASE_URL + token
  • Self-host OSS path still build:oss (release matrix)
  • Ops: production license-server non-fixture Ed25519 keys

Ops notes (post-merge)

  1. Deploy API before/with web; do not leave clients on create-workspace
  2. Hosted FE must stay on build:hosted
  3. See cutover order in docs/HOSTED-CUTOVER.md

Complete Phase 0 on feat/the-big-update-p0: full program plan (D1–D22),
ADR 0001, org-create/deploy/FE inventories, PR template channel checks,
ENVSYNC_DEPLOYMENT_MODE and ENVSYNC_MAX_ORGS reserved without behavior
change, and AGENTS/CONTRIBUTING links for the rollout track.
Implement ENVSYNC_DEPLOYMENT_MODE policy with hosted vs selfhosted
channel matrix: public signup and dashboard create-org are hosted-only;
self-host web always gets ORG_CREATE_CHANNEL_FORBIDDEN. Deploy runtime
env sets selfhosted + max_orgs=1; system status and whoami expose policy
flags; UI hides create-organization on self-host.
Add operator-only POST /api/setup/org and GET /api/setup/status authenticated
with X-EnvSync-Setup-Token (selfhosted only). Deploy CLI generates
/etc/envsync/setup.token, injects ENVSYNC_SETUP_TOKEN, and exposes
`org create` / `org status`. Bootstrap prompts for first org on TTY;
health reports first_org.ready. Documents flow in SELFHOSTING.md.
Move user-invite accept UX to envsync-web, point self-host invite emails
and clipboard links at DASHBOARD_URL, and omit landing from self-host
deploy topology/traefik by default. Hosted keeps landing for public
signup and org invite accept.
Bundle full lifecycle into @envsync-cloud/deploy with forced OSS edition
(no monorepo spawn). Rename deploy-cli npm package to
@envsync-cloud/deploy-enterprise with bin envsync-deploy-enterprise and
private GitHub Packages publish. OSS images use envsync-web-oss-static;
SELFHOSTING documents the public OSS package.
Introduce verified entitlement JWTs as authority for self-host enterprise
features and max_orgs claims. Wire requireFeature-style guards on EE routes,
grace after expiry, certificate claim apply, and unit tests with fixture keys.
Hosted continues to bypass customer license files; OSS remains hard-deny.
…raph

Introduce envsync-kernel (MIT errors/types) and envsync-enterprise
(proprietary management module registry). Management API process depends on
workspace packages by name instead of relative envsync-api/src imports.
Core loadApiModules never imports enterprise; CI boundary checks enforced.
Move enterprise integrations pages, components, and management UI hooks
into packages/envsync-enterprise-web. Shell Vite alias injects the package
for enterprise builds and an empty stub for OSS so EE routes are not
first-class in-tree sources anymore.
Port license activate/verify and org-level sync diagnostics into
envsync-enterprise-web modules under the dashboard shell. Remove
apps/envsync-management-web, the dist/manage merge script, and turbo
dev task for the second SPA (D11).
…ation API

Finalize PostHog-style dual LICENSE, EDITIONING dual-license monorepo,
CONTRIBUTING proprietary terms, and SUPPORT matrix. Prefer
POST /auth/create-organization with create-workspace as deprecated alias.
Polish dashboard copy to Organization (not workspace multi-org alias).
Remove POST /auth/create-workspace (create-organization only). Gate
ENVSYNC_MAX_ORGS behind support override so multi-org needs entitlement
claims. Delete ~740 lines of unused duplicate render helpers in deploy-cli.
Document management network policy example and root CHANGELOG.
Cloudflare deploy-fe now builds envsync-web with build:hosted so EE modules
ship. Path filter includes envsync-enterprise-web. Public TS/Go SDKs call
POST /api/auth/create-organization; createWorkspace is a deprecated wrapper.
Boundary checks enforce both ship blockers.
Rename WorkspaceProvisioningService to OrganizationProvisioningService,
saga createOrganizationForExistingIdentity, CreateOrganizationDialog, and
e2e organizations.spec. Keep thin deprecated re-exports for transition.
…ialog

Complete H2 naming: organization-provisioning service, auth controller
wiring, CreateOrganizationDialog, Go CreateOrganizationRequest type, and
phase-h2 docs. Deprecation shims retained for old import paths.
Physically own enterprise-sync, integration, provider, provider-sync, and
certificate-verifier under the proprietary package. API keeps thin re-export
shims without a production package.json dependency. Sync worker background
entry is registered from envsync-enterprise modules.
Document Hosted vs self-host license install (LICENSE-RUNBOOK). Extend
LicenseVerificationResponse with entitlement_alg. Add unit tests that
license-server-shaped EdDSA JWTs unlock features under enforcement.
Private license-server EdDSA issuer patch notes under phase-h4 (package
is gitignored for private deployment).
Introduce MIT packages/envsync-ui with shared CSS variables and Tailwind
preset. Dashboard and landing import tokens instead of forked :root blocks.
API E2E covers hosted create-org, selfhost deny, removed create-workspace,
and cookie-session requirement. UI E2E loads EE org routes and asserts
no management SPA; regression route surface includes EE paths.
getMaxOrgsForChannel collapsed hosted null max_orgs to 1 via ?? 1,
blocking UI harness bootstrap after the first org. Hosted (non-single-org)
now returns unlimited for all channels including cli_bootstrap.
Remove envsync-enterprise from envsync-api devDependencies. EE code is
reached only via monorepo-relative re-export shims; the reverse edge
caused turbo test:mock to fail with a cyclic package graph. Boundary CI
now forbids any package.json edge api → enterprise.
rotation.service lived in envsync-api and imported ./secret.service;
after H7 move the relative path broke envsync-management-api esbuild.
Use @/services/secret.service so the management-api alias plugin resolves core.
- OSS deploy owns the engine (src/cli.ts); EE deploy-cli is a thin entry
  that depends on @envsync-cloud/deploy (open-core direction EE→OSS).
- Enterprise background uses envsync-api/license public export; CA PEM
  ships under envsync-enterprise assets (no ../../envsync-api paths).
- Boundary CI enforces these edges. Management/UI/full EE @/* debt remains P1+.
Routes, controllers, and validators for license, enterprise integrations,
OIDC, SAML, rotation, dynamic secrets, and log-forwarding now live under
envsync-enterprise. Management modules load local routes; core loaders
only keep shared onboarding/system. Management-api owns create-app wrap.
- Add envsync-api/ports public re-exports (db, errors, logger, env, middlewares,
  helpers, services, validators); enterprise no longer path-maps @/* into api src.
- Codemod all enterprise @/ deep imports to package ports.
- Grow envsync-ui with cn, Button, Badge, Card, Input; web re-exports for compat.
- Boundary CI enforces no enterprise @/ and presence of ports + UI primitives.
Serve Enterprise manage routes at /api/v1/manage on the single API process,
remove envsync-management-api and separate management SDKs, regenerate core
TS/Go clients, rewire CLI and enterprise-web, update CI and product docs, and
stop tracking local docs/ in git.
…-manage-api

feat: unify manage API on core and collapse management SDKs
@BRAVO68WEB BRAVO68WEB self-assigned this Aug 1, 2026
Bump monorepo product packages and TS SDK to 0.20.0, expand release:bump
coverage, document multi-edition deploy (DEPLOY.md), and align OpenAPI/SDK
version strings for the cut.
- Build API images from monorepo root so workspace:* (kernel, sdks) resolve
- Copy packages+sdks+apps for enterprise and OSS API Dockerfiles
- Rewrite deploy/deploy-cli workspace deps to semver before npm publish
- Use Node 22 in release workflow (Node 20 deprecation on Actions)
@BRAVO68WEB

Copy link
Copy Markdown
Contributor Author

@b68-pilot summary

@b68-pilot

b68-pilot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

PR #56: feat: no-piggyback program (P0–P7) + hardening H1–H7

533 file(s) changed, +20906 / -22334

By file type:
.md: 10 file(s), +997 / -120
.yml: 1 file(s), +75 / -85
.other: 1 file(s), +53 / -0
.example: 1 file(s), +23 / -2
.yaml: 2 file(s), +12 / -16
.ts: 5 file(s), +6 / -410
.gitignore: 1 file(s), +3 / -1
.json: 3 file(s), +3 / -46
.css: 2 file(s), +2 / -514
.html: 1 file(s), +0 / -13
.js: 1 file(s), +0 / -7
.tsx: 2 file(s), +0 / -763

Changed files:
~ .env.example (+23/-2)

  • .github/PULL_REQUEST_TEMPLATE.md (+37/-0)
    ~ .github/workflows/ci.yaml (+4/-9)
    ~ .github/workflows/deploy-fe.yaml (+8/-7)
    ~ .github/workflows/release.yml (+75/-85)
    ~ .gitignore (+3/-1)
    ~ AGENTS.md (+44/-16)
  • CHANGELOG.md (+173/-0)
    ~ CONTRIBUTING.md (+62/-6)
  • DEPLOY.md (+480/-0)
    ~ EDITIONING.md (+96/-45)
    ~ LICENSE (+53/-0)
    ~ README.md (+40/-22)
    ~ SELFHOSTING.md (+56/-21)
    ~ apps/envsync-landing/README.md (+4/-9)
    ... and 15 more

New files: 3
Deleted files: 11

@BRAVO68WEB

Copy link
Copy Markdown
Contributor Author

@b68-pilot approve

@b68-pilot

b68-pilot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Approved.

@b68-pilot b68-pilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved by b68-pilot.

@BRAVO68WEB

Copy link
Copy Markdown
Contributor Author

@b68-pilot merge

@b68-pilot
b68-pilot Bot merged commit 667debb into main Aug 2, 2026
13 of 14 checks passed
@b68-pilot

b68-pilot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant