.PHONY: help install-deps-production pitr-drill standby-drill partition-maintenance antivirus-check architecture bootstrap check cpan-audit critic dead-letter-check evidence-archive-check evidence-live evidence-meta evidence-validate fresh-checkout install-deps install-deps-postgres homebrew-env mail-check mail-lifecycle-check preflight private-beta-checklist staging-drill staging-drill-attachments staging-host-verify stress-load stress-load-dry syntax perl-runtime system-perl test integration tidy # All targets use the selected Perl via script/gpforum-carton. # Selection and ABI validation are independent of the interpreter provider. # # bin/ holds the front door, bin/gpforum; script/ holds repository tooling. # No basename may exist in both directories. The rule is documented in # docs/ENTRYPOINTS.md and enforced by script/architecture-check. # The Makefile is the operator's front door for repository tasks, so it names # its own targets rather than requiring a read of the file. Every target whose # line carries a `## ` comment is listed. help: @printf 'GPForum repository tasks\n\n' @grep -hE '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ | sort \ | awk 'BEGIN {FS = ":.*?## "} {printf " \033[1m%-26s\033[0m %s\n", $$1, $$2}' @printf '\nOperational commands live in bin/; run `bin/gpforum` for those.\n' .PHONY: man man: ## Generate command man pages from their embedded POD and live usage script/gpforum-carton exec perl script/generate-man artifacts/man perl-runtime: ## Verify the selected Perl satisfies the runtime requirements script/gpforum-system-perl --preflight system-perl: perl-runtime ## Compatibility alias for perl-runtime homebrew-env: ## Check the Homebrew PostgreSQL tools this macOS host needs script/gpforum-homebrew-env --check syntax: ## Compile every Perl file script/gpforum-carton exec script/perl-syntax-check test: ## Run unit and controller contracts without PostgreSQL script/test unit .PHONY: test-clients test-browser test-all test-clients: ## Run JavaScript client contracts script/test clients test-browser: ## Run browser behavior against doubles and real PostgreSQL script/test browser test-all: ## Run every test tier; missing browser/database prerequisites fail script/test all # Each integration file starts its own socket-only cluster unless an explicit # DSN is supplied. The module runs in the test process, never in the harness. JOBS ?= 8 integration: ## Run PostgreSQL integration tests on temporary clusters (JOBS=8) script/gpforum-carton exec prove -l -j $(JOBS) -It/lib --exec 'perl -Ilib -It/lib -MGPForum::Test::TemporaryPostgres' -r t/integration .PHONY: benchmark-operations BENCHMARK_OUTPUT ?= artifacts/operations benchmark-operations: ## Diagnose HTTP and SQL operations across all PostgreSQL integration workflows script/gpforum-carton exec script/benchmark-operations --output "$(BENCHMARK_OUTPUT)" .PHONY: benchmark-http-complete HTTP_BENCHMARK_OUTPUT ?= artifacts/http-complete benchmark-http-complete: ## Benchmark real HTTP reads, authenticated writes and mixed load on disposable PostgreSQL script/gpforum-carton exec script/benchmark-http-complete --output "$(HTTP_BENCHMARK_OUTPUT)" # No --severity override. The profile declares `severity = brutal` and the # baseline in etc/ was recorded at that level, so passing --severity 5 here # meant `make check` compared a severity-5 run against a severity-1 baseline: # it could not catch a new violation below severity 5, and reported most of # the baseline as "not observed" every time. critic: ## Run Perl::Critic against the baseline ratchet (slow: ~10 min) script/perlcritic tidy: ## Check every file is perltidy-clean script/perltidy-check architecture: ## Run the architecture invariants script/architecture-check script/gpforum-carton exec script/architecture-policies check: perl-runtime syntax test test-clients critic tidy architecture ## Runtime, syntax, unit/client contracts, critic, tidy, architecture # The proof that the README is enough: clones the current commit into a # temporary directory and runs the quick start there, then every prerequisite # of `check`, timing each step. With GPFORUM_DATABASE_DSN set it also creates # and migrates a throwaway role and database, then runs `integration`. It # installs every dependency from MetaCPAN into the clone, so it needs the # network and takes a while; not part of `make check`. fresh-checkout: ## Prove a clean clone of HEAD passes make check from the README quick start (slow) script/fresh-checkout-check install-deps: ## Install locked runtime, test and develop dependencies in parallel with cpm script/bootstrap-deps install-deps-postgres: ## Install locked dependencies with cpm, including the postgres feature script/bootstrap-deps --postgres install-deps-production: ## Install production dependencies in parallel with cpm, without develop tools script/bootstrap-deps --postgres --production bootstrap: install-deps ## Install dependencies and prepare the checkout preflight: ## Report whether this host can run GPForum script/system-preflight # Optional operator drill; requires GPFORUM_DATABASE_DSN and pg_dump/pg_restore. # Not part of `make check` or default CI. staging-drill: ## Run the staging backup and restore drill bin/gpforum staging-drill --json # Optional HTTP stress/load harness against a running Hypnotoad/GPForum. # Not part of `make check` or default CI. PROFILE=smoke|100|500|1000. PROFILE ?= smoke FORMAT ?= human stress-load-dry: ## Plan the stress load without running it bin/gpforum stress-load --dry-run --profile "$(PROFILE)" --$(FORMAT) stress-load: ## Run the stress load generator @test -n "$(BASE_URL)" || (echo 'make stress-load requires BASE_URL=...' >&2; exit 2) bin/gpforum stress-load --profile "$(PROFILE)" --base-url "$(BASE_URL)" --$(FORMAT) # Optional attachment filesystem + deploy checklist (static + host when available). # Not part of `make check` or default CI. staging-drill-attachments: ## Run the attachment store drill bin/gpforum staging-drill-attachments --json # Optional identity mail delivery probe; uses GPFORUM_MAIL_* / SMTP settings. # Not part of `make check` or default CI. antivirus-check: ## Prove the upload antivirus detects the EICAR test file bin/gpforum antivirus-check --human mail-check: ## Send a test message through the configured mailer bin/gpforum mail-check --json --dry-run # Optional identity mail lifecycle drill (test transport). Not part of make check. mail-lifecycle-check: ## Exercise the mail lifecycle end to end bin/gpforum mail-lifecycle-check --json --simulate # Optional dead-letter staging check (in-memory simulate). Not part of make check. pitr-drill: ## Rehearse point-in-time recovery on a throwaway cluster script/pitr-drill standby-drill: ## Rehearse a streaming standby and a failover on throwaway clusters script/standby-drill partition-maintenance: ## Plan next month's log partitions (add --apply to run) bin/gpforum partitions --plan dead-letter-check: ## Report the dead-letter queue bin/gpforum dead-letter-check --json --simulate # Optional non-destructive staging host verify (repo artifacts; live flags optional). # Not part of `make check` or default CI. staging-host-verify: ## Verify a staging host against the deploy contract bin/gpforum staging-host-verify --json # Print-only private-beta prep commands/status. Does not run drills or claim # readiness. See docs/ops/private-beta-checklist.md. private-beta-checklist: ## Report the private-beta readiness checklist script/gpforum-private-beta-checklist --commands # Print-only live staging-host-verify + stress-load + mail evidence commands. # Does not start Hypnotoad or claim readiness. See docs/ops/staging-host.md. evidence-live: ## Collect live runtime evidence script/gpforum-evidence-live --commands # Stamp archived evidence with EvidenceMeta markers. Example: # make evidence-meta FILES='a.json' WRITE=1 evidence-meta: ## Summarise an evidence bundle @test -n "$(FILES)" || (echo 'make evidence-meta requires FILES="..."' >&2; exit 2) bin/gpforum evidence-meta $(if $(WRITE),--write,) $(FILES) # Validate archived evidence JSON (secrets/claims/shape). Not part of make check. # Example: make evidence-validate FILES='a.json b.json' FILES ?= evidence-validate: ## Validate an evidence bundle @test -n "$(FILES)" || (echo 'make evidence-validate requires FILES="..."' >&2; exit 2) bin/gpforum evidence-validate --json $(FILES) # Audit the dependency lock against CPANSA advisories. Needs CPAN::Audit # installed for the selected Perl (a host tool, like Carton), so it is not part # of `make check`. Accepted advisories live in etc/cpan-audit-ignore.txt. cpan-audit: ## Check dependencies against CPAN security advisories script/cpan-audit # Validate every archived ops evidence blob under docs/ops/evidence with # --strict, skipping blobs whose .exit sidecar records a harness that never # produced evidence. Not part of make check. evidence-archive-check: ## Check the evidence archive is intact script/gpforum-evidence-archive-check