0
Fork 0
mirror of https://github.com/oblien/openship.git synced 2026-11-16 06:57:12 +00:00
Commit graph

714 commits

Author SHA1 Message Date
Hydra de lerne
e19711e1c5
feat: add domain virtual responses with a compact editor (#1739)
* feat: add domain virtual responses with a compact editor and bounded edge matching

* fix: keep traffic working during rolling edge script updates

* refactor: centralize edge management transport
2026-11-12 21:20:24 +02:00
Hydra de lerne
739728ce11
fix(migration): preserve project services and reuse domain routing (#1740) 2026-11-12 21:06:52 +02:00
Hydra de lerne
47431eb567
update (#1737) 2026-11-12 17:15:42 +02:00
Hydra de lerne
db8a5cf4f4
fix(mail): complete local backups and portable server restores (#1734)
* fix(mail): complete local backups and portable server restores

* test(mail): report engine diagnostics on round-trip failure

* fix(mail): stop Postfix writers before container snapshots

* fix(mail): apply Postfix shutdown in the daemon action renderer

* test(mail): install GNU tar on the remote fixture host
2026-11-12 17:03:11 +02:00
Hydra de lerne
367afdec91
fix: sync dashboard setup, instance imports, and migration pages (#1729)
* fix(import): restore workspace visibility and verified edge status

* fix: complete dashboard setup and migration website updates
2026-11-12 11:10:49 +02:00
Hydra de lerne
0976d9d082
fix(migration): improve platform import setup and cancellation (#1728) 2026-11-12 08:14:23 +02:00
Hydra de lerne
679848601d
fix(db): repair missing workspace and advisory fields on upgrade (#1727) 2026-11-12 08:04:47 +02:00
Saim Shafique
057d65de7a
fix(deploy): let webhook and CLI deploys approve reviewed Compose changes (#1675)
* fix(deploy): let webhooks and CLI accept reviewed Compose changes

Webhook and CLI deploys hit COMPOSE_REVIEW_REQUIRED with no way through the gate, and the refusal hid what changed. Accept the current Compose source explicitly per deploy (--accept-compose-changes, or acceptComposeChanges on the hook), and surface the added/changed/removed services in the CLI error and the webhook delivery record.

* test(contracts): include acceptComposeChanges in deployment schema flags

The Compose review gate added acceptComposeChanges to
CreateDeploymentSchema without updating the contract test that
enumerates the schema's public flags, so the contracts suite failed
on CI. Add the flag to the expected list.

* docs(cli): list --accept-compose-changes in the deploy reference

The new deploy flag was missing from the generated CLI reference,
so docs:check failed with a stale reference. Add the row in
declaration order.

* Retain explicit Compose approval through shared deployment admission

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-11 18:57:58 +02:00
Hydra de lerne
4ab89b9510
fix(build): keep environment values out of Dockerfiles and logs (#1674)
* fix(build): keep environment values out of Dockerfiles and logs

* test(build): exercise secret transport in deployment CI

* test(build): align cloud fixture file and command identities

* fix(build): validate secrets before allocating build resources
2026-11-11 16:54:35 +02:00
chriscrosby
36239dd5ff
Allow reviewed repository patches to delete regular files (#1693)
* Allow reviewed repository patches to delete regular files

* Show file deletions in repository patch review

---------

Co-authored-by: Chris Crosby <1213497+chriscrosby@users.noreply.github.com>
2026-11-11 16:38:34 +02:00
Saim Shafique
0df888e864
fix(updates): report image services with an unknown deployed digest instead of up to date (#1706)
* fix(updates): report image services with an unknown deployed digest instead of up to date

When the active service_deployment row has no image_digest — a carried
service loses it when a per-service update upserts the row — the feed
compared digests only when both were known and fell back to the equal
ref strings, so the service read as up to date and `?behind=1` dropped
the project entirely.

The deployed side is now marked unknown, not current: evaluateDrift
flags image services whose row has no digest, and the feed resolves
those against the live daemon before rendering — the running
container's image ID against the image ID the configured tag resolves
to right now, the same test the deploy pipeline uses before carrying
an unchanged service. A mismatch is behind; matching images recover
the tag's RepoDigest onto the row when the registry comparison agrees;
anything the daemon cannot answer stays unknown and the project is
kept visible with an `unverified` flag instead of being dropped.

Fixes #1702

* fix(updates): narrow the live runtime to DockerRuntime before resolving unknown digests

`resolveDeploymentRuntimeForRead` returns a `RuntimeAdapter`, and
`prepareDeploymentImage` is Docker-only, so the Typecheck job failed
with TS2345 at local-image-drift.ts:79. Guard the call with the same
`instanceof DockerRuntime` check `recordDeploymentArtifacts` uses:
other runtimes leave the services unknown, and the runtime is still
disposed on every path.

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-11 16:04:58 +02:00
Hydra de lerne
5bf164283d
Check source-update PR access and guide GitHub permission recovery (#1721)
* Check source PR permissions and provide connection recovery

* Update assistant PR fixtures for permission preflight
2026-11-11 15:46:45 +02:00
Rohan Das
6565726c01
feat(dns): add DigitalOcean DNS provider (#1707)
* feat(dns): add DigitalOcean DNS provider support

- Add DigitalOcean DNS management for custom domains and DNS-verified HTTPS
- Preserve record ownership with paired TXT markers and update provider setup guidance

* fix(dns): parse DigitalOcean record IDs from formatted JSON

- Handle compact and pretty-printed API responses, with a fallback when Python is unavailable
- Cover record cleanup and API error responses in DNS hook tests

* fix(dns): harden DigitalOcean DNS provider after review

- Decode TXT input before writing so quoted values compare in-sync
- Treat zones not delegated to DigitalOcean nameservers as pending
- Resolve zones with one paginated domain list and strip wildcard labels
- Carry credential id and provider on unauthorized lookups so the
  reconnect modal targets the rejected credential
- Clean up ownership markers when the marked record is already gone
- Report read-only token verification accurately and surface missing
  write scope on 403
- Guard token redaction and requests against an empty token
- Share DNS name helpers and the DNS-01 cleanup hook template

* fix(dns): release owned records from inactive DigitalOcean zones

- Allow DNS cleanup to resolve inactive zones while keeping writes restricted to active zones
- Fetch DigitalOcean records and ownership markers concurrently

* fix(dns): resolve provider credentials oldest first

* Require strict JSON record IDs before DNS challenge cleanup

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-11 15:23:24 +02:00
Hydra de lerne
f537a4fdb3
Fix custom API setup state and reuse managed agent setup (#1722) 2026-11-11 15:11:18 +02:00
Saim Shafique
3fd39c5dc5
fix(api): stamp PAT token id on REST audit rows and audit token reads (#1708)
* fix(api): stamp PAT token id on REST audit rows and audit token reads

Two gaps in the audit log, both from the same root: a REST call made
with a personal access token left no trace of WHICH token made it, and
a successful read made with a token left no row at all — while the
same read through MCP was audited with the token id attached.

- resolveCallClientId now falls back to the credential the auth layer
  already resolved: a token principal's session id IS its canonical
  principal id (pat:<id> / oauth:<clientId>), minted from the
  hashed-token lookup, not from anything the caller supplies. The
  nonce-signed MCP claim still wins. Browser sessions never reach the
  fallback (no principalKind), so a cookie session id can never land
  in the column. Shared operations and the deployment create path use
  the same resolver, so their rows gain the token id too. No schema
  change: the column was documented for exactly this value.
- The route emitter now audits successful reads/lists by token
  principals (PAT / OAuth) — a script holding a token gets the same
  "what did it look at" treatment MCP already gives its reads.
  Browser reads stay unaudited (too noisy), failed reads are still
  not logged, and operations that already recorded the call still
  skip the emitter. One exception: reads of the audit log itself are
  not audited — every such read would append a row to the log, so its
  total could never be stable and its facets would be dominated by
  whoever reads it most.

Fixes #1703

* fix(api): clear the error-boundary gate and the tokens parity expectation

The error-boundary gate flagged the pre-auth catch in
resolveCallClientId as unobserved. It only runs when no
RequestContext exists yet, so there is no credential to derive
from: mark it with the repo's diagnostics-ignore marker.

The tokens SDK-parity audit test listed only the three MCP rows,
but token reads are now audited by design, so the two remote
token-client reads in that test add two settings:read rows.
Expect them, matching the settings/webhooks parity updates.

Fixes #1703

* fix(api): avoid duplicate MCP read audit events

* fix(api): simplify audit coverage and reject malformed nonce bytes

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-11 14:43:44 +02:00
Hydra de lerne
a2384998ba
Propose source image updates through reviewed GitHub PRs (#1717)
* feat(updates): propose reviewed image changes in repository PRs

* Reuse deployment image validation and publish source-update API references

* Keep shared and inherited Compose image edits in the source editor

* Offer reviewed source updates for pinned advisory images
2026-11-11 13:55:46 +02:00
Hydra de lerne
01b9fbe739
Protect support intake and add mailbox sender blocking (#1715)
* Protect support intake and add mailbox sender blocking

* Regenerate support operator route reference

* Wire contact widget key into the website runtime

* Fix repeat contact challenges and classify private support blocks
2026-11-11 13:35:46 +02:00
Hydra de lerne
99904af0f8
Add platform imports and refresh dashboard and Cloud website (#1713)
* feat: add platform migrations and refresh the Cloud experience

* fix(ci): run MongoDB 8 imports on compatible runners

* docs(web): add Railway and Vercel migration pages

* feat(dashboard): add shared dotenv text editing and top add action

* fix(dashboard): wrap text editor actions on narrow screens
2026-11-11 11:58:09 +02:00
Hydra de lerne
a6275b8519
Support hosted Jobs on Manage-connected SSH servers (#1712) 2026-11-11 02:32:32 +02:00
Hydra de lerne
2aef5b840c
Improve deployment speed, verification, and cancellation emails (#1683)
* perf: reuse Docker builders and parallelize independent Compose work

* test: exercise declared dependency gates on the isolated Docker host

* fix: preserve dependency ownership and native cache maintenance

* fix: drain dependency readiness failures through the shared task barrier

* test: align server recovery expectations with source scan recovery

* fix: retain released dependency providers during publication recovery

* Keep route verification and bound parallel deployment work safely

* Send scoped cancellation confirmations through the customer email queue

* Offer help without treating one canceled subscription as account churn

* Invite cancellation feedback and offer direct support

* Preserve native Docker dependency cache across source changes

* Keep runtime dependencies ahead of changing API source

* Split independent Docker regression suites across CI jobs

* Use fresh connections for routing configuration probes

* Show published deployments while final startup verification runs

* Complete verification translations and align test types
2026-11-09 13:51:19 +02:00
Hydra de lerne
ac1e79fa24
feat: unify Plans & billing and standardize Referral (#1680)
* feat(billing): unify plan management and referral navigation

* docs(billing): describe plan management and align summary assertions

* test(billing): align named plan and accessible summary assertions
2026-11-08 22:30:29 +02:00
Hydra de lerne
9d318fb3c5
fix(cloud): preserve owned imported mounts and explain blocked host paths (#1659)
* fix(cloud): explain denied host volume mounts

* fix(cloud): preserve owned imported project storage
2026-11-08 22:30:23 +02:00
Cem
0ac9bcbf72
fix(security): distinguish absent runtimes from failed probes (#1677) 2026-11-08 21:18:33 +02:00
Hydra de lerne
ef893be5da
feat(cloud): use the BytesMap SDK for unified telemetry and remove PostHog (#1642)
* feat(cloud): unify telemetry through the BytesMap SDK and remove PostHog

* fix(telemetry): derive HTTP span failures from final responses
2026-11-08 00:55:06 +02:00
Hydra de lerne
7b25257f22
fix(projects): reject blank required build commands when saving settings (#1658)
* fix(projects): reject blank required build commands when saving settings

* fix(projects): validate commands against enabled service recipes

* fix(projects): validate the incoming monorepo command ownership
2026-11-07 23:11:29 +02:00
Hydra de lerne
d3436dbdac
fix(security): patch managed runtime versions instead of refreshing old images (#1657)
* fix(security): apply reviewed patches to managed runtimes

* fix(security): refuse Bun runtime patches that downgrade repository requirements

* fix(migration): parse coalesced Cloud rsync progress

* refactor(build): share package-manager version overrides

* fix(migration): read raw rsync byte counters across versions
2026-11-07 22:15:37 +02:00
Rudi
3d8ff5bbc7
feat(servers): configure build-cache budgets and fix migration progress (#1645)
* fix(build): scale the managed build-cache budget with the disk

The managed project-cache budget was min(5 GiB, 10% of the Docker
filesystem). A project whose BuildKit cache outgrew 5 GiB was evicted by
the post-build prune after every build, so every deploy started cold.

- buildCacheKeepBytes is now 20% of the Docker filesystem, so the budget
  follows the disk in both directions: disks under 50 GiB also move from
  10% to 20%. This also applies to managed Cloud workers, which share
  the collector.
- Below the 20% free-space GC target the idle budget shrinks to what
  still fits above it (never below the old min(5 GiB, 10%)), so idle
  caches give space back before rollback artifacts and running apps.
  BuildKit's own 20% minFreeSpace still bounds a running worker.
- pruneManagedBuildCaches defaults to that budget instead of 5 GiB.
- The daily sweep marks its call as automaticRetention, so managed caches
  use the same budget; keepStorageBytes still bounds native Docker cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(servers): configurable build-cache budget per server

Adds an optional managed build-cache budget for remote deployment
servers, edited from a Build cache card on the server Overview tab and
through the existing server update API, CLI and MCP tool. Empty keeps the
automatic share of the Docker filesystem.

- servers.build_cache_budget_bytes (migration 0224), bounded 1 GiB to
  64 TiB in the database and the API contract.
- Only remote deployment servers expose and accept it: the local row
  builds through the host daemon's native cache and migration sources
  never build, so updates there are refused; managed Cloud servers keep
  rejecting every field except name. Changing it requires server admin,
  since a large budget lets caches hold most of the disk.
- SSH Docker runtimes read the value through a new buildCacheBudgetBytes
  connection option on every collection, so a change applies to the next
  build without reconnecting. It sets the post-build prune budget,
  BuildKit's maxUsedSpace and the daily sweep's managed budget, capped at
  the filesystem minus the admission reserve and still reduced under
  storage pressure; a failed read falls back to automatic.
- Updates are audited like gpuOverride and do not drop retained SSH
  sessions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: regenerate the MCP and CLI references for the build-cache budget

The server update tool description and the `server configure` help now
mention the build-cache budget, so the generated references changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(migration): frame streamed rsync progress updates

* fix(migration): preserve exact progress with rsync byte units

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-07 20:23:30 +02:00
Hydra de lerne
1caff219ec
fix(updates): clarify conditional security advisories and actions (#1606)
* fix(updates): make manual security advisories actionable

* fix(updates): classify conditional advisories as unverified reviews

* fix(updates): retain service state in grouped advisory reviews
2026-11-06 20:05:08 +02:00
Hydra de lerne
86006cebfa
fix(analytics): wait for the first active deployment before reading traffic (#1640) 2026-11-06 19:17:17 +02:00
Muhammad Asad Khan
83dd189113
fix(runtime): report structured environment apply failures safely (#1616)
* fix(services): say why an environment apply did not start

A failed environment apply only said the service did not start. Name the
cause from the replacement container's state: its exit code, restart
count, out-of-memory kill, Docker error or failed health check.

Refs #1613

* fix(runtime): redact environment values from apply failure diagnostics

* test(runtime): keep diagnostics regressions separate from command apply tests

* fix(runtime): redact command-only and escaped credentials during env apply

* fix(diagnostics): bound literal redaction and preserve structured startup reasons

* refactor(runtime): share deployment stability checks with environment apply

* fix(diagnostics): share redaction without hiding credential syntax

* fix(diagnostics): keep raw task and notification errors out of reports

* refactor(diagnostics): prefer structured provider failure summaries

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 18:04:09 +02:00
Saim Shafique
b72c7922b9
fix(compose): refresh command templates on deployment and environment apply (#1619)
* fix(compose): re-resolve ${VAR} command placeholders at deploy time

* fix(compose): resolve command templates consistently across edits and env apply

* fix(compose): retain internal file defaults for command interpolation

* refactor(compose): share source ownership and command interpolation

* refactor(compose): reuse canonical equality for source ownership

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 17:12:35 +02:00
Saim Shafique
9dd4bb4e79
fix(auth): preserve the Desktop installation identity across updates (#1617)
* fix(auth): keep the signed-in user when the desktop bootstrap mints a session

After an auto-update wipes the browser cookie store, GET /api/auth/get-session
falls through to the zero-auth bootstrap, which minted a fresh session for the
Local User even when the operator's own sessions were still valid. The app
then landed on an empty Local workspace with no way back to the real one.

The bootstrap now mints for the owner of the most recently created unexpired
session when one belongs to another user, and falls back to the Local User
exactly as before when there is none.

Fixes #1612

Co-authored-by: Saim Shafique <128062316+sx4im@users.noreply.github.com>

* fix(auth): persist the authenticated Desktop installation identity

* fix(auth): preserve verified Desktop sessions during bootstrap

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 17:11:58 +02:00
Saim Shafique
a22de88cb5
fix(github): resolve server credentials safely for repository scans (#1632)
* fix(github): fall back to a writable connected server's stored credential when no local server exists

Repository preparation borrowed a server's stored GitHub credential only
from the organization's canonical local server. Self-hosted setups whose
deploy target is a connected SSH server with its own stored PAT could
deploy but not scan the same private repo: with no server selected, the
fallback found no local server and preparation failed with
GITHUB_TOKEN_REQUIRED.

When no server is selected and the organization has no local server, use
the oldest connected deployment server the caller has write access to
that holds a stored token credential, the same set a real deploy can use.
Repository access, same-organization, server write permission, and
read-only local-read limits are unchanged. Explicit server selection is
unchanged.

Fixes #1630

* fix(github): require server selection for ambiguous repository credentials

* fix(dashboard): keep repository recovery server selection manual

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 15:59:57 +02:00
Johannes Rueschel
61b428f44c
feat(mail): manage Fail2ban bans from Health, API and MCP (#1621)
* feat(mail): expose fail2ban status, ban and unban via API and MCP

* feat(mail): manage Fail2ban bans from the existing Health tab

* fix(mail): preserve exact IP display in RTL ban reviews

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 11:19:28 +02:00
fatih akyon
3e42fc6614
fix(routing): make static 404 responses opt-in (#1626)
* fix(edge): serve a static site's 404.html for missing paths

* fix(routing): make static SPA fallback explicit and preserve defaults

* test(routing): update static fallback checks and run HTTP coverage

* fix(i18n): complete inbound alias guidance across locales

* test(monitoring): isolate the session in stream fixtures

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 10:36:34 +02:00
Saim Shafique
3fb7bb68fe
fix(deploy): read loopback port inventory through the edge connection (#1627)
* fix(deploy): keep loopback-port deploys working without a host channel

On a raw compose install with no host channel, every deploy failed after
the image build with "Cannot read Openship edge routes: neither Docker nor
bare OpenResty inventory is available", even though the deploy log says
host-side edge/routing steps are skipped. The loopback-port preflights read
the strict edge inventory through the demoted host executor, which refuses
every call.

Fixes #1625

When the host executor is one we demoted for having no usable channel, the
preflights now get an inventory they can read — an empty one — so
allocation rests on durable claims alone, exactly like the unscanned
live-port pick. A real conflict still fails loudly at the Docker bind.
Covers both the compose deploy preflight and the single-container
preflight (plus its port-conflict alternative path). The route-apply
safety gate is untouched: refusing a loopback route on an unreadable edge
stays deliberate there.

Test: new case in compose-host-channel-notice drives a loopback-port
compose deploy with the real demoted executor and asserts the edge proxy
handed to the preflight resolves to an empty inventory; it failed with
the reported error before this change and passes after.

* fix(deploy): inventory socket edge routes before allocating ports

* test(deploy): share edge inventory fixtures across allocation paths

* test(routing): resolve inventory from the simulated edge config

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 09:46:58 +02:00
Hydra de lerne
132f59cbdb
fix(billing): preserve purchase scope across hosted checkout returns (#1628) 2026-11-05 23:18:49 +02:00
Hydra de lerne
f24d89b7ab
fix(security): enforce Cloud host execution boundaries (#1615)
* fix(security): refuse workload execution on the Cloud API host

* fix(security): preserve safe Cloud transport probes and narrow hardening scope

* test(dashboard): isolate network editor session lifecycle
2026-11-05 18:20:43 +02:00
Hydra de lerne
8c76cf8f22
fix(migration): finish parked imports without touching originals (#1608) 2026-11-04 19:15:05 +02:00
Hydra de lerne
ee6f86623e
fix: verify advisory remediation and complete Appwrite setup (#1601) 2026-11-04 14:11:56 +02:00
Hydra de lerne
2250f91684
fix(assistant): use Codex device login on remote hosts (#1600)
* fix(assistant): select Codex sign-in for the assistant host

* fix(assistant): consume released Mindwire 0.1.61
2026-11-04 13:20:37 +02:00
Hydra de lerne
7a5f2ec8fb
fix(routing): enable canonical redirects for Compose services (#1457)
* fix(routing): share canonical domain controls with Compose services

* test(backups): identify the mail size-history fixture correctly

* fix(routing): keep service redirect updates consistent

* test(routing): cover redirect validation at build admission
2026-11-04 05:15:51 +02:00
Hydra de lerne
cbdbaa9051
fix(actions): verify PR merge revisions and publish checks on head (#1595) 2026-11-04 04:59:51 +02:00
Hydra de lerne
ae6edd774c
feat(mail): add optional calendar and contact sync (#1596) 2026-11-04 04:56:28 +02:00
Johannes Rueschel
d0249abac8
fix(deploy): preserve stored image-only compose services when localPath is unreadable (#1584)
Co-authored-by: chbndrhnns <7534547+chbndrhnns@users.noreply.github.com>
2026-11-04 02:14:04 +02:00
Hydra de lerne
0e6eb168bf
fix(mail): use configured senders for Cloud customer emails (#1580) 2026-11-04 02:13:29 +02:00
Hydra
a5c15f8901 test(security): align local source fixtures with instance authority 2026-11-03 20:30:12 +02:00
Hydra de lerne
e661bf924a
feat(mail): welcome Cloud customers and send invoice notices (#1578) 2026-11-03 20:09:42 +02:00
Hydra de lerne
9ab270c95c
feat(updates): add scoped host patches and observable advisory scans (#1566)
* feat(updates): allow workspace admins to pause runtime advisory checks

* fix(updates): repair upgrade fixture and reuse shared policy guards

* feat(updates): add scoped host patches and observable advisory scans

* fix(updates): report handled host maintenance failures

* fix(updates): load host advisory operations on demand

* refactor(updates): share server patch run lifecycle and logs

* test(cli): align compose sync with namespace isolation

* test(mail): exercise support delivery over verified TLS
2026-11-03 19:37:18 +02:00
Hydra de lerne
1d0cb17d86
fix(compose): review source changes before redeploy and retire removed services safely (#1574) 2026-11-03 17:09:48 +02:00