Skip to content

chore(repo): remove the dead self-host Docker path, fix CI path filters and repo scripts - #2446

Merged
Makisuo merged 19 commits into
fix/audit-frontend-fixesfrom
chore/audit-selfhost-ci
Nov 10, 2026
Merged

Makisuo merged 19 commits into
fix/audit-frontend-fixesfrom
chore/audit-selfhost-ci

Conversation

@Makisuo

@Makisuo Makisuo commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #2445. Part of the audit stack that starts at #2434.

The self-host Docker Compose stack is removed

It could not start, and has not been able to since the API became a Worker: apps/api/Dockerfile ran a start script that does not exist, apps/alerting/Dockerfile was missing, the ingest service used the wrong build context, and two services waited on the API healthcheck. This removes the dead path instead of repairing it:

  • docker-compose.yml keeps postgres and electric, which bun db:up starts.
  • Deleted: apps/api/Dockerfile, apps/web/Dockerfile, apps/web/nginx.conf, the root docker:build and docker:up scripts, and the README "Docker (Local)" section.
  • Untouched: the ingest and scraper Dockerfiles, otel/, and the development compose file. The deploy and local dev use them.

If anyone still relies on docker compose up for self-hosting, this is the PR to stop.

CI

  • The ts path filter was always true. The filter action ORs its patterns, so '!apps/ingest/**' matched every file outside that path. Every change, including docs-only ones, ran the TypeScript and test jobs. It is now a positive pattern, apps/!(ingest|ios)/**. Docs-only and otel/-only PRs will skip those jobs for the first time, so the paths the jobs read but the filter never listed were added: knip.json, bunfig.toml, patches/**, the generated ClickHouse insert mappings, every app's alchemy.run.ts and ingest's package.json. The pattern excludes by prefix, so a future app named ingest* or ios* needs its own line.
  • The cli filter missed most of its dependency closure. apps/cli and apps/local-ui depend on 21 packages and 6 libs; the filter listed 9. A change to, say, packages/web-data skipped the only job that builds the native bundle. It now lists packages/** and lib/**.
  • shellcheck covered a hand-kept list. It now lints the same globs the shell filter triggers on, which adds eight scripts. One real finding in a chart publish script is fixed.

Scripts

  • install.sh copied over a running binary, which fails with "Text file busy" on Linux. It stages beside the target and renames, as the updater does.
  • build-local-binary.sh only worked from the repo root. uninstall.sh now names everything it leaves behind.
  • Two superseded scripts with no reference anywhere are deleted.

Smaller

  • The iOS OpenAPI allowlist drops two operations no Swift file calls. The spec is regenerated, and the copy of the list in the domain test is updated to match.
  • packages/email listed two runtime imports as dev dependencies. The landing app drops an unused dependency, and its starter-template README is replaced.
  • README and CONTRIBUTING: the persistence section, the triage model paragraph and a few stale commands are corrected.

Verification

  • shellcheck is clean on the new globs. The old and new install.sh were run against a fake bundle: the old one keeps the inode (in-place overwrite), the new one swaps it.
  • The old filter patterns were run through the matcher the action uses: README.md, docs/infra.md and apps/ingest/src/main.rs all matched. With the new pattern they do not, and every other app still does.
  • ios:openapi:check passes. The email tests (27) and the CLI test that reads install.sh (23) pass.
  • The workflow changes could not be run locally. This PR's own CI run exercised them and is green.

Left for a decision

  • apps/cli/test/native-maintenance-sigint-probe.sh is run by nothing. It is linted now; wiring it into the native checkpoint job is a separate call.
  • Two collector builds (otel/ and deploy/k8s-infra/) have drifted, and otel/railway.json may be unused.
  • The landing app loads four inlang modules at @latest.

…rs and repo scripts

Docker
- docker-compose.yml keeps only postgres and electric (what `bun db:up` starts).
  The api, web, ingest, alerting, scraper and otel-collector services could not
  start: the API is a Worker with no `start` script, apps/alerting has no
  Dockerfile, and the ingest build context was wrong.
- Delete apps/api/Dockerfile, apps/web/Dockerfile and apps/web/nginx.conf, and the
  root `docker:build` / `docker:up` scripts. Drop the README "Docker (Local)" section.

Docs
- README and CONTRIBUTING no longer describe an embedded PGlite path for local
  entrypoints (nothing implements it). PR previews are described as Neon branches.
- CONTRIBUTING: chat and triage run in apps/ai; the model overrides are
  MAPLE_TRIAGE_MODEL_OPENROUTER and MAPLE_TRIAGE_MODEL_WORKERS_AI.
- apps/ios/README.md: five tabs, and the push code lives in packages/backend.
- apps/landing/README.md replaces the Astro starter template.

CI
- `ts` filter: patterns are OR-ed, so the negated '!apps/ingest/**' and
  '!apps/ios/**' matched every file outside those paths and the filter was always
  true. Use the positive extglob 'apps/!(ingest|ios)/**' instead, and list the
  root files the TypeScript jobs read (knip.json, bunfig.toml, patches/**, the
  generated ingest insert mappings).
- `cli` filter: the workspace closure of apps/cli and apps/local-ui is 21 packages
  and 6 libs, so list packages/** and lib/** whole, as `workers` does.
- shellcheck lints by the same globs as the `shell` filter instead of a hand-kept list.

Scripts
- install.sh stages the bundle beside the targets and renames it into place:
  `cp` over a running binary fails with "Text file busy" on Linux.
- uninstall.sh names everything it leaves under ~/.maple.
- build-local-binary.sh runs from the repo root, so it works from any directory.
- Delete package-charts.sh and bench-cold-queries.sh (no references).
- generate-ios-openapi.ts drops getSpan and getLog, which no Swift code calls;
  the spec is regenerated.

Dependencies
- apps/landing drops the unused direct @astrojs/markdown-satteri dependency and
  generate-og.mjs imports playwright from its own workspace.
- packages/email lists effect and @maple/strings as runtime dependencies.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: f06bb124-f674-448c-8a9b-3db8c5839033
Commits

Reviewing files that changed from the base of the PR and between 7f3f5b0 and 30b73be.

Files ignored due to path filters: 1

  • bun.lock is excluded by !**/*.lock
