Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 7.61 KB

CONTRIBUTING.md

File metadata and controls

77 lines (55 loc) · 7.61 KB

Contributing to OwlAuth

Repository boundaries

Read the v1 specification and focused tests before changing a contract. The two listeners share PostgreSQL but separate consumer authority: Runtime owns public login and sessions; Server API owns Project-key backend reads; Control owns deployment-operator actions. Keep the CLI as an HTTP adapter for Control and each SDK as a standalone Runtime client. Edit public schemas in owlauth-types and generate the OpenAPI exports.

The single v1 PostgreSQL baseline assumes a new database. Once applied in a deployed environment, a migration is immutable. Append ordered migrations and validate both empty installation and upgrades from the deployed v1 history. Keep business transitions in repository transactions with project scope, revision fences, and explicit locks. See Storage and migrations.

Write public guides in English and describe implemented behavior only. The Hosted Auth UI (/auth/) and Control Console (/console/) are built in crates/owlauth-server/web and embedded into owlauth-server. Keep current Runtime examples aligned with the SDK specification. Report security issues privately using SECURITY.md.

Development targets

Target Purpose
make install Fetch locked dependencies.
make format Format Rust and Python (cargo fmt --all, uv run ruff format sdks/python).
make check Check Rust formatting and Clippy (-D warnings), export OpenAPI, verify hosted-web contracts, boundaries, lint, format, types, and tests, type-check the TypeScript SDK, check Python with Ruff (lint and format), and verify release dev sentinels and Markdown links.
make test Run Rust workspace, TypeScript and Python SDK, and script/release-tooling tests.
make test-pg Run OWLAUTH_REQUIRE_DOCKER=1 cargo test --workspace --all-features --locked.
make test-scripts Test installers, dev environment, and release tooling.
make package-check Smoke-test Rust crate and SDK distributions.
make build Build release owlauth-server and owlauth (package owlauth-cli).
make openapi Export target/openapi/{runtime,server,control}.json.
make web-contracts Regenerate hosted-web OpenAPI TypeScript contracts.
make web-check Run hosted-web boundary, lint, format, type, and unit checks.
make web-build Rebuild deterministic Runtime and Control hosted-web assets.
make docker-build Build and smoke-test the server container image.
make docs / make docs-build Serve or build the VitePress docs.
make dev / make dev-check Start the backend and local database, or preflight tools and .env without starting services.
make dev-up / make dev-down Start or stop local PostgreSQL.
make dev-reset Recreate PostgreSQL and delete local data.
make dev-logs / make dev-status / make dev-postgres Follow database logs, check the service, or open psql.

Run make check and make test for ordinary changes. Use make test-pg for storage, authority, and concurrency changes; it fails if Docker-backed PostgreSQL is unavailable. Use make docs-build for site changes and python3 scripts/check-markdown-links.py to check links across the repository. See local infrastructure for Compose and .env usage. Never add generated site output or local credentials to Git.

Pull request titles and changelog

Pull requests are squash-merged. Their titles are the structured source for component release notes and must use:

<type>(<scope>[+<scope>...])[!]: <summary>

Examples:

feat(server): add project handoff exchange
fix(cli): preserve the install directory during update
feat(server+cli): add project diagnostics
fix(typescript+python+rust): normalize handoff errors
feat(all)!: replace the project session response
chore(repo): update CI toolchains

Release scopes are server, cli, typescript, python, rust, and all. Internal-only scopes are repo, docs, plugin, and deps-dev. Use + only for a true cross-component change and ! for a breaking change. The summary starts lowercase and does not end with a period.

Generated notes classify security, feat, fix, perf, refactor, docs, and deps. Internal chore, ci, test, and style changes are validated but omitted. Release-facing changes require an explicit component scope. Release workflows generate component-filtered notes before publication and must consume the uploaded notes artifact rather than GitHub-generated notes.

Releases

Each released component follows independent SemVer. Release tags identify a selected reviewed commit and use exactly one of:

  • Server and public dependency crates (owlauth-key-provider, owlauth-types, and owlauth-server): server-v{version}
  • CLI and its exact public types dependency (owlauth-types and owlauth-cli): cli-v{version}
  • TypeScript SDK: typescript-v{version}
  • Python SDK: python-v{version}
  • Rust SDK: rust-v{version}

Committed package manifests, including private workspace packages, use development sentinels rather than the latest release number: Cargo and npm use 0.0.0-dev, while Python uses the PEP 440 equivalent 0.0.0.dev0. The tag is the only release-version authority: workflows derive the component and version from it and update every coupled manifest, exact dependency, and lockfile only in their isolated workspaces. Do not commit release-only version bumps.

A server release publishes owlauth-key-provider, owlauth-types, then owlauth-server at the server tag version. A CLI release publishes owlauth-types then owlauth-cli at the CLI tag version so the CLI crate retains an exact public-types dependency. Server and CLI versions normally advance one shared crate sequence. They may use the same version only when both tags point to the same commit; publish Server first, then CLI reuses the checksum-identical owlauth-types crate. Versions must never move backward. The selected version must satisfy the strongest SemVer change among every crate emitted by that tag, including public owlauth-types changes. The SDK tag families remain independent. Python release tags currently use stable X.Y.Z only so PEP 440 normalization cannot make package metadata differ from the tag. Development sentinels must never be published. Do not reuse, move, or delete a published release tag.

Full validation belongs to CI before tagging. Pushing a valid release tag performs only release-specific version checks, artifact builds and package-content inspection, publication, and GitHub Release creation. The tag remains valid if main advances before publication. Publication must consume the uploaded notes artifact rather than GitHub-generated notes.

Server images are published as ghcr.io/owlfoundry/owlauth. A server release publishes its versioned image and updates latest; SemVer + build-metadata separators are represented as _ because OCI tags do not allow +. A push to main updates dev. A build/server/{tag} branch publishes the isolated test tag build-{tag} after image build and health smoke testing. The requested test tag must be one lowercase OCI tag segment; the build- registry prefix prevents collisions with release versions, dev, and latest.

CLI binaries are hosted on GitHub Releases with mandatory SHA256SUMS. scripts/install.sh, scripts/install.ps1, and the built-in owlauth update command install only checksum-verified archives. The installers embedded in the CLI must remain byte-for-byte equal to the public scripts.