ci: gate shared-contract drift (PluginKit + DatabaseType)#1493
Conversation
…burn-down baseline
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: babc5f4690
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - "TablePro/Models/**" | ||
| - "TableProMobile/**" |
There was a problem hiding this comment.
Run drift check for all scanned DatabaseType paths
The audit script scans all of TablePro, Plugins, Packages, and TableProMobile for extra DatabaseType definitions, but this workflow only runs when a narrow subset of those paths changes. For example, a PR that adds struct DatabaseType under TablePro/Core or another package/plugin path outside these filters will not trigger contract-drift.yml, so the new duplicate contract can merge without the new gate ever running. Broaden the path filters to cover every directory scanned by databasetype_extra_defs or remove the filter for this workflow.
Useful? React with 👍 / 👎.
Summary
Adds a fast CI gate that fails when a shared contract diverges beyond a known baseline, so the existing duplication can't get worse while Phase 1 consolidation is pending. No source is moved.
scripts/audit-refactor-health.sh --checknow compares the live drift against.github/duplicate-contract-baseline.txtand fails only on new divergence:TableProPluginKitfile that differs or exists in only one ofPlugins/TableProPluginKitvsPackages/TableProCore/Sources/TableProPluginKitDatabaseTypedefinition outside the authoritativeTableProCoresource.github/duplicate-contract-baseline.txtrecords today's known drift (48 PluginKit files + the desktopDatabaseType). Burn it down as contracts move intoTableProCore; never add a fresh entry to make new drift pass..github/workflows/contract-drift.ymlruns the check on ubuntu (pure bash/grep, no Xcode) for PRs and pushes touching the relevant paths.This implements the drift-check step (PR-sequence #6) ahead of the higher-risk PluginKit/model consolidation (#7/#8), now that the macOS CI gate from #1481 exists.
Risk Addressed
DatabaseTypedefinitions can disagree across targets.Verification
scripts/audit-refactor-health.sh --checkpasses onmain(live drift == baseline).DatabaseTypedefinition appears outside the authoritative source + baseline.Notes
Shared contract driftcheck as required in branch protection so new drift blocks merge.