Files selected for processing: 24

  • .github/workflows/ci.yml
  • CONTRIBUTING.md
  • README.md
  • apps/api/Dockerfile
  • apps/ios/Packages/MapleAPI/Sources/MapleAPI/openapi.json
  • apps/ios/README.md
  • apps/landing/DESIGN.md
  • apps/landing/README.md
  • apps/landing/package.json
  • apps/landing/scripts/generate-og.mjs
  • apps/web/Dockerfile
  • apps/web/nginx.conf
  • docker-compose.yml
  • package.json
  • packages/domain/src/http/v2/openapi-ios.test.ts
  • packages/email/package.json
  • packages/email/src/template.ts
  • scripts/bench-cold-queries.sh
  • scripts/build-local-binary.sh
  • scripts/generate-ios-openapi.ts
  • scripts/install.sh
  • scripts/package-charts.sh
  • scripts/publish-maple-otel-chart.sh
  • scripts/uninstall.sh
  • 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

@maple-review-bot

This comment has been minimized.

@Makisuo
Makisuo added this pull request to stack #2450 November 10, 2026 03:23
@maple-review-bot

This comment has been minimized.

@maple-review-bot maple-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 inline note from Maple's review. The score and summary are in the review comment above.

Comment thread .github/workflows/ci.yml Resolved
@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

The positive app pattern drops apps/ingest whole, but its alchemy.run.ts is
typechecked by the alchemy program, and its package.json is a workspace
manifest the install reads.
@maple-review-bot

This comment has been minimized.

@Makisuo

Makisuo commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

On the two review findings:

  • F2 (the ts filter dropped apps/ingest/alchemy.run.ts) is fixed and resolved in its thread: apps/*/alchemy.run.ts and apps/ingest/package.json are in the filter.
  • F1 (the comment says the extglob excludes by prefix, the review says exact names): the comment is right for the matcher this action bundles. The pinned action depends on picomatch ^2.3.1. Run against picomatch 2.3.2, apps/!(ingest|ios)/** rejects apps/ingest/... and apps/ios/..., and also apps/ingestor/x.ts and apps/ios-widgets/x.ts, while matching apps/web/..., apps/api/... and apps/ai/.... picomatch 4.0.7 gives the same result. So the caveat in the comment stands: a future app whose name starts with ingest or ios needs its own line.

@maple-review-bot

This comment has been minimized.

@Makisuo

Makisuo commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

@maple-review-bot won't fix F1. The comment is correct for the matcher the pinned action bundles: against picomatch 2.3.2 and 4.0.7, apps/!(ingest|ios)/** also rejects apps/ingestor/x.ts and apps/ios-widgets/x.ts, so the pattern does exclude by prefix. F2 is fixed in a commit after c1faf2a: apps/*/alchemy.run.ts is in the ts filter.

