app.action-drift
GitHub Action for ContractSpec drift detection
@lssm-tech/app.action-driftbun add @lssm-tech/app.action-driftManifest declarations describe the current workspace; they do not verify registry publication or runtime execution.
Package guide
Website: https://contractspec.io
GitHub Action that detects contract drift between specs and implementation. Runs in CI to flag when generated code diverges from its source contracts.
What It Does
- Uses
@lssm-tech/lib.contracts-specfor contract definitions - Uses
@lssm-tech/bundle.workspacefor workspace analysis - Configured via
action.yml; nosrc/— logic lives in workspace bundle
Usage
name: ContractSpec Drift
on: pull_request
jobs:
contractspec:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v6
- uses: lssm-tech/contractspec/packages/apps/action-drift@main
with:
github-packages-token: ${{ secrets.CONTRACTSPEC_PACKAGES_TOKEN }}
generate-command: 'bun contractspec generate'For affected private GitHub Packages dependencies, github-packages-token must be a GitHub token that can read the ContractSpec packages granted to the consuming repository, bot, or GitHub App.
Inputs
package-manager(default:bun) — Package manager to use (bun|npm|pnpm|yarn)working-directory(default:.) — Working directory for running commandsgenerate-command(default:bun contractspec generate) — Command to regenerate artifactson-drift(default:fail) — Behavior when drift is detected (fail|issue|pr)drift-paths-allowlist— Comma-separated glob patterns to check for drifttoken(default:${{ github.token }}) — GitHub token for issues/PRsgithub-packages-token— Optional token used to configure private GitHub Packages auth before dependency installs
Outputs
drift-detected— Whether drift was detected
Key Files
action.yml— GitHub Action definitionfixtures/— Test report data for drift scenarios
Local Commands
bun run test— bun test
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed
- Stability
- Stability improvements
Notes
- Do not change
action.ymlinputs/outputs without updating downstream workflow consumers - Fixture JSON files are used for CI testing — keep them valid
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
2 declarations
@lssm-tech/lib.contracts-specworkspace:^
Read the package manual ↗@lssm-tech/bundle.workspaceworkspace:^
Read the package manual ↗
Declared capabilities
This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.
Scripts
testbun test