refactor/tighten-architecture #26

Merged
GKaszewski merged 104 commits from refactor/tighten-architecture into master 2026-10-26 09:36:27 +00:00
4 changed files with 20 additions and 4 deletions
Showing only changes of commit b76f5996da - Show all commits

View File

@@ -47,4 +47,4 @@ jobs:
# Layering guards. These live in the Makefile and were previously local-only, # Layering guards. These live in the Makefile and were previously local-only,
# so a PR could go green in CI while violating them. # so a PR could go green in CI while violating them.
- name: guards - name: guards
run: make check-appcontext check-handler-deps check-handler-repos check-http-adapter-deps check-federation-off-social check-binaries-are-thin check-sqlite-is-ap-free run: make check-appcontext check-handler-deps check-handler-repos check-http-adapter-deps check-federation-off-social check-sqlite-is-ap-free check-binaries-are-thin check-dockerfile-manifests

View File

@@ -47,7 +47,7 @@ jobs:
# Layering guards. These live in the Makefile and were previously local-only, # Layering guards. These live in the Makefile and were previously local-only,
# so a PR could go green in CI while violating them. # so a PR could go green in CI while violating them.
- name: guards - name: guards
run: make check-appcontext check-handler-deps check-handler-repos check-http-adapter-deps check-federation-off-social check-binaries-are-thin check-sqlite-is-ap-free run: make check-appcontext check-handler-deps check-handler-repos check-http-adapter-deps check-federation-off-social check-sqlite-is-ap-free check-binaries-are-thin check-dockerfile-manifests
docker: docker:
name: Build & Push Docker Image name: Build & Push Docker Image

View File

@@ -1,6 +1,6 @@
.DEFAULT_GOAL := check .DEFAULT_GOAL := check
check: fmt-check clippy test test-federation-off check-appcontext check-handler-deps check-handler-repos check-http-adapter-deps check-federation-off-social check-binaries-are-thin check-sqlite-is-ap-free check: fmt-check clippy test test-federation-off check-appcontext check-handler-deps check-handler-repos check-http-adapter-deps check-federation-off-social check-sqlite-is-ap-free check-binaries-are-thin check-dockerfile-manifests
@echo "✅ All checks passed" @echo "✅ All checks passed"
check-appcontext: check-appcontext:
@@ -87,6 +87,22 @@ check-sqlite-is-ap-free:
fi fi
@echo "✅ sqlite crate depends on no k-ap, activitypub, or *-federation crate" @echo "✅ sqlite crate depends on no k-ap, activitypub, or *-federation crate"
check-dockerfile-manifests:
@members=$$(awk '/^members = \[/{f=1;next} f&&/^\]/{f=0} f' Cargo.toml | sed -n 's/^[[:space:]]*"\(.*\)",\{0,1\}[[:space:]]*$$/\1/p'); \
copied=$$(sed -n 's/^COPY \([^[:space:]]*\)\/Cargo\.toml[[:space:]].*/\1/p' Dockerfile | grep -v '^\(Cargo\.toml\|\.\)$$' || true); \
bad=""; \
for m in $$members; do \
echo "$$copied" | grep -qx "$$m" || bad="$$bad missing-COPY:$$m"; \
done; \
for c in $$copied; do \
echo "$$members" | grep -qx "$$c" || bad="$$bad not-a-member:$$c"; \
done; \
if [ -n "$$bad" ]; then \
echo "❌ Dockerfile manifest COPY lines out of sync with workspace members:$$bad"; \
exit 1; \
fi; \
echo "✅ Dockerfile copies a manifest for every workspace member"
fmt: fmt:
cargo fmt cargo fmt
@@ -129,4 +145,4 @@ dev-spa:
spa-dev: spa-dev:
@npm --prefix spa run dev @npm --prefix spa run dev
.PHONY: check fmt fmt-check clippy test test-federation-off fix dev dev-stop dev-worker dev-spa spa-dev check-appcontext check-handler-deps check-handler-repos check-http-adapter-deps check-federation-off-social check-binaries-are-thin check-sqlite-is-ap-free .PHONY: check fmt fmt-check clippy test test-federation-off fix dev dev-stop dev-worker dev-spa spa-dev check-appcontext check-handler-deps check-handler-repos check-http-adapter-deps check-federation-off-social check-sqlite-is-ap-free check-binaries-are-thin check-dockerfile-manifests