mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
f84ba243a1
chore(ci): guard against committed planning docs; remove re-added ones PR #4771 removed the docs/superpowers planning-doc archive and added a rule, but #4765 force-added two more (git add -f bypasses .gitignore): docs/superpowers/plans/2026-07-12-observability-single-writer.md and docs/superpowers/specs/2026-07-12-observability-single-writer-design.md — an agentic implementation plan and its design spec. Delete both. Close the enforcement gap so this cannot recur: - New scripts/check_no_planning_docs.sh fails if anything is tracked under docs/superpowers/, regardless of how it was added. - Wire it into make pre-commit/pre-pr/dev-check. - Run it in CI: ci.yml for code/mixed PRs, and ci-docs-only.yml (which was a green stub) so docs-only PRs can no longer slip a planning doc past the required 'Test and Lint' check. - Document the guard in AGENTS.md and the arch-checks skill.
32 lines
1.6 KiB
Makefile
32 lines
1.6 KiB
Makefile
## —— Pre Commit Checks ----------------------------------------------------------------------------
|
|
|
|
.NOTPARALLEL: pre-commit pre-pr dev-check
|
|
|
|
.PHONY: setup-hooks
|
|
setup-hooks: ## Set up git hooks
|
|
@echo "🔧 Setting up git hooks..."
|
|
chmod +x .git/hooks/pre-commit
|
|
@echo "✅ Git hooks setup complete!"
|
|
|
|
.PHONY: doc-paths-check
|
|
doc-paths-check: ## Check that instruction/architecture docs reference existing file paths
|
|
@echo "📄 Checking doc path references..."
|
|
./scripts/check_doc_paths.sh
|
|
|
|
.PHONY: planning-docs-check
|
|
planning-docs-check: ## Check that no planning-type documents are committed
|
|
@echo "📄 Checking for committed planning docs..."
|
|
./scripts/check_no_planning_docs.sh
|
|
|
|
.PHONY: pre-commit
|
|
pre-commit: fmt-check unsafe-code-check architecture-migration-check logging-guardrails-check tokio-io-uring-check extension-schema-check body-cache-whitelist-check doc-paths-check planning-docs-check quick-check ## Run fast pre-commit checks without clippy/full tests
|
|
@echo "✅ All pre-commit checks passed!"
|
|
|
|
.PHONY: pre-pr
|
|
pre-pr: fmt-check unsafe-code-check architecture-migration-check logging-guardrails-check tokio-io-uring-check extension-schema-check body-cache-whitelist-check doc-paths-check planning-docs-check clippy-check test ## Run full pre-PR checks with clippy and tests
|
|
@echo "✅ All pre-PR checks passed!"
|
|
|
|
.PHONY: dev-check
|
|
dev-check: fmt-check unsafe-code-check architecture-migration-check logging-guardrails-check tokio-io-uring-check extension-schema-check body-cache-whitelist-check doc-paths-check planning-docs-check quick-check ## Run fast local development checks
|
|
@echo "✅ Fast development checks passed!"
|