Skip to content

ci: merge pull requests directly into main and retire dev - #21

Merged
BryanLawless merged 9 commits into
mainfrom
ci/merge-directly-into-main
Nov 5, 2026
Merged

BryanLawless merged 9 commits into
mainfrom
ci/merge-directly-into-main

Conversation

@BryanLawless

Copy link
Copy Markdown
Contributor

Summary

Moves the repository to trunk-based development: every pull request is squash-merged directly into main, and the dev branch is retired. Each commit on main becomes one described change (Conventional Commits title from the PR, body from the PR description) instead of a promote dev to main or merge main into dev merge.

  • main.yml now does what dev.yml did: on push to main it runs CI, then publishes images for the changed apps and runs release-please (and the release when one is cut). Pushes that only change deploy/apps/production/** (Flux's digest pins) are ignored so they neither rerun CI nor rebuild images.
  • Flux image automation checks out and pushes main; its pin commits still list every changed image. image.sh publishes only commits on origin/main.
  • .github/rulesets/main.json allows squash merges only and lets the snapflowio-automation App push the pin commits; dev.json, dev.yml and sync-dev.yml are deleted.
  • CI passed no longer restricts which branches may open a pull request into main; CI, CodeQL, the security audit and the isolation suite target main only.
  • Renovate, the pull request template, the moon task description and CONTRIBUTING follow the new flow. Rollback is a revert pull request; pinning older digests by hand requires suspending image automation first.

After this reaches main (with the final promotion, #18), the GitHub side is: import the new main ruleset, delete the dev ruleset, allow only squash merging with the PR title and description as the commit message, and delete the dev branch.

Testing

  • actionlint passes; zizmor (--persona regular --min-severity medium, as in CI) reports no findings.
  • deploy/scripts/validate.sh passes helm lint and kubeconform for every stage including deploy/images.
  • Both ruleset files parse; no reference to the dev branch remains.

snapflowio-automation Bot and others added 8 commits November 4, 2026 19:27
Brings chore(release): start versioning at 0.1.0 (#12) back to dev.
## Summary

Operator secrets are now managed in OpenBao's web UI instead of
gitignored env files pushed by a script.

- `moon run deploy:openbao` forwards OpenBao to `localhost:18200`, logs
in through Kubernetes auth as a new `snapflow-operator` role and prints
a one-hour token to sign in with. OpenBao stays cluster-internal; the UI
is never routed through Traefik.
- The `snapflow-operator` policy (written by the configure job) can
create, edit, roll back and delete only the operator secrets:
`snapflow/api`, `alerts`, `backups`, `cloudflare-dns` and `edges/*`. It
cannot read the keyrings and platform credentials the job generates,
write any other path, or change OpenBao itself. The old shell used the
far broader `snapflow-configure` role.
- Closing the session (Ctrl-C) annotates every ExternalSecret with
`force-sync`, so edits reach the cluster at once instead of at the
hourly refresh, as the push did.
- `ui = true` in the OpenBao server config.
- Removed: `deploy:secrets`, `push-secrets.sh`, `openbao-shell.sh` and
`lib/openbao-session.sh`. `docs/deployment.md` describes the UI
workflow.

The `/deploy/secrets/production/` gitignore entry stays until the
operator has moved its existing local values into OpenBao and deleted
the folder, so those files can never be committed by accident.

## Testing

- Against a throwaway OpenBao 2.7.1 (the pinned image) with the policy
generated exactly as `configure.sh` writes it, an operator token could
create, update, read, roll back and delete `snapflow/api` and
`snapflow/edges/home`, and list `snapflow/` and `snapflow/edges/`; it
was denied reading or writing `snapflow/api/encryption-keyring` and
`snapflow/platform/redis`, writing other paths, writing policies and
listing mounts.
- `deploy/scripts/validate.sh` passes for every stage; shellcheck is
clean on the new and changed scripts.
… access (#15)

Dynamic DNS: favonia/cloudflare-ddns keeps the public site, registry and storage records on the home connection's current IPv4 address, in the infrastructure-configs stage so it runs before the platform and apps. It reuses the cert-manager DNS token and reports failures to the alerts channel; that stage now takes the shared cluster settings.

Host firewall: deploy/bootstrap/host-firewall.sh applies the server's whole UFW configuration declaratively: public edge and Traefik ports, SSH and the k3s API from the administrative network only, and the k3s pod and service networks. It lists every port Docker or Kubernetes exposes past UFW.

Database access: CloudNativePG manages a snapflow_readonly role in pg_read_all_data, with a password generated in OpenBao that the operator can read in the UI.
The api's env-docs command becomes env-file and only lays out the local apps/api/.env; its CI check is gone. Runbook content now lives in the files it describes: cluster-settings.env, bootstrap-flux.sh, install-k3s.sh, the backup manifests, notifications.yaml, postgres.yaml, the deploy:openbao output, the TUF trust root README and the README.
Removes unused configuration, the tsx dependency, pnpm entries for packages no longer installed, unused API helpers and environment registry fields, and dead microVM runtime code: the never-applied WithVolumeBlockStore and WithGPUManager options, the unwired fork-from-snapshot-record path, and four uncalled methods. GPU passthrough, volumes and standby pause, restore and fork behave as before.
The api image runs scripts/download-geoip-database.sh directly; it lost its executable mode in #16, so the image build failed with permission denied.
The api Dockerfile copies scripts/download-geoip-database.sh, but the image path filter did not list it, so a change to it never rebuilt the image.
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 108 files, which is 8 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 04c775ab-e9ca-4d76-9241-38ee6f20423c
Commits

Reviewing files that changed from the base of the PR and between 7e19ef9 and b12a4eb.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 108

  • .devcontainer/Dockerfile
  • .devcontainer/devcontainer.json
  • .devcontainer/docker-compose.yml
  • .dockerignore
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/filters/ci.yml
  • .github/filters/images.yml
  • .github/renovate.json5
  • .github/rulesets/dev.json
  • .github/rulesets/main.json
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/dev.yml
  • .github/workflows/images.yml
  • .github/workflows/isolation.yml
  • .github/workflows/main.yml
  • .github/workflows/release.yml
  • .github/workflows/security-audit.yml
  • .github/workflows/sync-dev.yml
  • .gitignore
  • .moon/tasks/deployable.yml
  • .vscode/settings.json
  • CONTRIBUTING.md
  • README.md
  • apps/api/moon.yml
  • apps/api/package.json
  • apps/api/src/cli/cli.module.ts
  • apps/api/src/cli/commands/env-docs.command.ts
  • apps/api/src/cli/commands/env-file.command.ts
  • apps/api/src/common/utils/api-key.util.ts
  • apps/api/src/common/utils/concurrency/sequential-async.util.ts
  • apps/api/src/common/utils/fixed-point.util.ts
  • apps/api/src/config/environment/namespaces/authentication.environment.ts
  • apps/api/src/config/environment/namespaces/cloudflare.environment.ts
  • apps/api/src/config/environment/namespaces/database.environment.ts
  • apps/api/src/config/environment/namespaces/development.environment.ts
  • apps/api/src/config/environment/namespaces/email.environment.ts
  • apps/api/src/config/environment/namespaces/geo-ip.environment.ts
  • apps/api/src/config/environment/namespaces/network.environment.ts
  • apps/api/src/config/environment/namespaces/observability.environment.ts
  • apps/api/src/config/environment/namespaces/process.environment.ts
  • apps/api/src/config/environment/namespaces/public-urls.environment.ts
  • apps/api/src/config/environment/namespaces/redis.environment.ts
  • apps/api/src/config/environment/namespaces/snapshot-manager.environment.ts
  • apps/api/src/config/environment/namespaces/social-sign-in.environment.ts
  • apps/api/src/config/environment/namespaces/storage.environment.ts
  • apps/api/src/config/environment/namespaces/stripe.environment.ts
  • apps/api/src/config/environment/namespaces/vault.environment.ts
  • apps/api/src/config/environment/registry.environment.ts
  • apps/api/src/config/environment/utils/environment-docs.util.ts
  • apps/api/src/config/environment/utils/environment-file.util.ts
  • apps/api/src/config/environment/utils/environment-variable.util.ts
  • apps/api/src/generate-openapi.ts
  • apps/api/src/payments/funds/constants/stripe.constants.ts
  • apps/edge/internal/edge/edgetest/tunnels.go
  • apps/guest/.gitignore
  • apps/marketing/Dockerfile
  • apps/snapflow/internal/sshgateway/service.go
  • apps/snapflow/internal/tuf/trust/README.md
  • biome.json
  • deploy/apps/production/kustomization.yaml
  • deploy/bootstrap/host-firewall.sh
  • deploy/bootstrap/install-k3s.sh
  • deploy/charts/snapflow/ci/production-values.yaml
  • deploy/clusters/production/cluster-settings.env
  • deploy/clusters/production/stages.yaml
  • deploy/images/images.yaml
  • deploy/infrastructure/configs/cloudflare-ddns.yaml
  • deploy/infrastructure/configs/kustomization.yaml
  • deploy/infrastructure/configs/notifications.yaml
  • deploy/infrastructure/controllers/openbao.yaml
  • deploy/moon.yml
  • deploy/platform/backups/k3s.yaml
  • deploy/platform/backups/openbao.yaml
  • deploy/platform/backups/rustfs.yaml
  • deploy/platform/data/postgres-backups.yaml
  • deploy/platform/data/postgres.yaml
  • deploy/platform/data/secrets.yaml
  • deploy/platform/openbao-configure/configure.sh
  • deploy/platform/openbao-configure/kustomization.yaml
  • deploy/platform/openbao-configure/operator.yaml
  • deploy/scripts/bootstrap-flux.sh
  • deploy/scripts/image.sh
  • deploy/scripts/lib/openbao-session.sh
  • deploy/scripts/openbao-shell.sh
  • deploy/scripts/openbao-ui.sh
  • deploy/scripts/push-secrets.sh
  • deploy/scripts/validate.sh
  • docs/deployment.md
  • docs/hosting.md
  • docs/reference/api-environment.md
  • docs/releases.md
  • libs/microvm-go/imagecache/platform.go
  • libs/microvm-go/internal/lifecycle/coordinator.go
  • libs/microvm-go/internal/runtime/backend.go
  • libs/microvm-go/internal/runtime/fork.go
  • libs/microvm-go/internal/runtime/fork_source.go
  • libs/microvm-go/internal/runtime/fork_test.go
  • libs/microvm-go/internal/runtime/snapshot_secret_policy_test.go
  • libs/microvm-go/internal/snapshot/payload.go
  • libs/microvm-go/internal/snapshot/store.go
  • libs/microvm-go/internal/snapshot/types.go
  • libs/microvm-go/microvm.go
  • libs/microvm-go/types/requests.go
  • package.json
  • pnpm-workspace.yaml
  • scripts/cleanup.sh
  • scripts/download-geoip-database.sh

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added documentation Improvements or additions to documentation github-actions labels Nov 5, 2026
@BryanLawless
BryanLawless changed the base branch from dev to main November 5, 2026 07:00
Every pull request is now squash-merged into main, so each commit on main
is one described change instead of a promotion or sync merge. Pushes to
main run CI, publish the changed images and run release-please; Flux image
automation pins the new digests on main (its pin commits skip CI). The dev
workflow, sync-dev and the dev ruleset are removed, the main ruleset allows
squash merges only with the automation App allowed to push pins, and CI no
longer restricts which branches may target main. Renovate, the PR template,
image.sh and CONTRIBUTING follow the new flow.
@BryanLawless
BryanLawless force-pushed the ci/merge-directly-into-main branch from d655c74 to b12a4eb Compare November 5, 2026 07:01
@BryanLawless
BryanLawless merged commit 5c16a96 into main Nov 5, 2026
17 checks passed
@BryanLawless
BryanLawless deleted the ci/merge-directly-into-main branch November 5, 2026 07:04
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