Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: release

# Cut a GitHub Release when a version tag is pushed.
# Artifacts match scripts/release/build-artifacts.sh (source, JAR, frontend,
# MCP pack, SBOMs, checksums, manifest).

on:
push:
tags:
- 'v*.*.*'

permissions:
contents: write

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
build-and-publish:
name: build artifacts + GitHub Release
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0

- uses: actions/setup-java@v5.6.0
with:
distribution: temurin
java-version: '25'
cache: maven

- uses: actions/setup-node@v7
with:
node-version: '22'
cache: npm

- name: Build release artifacts
run: |
chmod +x scripts/release/build-artifacts.sh
./scripts/release/build-artifacts.sh "${GITHUB_REF_NAME}"

- name: Verify checksums
run: |
cd "release-artifacts/${GITHUB_REF_NAME}"
sha256sum -c SHA256SUMS
sha512sum -c SHA512SUMS

- name: Upload workflow artifacts
uses: actions/upload-artifact@v4
with:
name: deepsql-${{ github.ref_name }}
path: release-artifacts/${{ github.ref_name }}/
if-no-files-found: error
retention-days: 30

- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"
NOTES="docs/releases/RELEASE_NOTES-${TAG}.md"
if [[ ! -f "$NOTES" ]]; then
NOTES="CHANGELOG.md"
fi
# Idempotent: if the release already exists (re-run), upload assets only.
if gh release view "$TAG" >/dev/null 2>&1; then
gh release upload "$TAG" "release-artifacts/${TAG}"/* --clobber
else
gh release create "$TAG" \
--title "DeepSQL ${TAG}" \
--notes-file "$NOTES" \
--verify-tag \
"release-artifacts/${TAG}"/*
fi
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

# production
/build
# Local / CI release bundles (JAR, source archives, SBOMs, checksums)
/release-artifacts/

# misc
.DS_Store
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Changelog

All notable changes to DeepSQL are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
for product tags (`vMAJOR.MINOR.PATCH`).

## [1.0.0] — 2026-08-13

First public OSS release.

### Added

- Self-hosted DeepSQL stack: Spring Boot backend, React UI, DeepSQL Agent, MCP/CLI (`@deepsql/mcp`).
- Brain initialization with multi-schema discovery, coverage gates, and terminal `NEEDS_ATTENTION` handling.
- Agent tab SSO bridge with per-user MCP tokens, token-file rotation, and fail-loud provisioning.
- Dashboard artifact generation (HTML + sandboxed `deepsql.query` bridge).
- BYO LLM via OpenAI-compatible providers (`LlmProviderRegistry` / `LlmConfigResolver`).
- Official release tooling: `scripts/release/build-artifacts.sh` and tag-driven GitHub Release workflow.

### Security

- Session kill endpoints reject non-integer PIDs (SQL injection class closed).
- Dangerous controllers enforce connection ACL; Hermes/agent provisioner bind loopback.
- Compose Valkey password + Actuator limited to health for anonymous callers.
- JWT / session auth fail-closed when secrets are missing.

### Known limitations

- Residual high-severity items tracked in `docs/oss-ux/OSS_SECURITY_REVIEW.md` (IDOR sweep, SET preamble allowlist, SSRF hardening, share-password defaults) are deferred past this cut.
- Primary distribution path remains `docker compose up --build` (no pre-built container registry in this release).

[1.0.0]: https://github.com/DeepSQLAI/deepsql/releases/tag/v1.0.0
31 changes: 31 additions & 0 deletions docs/oss-ux/E2E_RELEASE_VERIFICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# E2E release verification — 2026-08-13

Stack: native Cloud VM (Postgres 16 + Redis + Spring Boot `:8080` + Vite `:3000` + Hermes `:8787` + provisioner `:8788`). `main` at `7833f31` (post security PR #49). Redeployed backend from packaged `dba-agent-backend-1.0.0.jar`.

## Results

| Check | Result | Notes |
|-------|--------|-------|
| `GET /api/actuator/health` | PASS | `200` |
| Anonymous Prometheus | PASS | `401` (not exposed) |
| Login `admin@localhost` | PASS | `auth_token` cookie |
| Connections list | PASS | 3 connections incl. `demo_shop` |
| Brain init status | PASS | `COMPLETED` / 100% |
| `/onboarding` | PASS | `200`, title DeepSQL |
| Agent session `mcpAuthOk` | PASS | `true` after provisioner restart |
| Agent Q&A (`e2e-agent-check.py`) | PASS | `execute_sql` → `demo_shop` |
| Dashboard generate | PASS | HTML + `deepsql.query` |
| Kill malicious PID | PASS | `400` Invalid session id |
| Logout | PASS | subsequent `/auth/me` → `401` |
| MCP JS syntax | PASS | `node --check` clean |
| Hermes bind | PASS | `127.0.0.1:8787` |

## Ops notes discovered during redeploy

1. **Provisioner must run current tree** — an Aug-12 `local-agent-provisioner.py` process lacked `DEEPSQL_TOKEN_FILE` writes; restarting from `scripts/local-agent-provisioner.py` fixed profile token files.
2. **Hermes webui caches MCP env** — after rotating tokens / updating `~/.hermes/config.yaml`, restart `hermes-webui` or Agent tab MCP calls 401 with stale env (USER_ID=`deepsql-agent`, no `DEEPSQL_AUTH_TOKEN`). Dashboard generate stayed green because it uses the channel-token path.
3. Syncing default `~/.hermes/config.yaml` `mcp_servers.deepsql.env` from the active `u-admin` profile after provision keeps native/dev Agent tab healthy.

## Release gate

Functional smoke + agent/dashboard E2E are green for the `v1.0.0` artifact cut. Remaining security Highs in `OSS_SECURITY_REVIEW.md` are documented, not blockers for this tagged OSS release.
5 changes: 5 additions & 0 deletions docs/oss-ux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ These docs are the durable home for OSS go-live planning. **Do not rely on `/opt
| [`OSS_LAUNCH_USABILITY_CRITIQUE.md`](./OSS_LAUNCH_USABILITY_CRITIQUE.md) | E2E usability findings (Brain, Agent, onboarding) |
| [`E2E_FIX_PROPOSAL.md`](./E2E_FIX_PROPOSAL.md) | Product fix workstreams W1–W7 + PR order |
| [`OSS_SECURITY_REVIEW.md`](./OSS_SECURITY_REVIEW.md) | Security Criticals/Highs + S1–S10 track |
| [`E2E_RELEASE_VERIFICATION.md`](./E2E_RELEASE_VERIFICATION.md) | Pre-`v1.0.0` stack redeploy + smoke matrix results |
| [`RELEASE.md`](./RELEASE.md) | How to cut GitHub Releases (artifacts, tags, checksums) |
| [`DAILY_RELEASE_AUTOMATION.md`](./DAILY_RELEASE_AUTOMATION.md) | Morning PR triage automation prompt |

Product release notes live under [`docs/releases/`](../releases/). Build locally with `./scripts/release/build-artifacts.sh v1.0.0` (output: `release-artifacts/v1.0.0/`).

Other Cloud Agents: read these paths from the repo (this branch or after merge to `main`).
93 changes: 93 additions & 0 deletions docs/oss-ux/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# DeepSQL release process

How we cut an official GitHub release with builds, source archives, checksums, and SBOMs.

## Versioning

| Surface | Where | Current |
|---------|-------|---------|
| Product / Git tag | `vMAJOR.MINOR.PATCH` | `v1.0.0` |
| Backend JAR | `backend/pom.xml` `<version>` | `1.0.0` |
| Frontend package | root `package.json` | `0.1.0` (internal) |
| MCP / CLI npm | `mcp/package.json` | `0.27.0` |

Tag the **product** version (`v1.0.0`). Keep backend `pom.xml` in lockstep with the tag for the JAR filename. MCP may continue its own semver when publishing `@deepsql/mcp` to npm.

## Pre-flight (release manager)

1. `main` is green on CI (`frontend`, `backend`, `mcp`, `compose-build`).
2. Smoke matrix from `docs/oss-ux/E2E_FIX_PROPOSAL.md` W7 passes on a redeployed stack:
- login / auth cookie
- Brain init `COMPLETED`
- Agent Q&A (`scripts/self-host/e2e-agent-check.py`) → `AGENT_OK` + `DASH_OK`
- `/onboarding` renders
- security smoke: anonymous Prometheus `401`, malicious kill pid `400`
3. `CHANGELOG.md` and `docs/releases/RELEASE_NOTES-vX.Y.Z.md` updated.

## Local artifact build

```bash
./scripts/release/build-artifacts.sh v1.0.0
# → release-artifacts/v1.0.0/
```

Skip expensive rebuilds when iterating:

```bash
SKIP_BACKEND=1 SKIP_FRONTEND=1 ./scripts/release/build-artifacts.sh v1.0.0
```

Verify checksums:

```bash
cd release-artifacts/v1.0.0
sha256sum -c SHA256SUMS
```

## Publish on GitHub

Preferred path (CI):

```bash
git checkout main && git pull
git tag -a v1.0.0 -m "DeepSQL v1.0.0"
git push origin v1.0.0
```

Pushing the tag runs `.github/workflows/release.yml`, which:

1. Builds source archives, backend JAR, frontend tarball, MCP pack
2. Generates CycloneDX SBOMs (best-effort)
3. Writes `SHA256SUMS` / `SHA512SUMS` + `manifest.json`
4. Creates a GitHub Release (non-draft) attaching every file under `release-artifacts/v1.0.0/`

Manual fallback (if Actions cannot publish):

```bash
./scripts/release/build-artifacts.sh v1.0.0
gh release create v1.0.0 \
--title "DeepSQL v1.0.0" \
--notes-file docs/releases/RELEASE_NOTES-v1.0.0.md \
release-artifacts/v1.0.0/*
```

## Artifact set (what “industry standard” means here)

| Artifact | Purpose |
|----------|---------|
| `*-source.tar.gz` / `.zip` | Bit-for-bit source corresponding to the tag (`git archive`) |
| `dba-agent-backend-*.jar` | Runnable Spring Boot binary |
| `deepsql-frontend-*.tar.gz` | Static SPA to serve behind nginx |
| `deepsql-mcp-*.tgz` | CLI / MCP installable package |
| `sbom-*.cdx.json` | CycloneDX software bill of materials |
| `SHA256SUMS` / `SHA512SUMS` | Integrity verification |
| `manifest.json` | Machine-readable inventory (commit, sizes, hashes) |
| `RELEASE_NOTES.md` | Human-facing release notes |

Docker Compose remains the primary install path (`docker compose up --build`); the JAR + frontend tarball support air-gapped / non-Compose operators.

## Post-release

- Confirm the Release page lists every file and checksums verify.
- Announce with the tag URL + one-line upgrade note.
- Bump versions on `main` for the next cycle only after the tag is cut (avoid tagging a commit whose pom still says the previous version).
56 changes: 56 additions & 0 deletions docs/releases/RELEASE_NOTES-v1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# DeepSQL v1.0.0

**First public open-source release** — self-hosted database agent for PostgreSQL and MySQL.

## Highlights

- **Ask your database** — schema exploration, SQL generation, slow-query help, and index guidance through the web UI or MCP/CLI.
- **Brain** — indexes your schemas (including non-`public` Postgres schemas) so the agent has real context.
- **DeepSQL Agent** — per-user profiles, MCP tool access scoped to your login, dashboard HTML artifacts with a read-only query bridge.
- **BYO model** — point at OpenAI, Azure OpenAI, or any OpenAI-compatible endpoint. No vendor lock-in on inference.
- **Self-host first** — credentials stay in your vault DB; Compose builds from source.

## Install

```bash
git clone https://github.com/DeepSQLAI/deepsql.git
cd deepsql
git checkout v1.0.0
cp .env.example .env
# set SECURITY_JWT_SECRET, ENCRYPTION_KEY, and DEEPSQL_CHAT_* in .env
docker compose up --build -d
```

Air-gapped / non-Compose: download the JAR + frontend tarball from this Release, verify `SHA256SUMS`, and follow `docs/oss-ux/RELEASE.md`.

## Artifacts in this release

| File | Contents |
|------|----------|
| `deepsql-1.0.0-source.tar.gz` / `.zip` | Source tree at this tag |
| `dba-agent-backend-1.0.0.jar` | Spring Boot executable |
| `deepsql-frontend-1.0.0.tar.gz` | Production static UI |
| `deepsql-mcp-0.27.0.tgz` | CLI + MCP server package |
| `sbom-*.cdx.json` | CycloneDX SBOMs |
| `SHA256SUMS` / `SHA512SUMS` | Integrity hashes |
| `manifest.json` | Machine-readable inventory |

Verify:

```bash
sha256sum -c SHA256SUMS
```

## Security notes

Critical/high items addressed before this cut are listed in `CHANGELOG.md` and `docs/oss-ux/OSS_SECURITY_REVIEW.md`. Please report new vulnerabilities per `SECURITY.md`.

## Verify before upgrading production

On a staging stack, run:

```bash
python3 scripts/self-host/e2e-agent-check.py
```

Expect `AGENT_OK True` and `DASH_OK True`.
Loading
Loading