@maple-review-bot

Copy link
Copy Markdown

Checked .github/workflows/ci.yml at f59d5f6 and the PR diff, plus the pinned action (dorny/paths-filter@ceb8a2b, v4.0.3) and the picomatch versions in bun.lock (4.0.7 and 2.3.2 under anymatch).

F1 — you're right, dismissing it. picomatch does not compile a negative extglob the way bash does. For !(ingest|ios) it emits a leading negative lookahead over the alternatives followed by a segment wildcard, i.e. roughly (?:(?!(?:ingest|ios))[^/]*?), so any segment that merely starts with ingest or ios fails the lookahead. That makes apps/!(ingest|ios)/** reject apps/ingestor/x.ts and apps/ios-widgets/x.ts, exactly as the comment at line 61 says. The "matches everything except the exact names" reading is bash extglob, not picomatch. I could not execute picomatch here (no node_modules and no network in the sandbox); if you ever want a hard check, bun -e "console.log(require('picomatch')('apps/!(ingest|ios)/**')('apps/ingestor/x.ts'))" on a machine with the lockfile installed settles it — it prints false.

F2 — confirmed fixed at head. Line 82 is - 'apps/*/alchemy.run.ts' and line 83 is - 'apps/ingest/package.json', landed in 6168670 ci: keep every app's alchemy entrypoint in the ts filter. No residual finding from me on the ts filter.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

The generator's allowlist lost them in this PR because no Swift file calls
them; the domain test keeps its own copy of the list and still expected them.
@Makisuo

Makisuo commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

A CI failure traced back to this PR and is fixed in the latest push: removing getSpan and getLog from the iOS OpenAPI allowlist left packages/domain/src/http/v2/openapi-ios.test.ts expecting them, because that test keeps its own copy of the list. The two entries are removed there too. The whole packages/domain suite passes locally (83 files, 1,456 tests) and ios:openapi:check is up to date. It surfaced on #2448 above, since that is where the domain lane first ran against it.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

maple-review-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 9/10 · safe to merge. CI-config and infra deletions only, no runtime path changed; the enlarged shellcheck globs could not be run in the sandbox.
no findings · tests partial −1 · risk medium

Removes the non-functional self-host Docker Compose path, turns the CI ts filter into a positive extglob covering the paths its jobs read, widens the cli and shell filters, and trims the iOS OpenAPI allowlist. No runtime code changes; safe to merge.

  • Self-host api/web/ingest/alerting/scraper/otel-collector compose services and both Dockerfiles deleted
  • ts filter is now a positive apps/!(ingest|ios)/** extglob with the read-but-unlisted paths added
  • cli filter lists packages/** and lib/**; shellcheck runs the shell filter's globs
  • iOS OpenAPI allowlist drops getSpan/getLog in the spec and the domain test

Before merge

  • Infra · Check every environment has what this config now expects · docker-compose.yml
  • Manual · Confirm no self-hoster still runs docker compose up at the repo root: the API, web, ingest and scraper services are gone.

30b73be · What was checked, coverage and telemetry details are on the Maple / review check. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@Makisuo
Makisuo merged commit d9f1982 into main Nov 10, 2026
47 checks passed
@maple-review-bot

Copy link
Copy Markdown

Merged with 2 steps from "Before merge" still open. If they are done, tick them on the review comment; if not, now is the time.

  • Infra · Check every environment has what this config now expects
  • Manual · Confirm no self-hoster still runs docker compose up at the repo root: the API, web, ingest and scraper services are gone.

@Makisuo
Makisuo deleted the chore/audit-selfhost-ci branch November 10, 2026 11:30
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