Skip to content

chore: extend the mathematic-inc ToolConfig policy - #71

Merged
jrandolf merged 7 commits into
mainfrom
chore/org-toolconfig-policy
Nov 20, 2026
Merged

jrandolf merged 7 commits into
mainfrom
chore/org-toolconfig-policy

Conversation

@jrandolf

Copy link
Copy Markdown
Contributor

Why

mathematic-inc repositories share one ToolConfig policy
(mathematic-inc/toolconfig-config). This repository kept its own copy of each
tool setting. It now extends the policy and passes the stricter checks.

What

  • Extend the policy at a pinned commit. Keep only the buf module path and two
    documented exceptions: one buf rule for the copy of the sqlc plugin protocol,
    and one cargo-deny advisory (chrono is unmaintained and has no fix).
  • Delete the settings files that ToolConfig now writes.
  • Amend the hk steps of the organization (hk.pkl). Keep the lockfile step.
    Set the cargo-deny directory and skip the throwaway test database URI in
    kingfisher.
  • Run mathematic-inc/toolconfig-action before each tool in CI.
  • Pin ToolConfig 2026.11.6, hk 2.13.0 and Rust 1.100.0. Add the mise tasks
    generate, fix and check.
  • Fix the findings of the stricter policy:
    • Clippy (organization lint table): docs, #[must_use], # Errors, Debug,
      narrower visibility, and two small refactors (one type table, one array
      dimension function).
    • jactionlint: concurrency groups, image digests.
    • zizmor: mise cache off in the release job.
    • rumdl and harper: Markdown at 80 columns.
    • shfmt and oxfmt: one script and one JSON file.

Tests

  • hk check --all --slow --skip-step toolconfig passes (40 steps).
  • toolconfig check --strict passes.
  • cargo test --workspace --locked passes against a local Postgres: 88 unit
    tests, 30 snapshot tests, the end-to-end test and the example tests.
  • cargo build --target wasm32-wasip1 and cargo package --locked pass.

Why: mathematic-inc repositories share one ToolConfig policy. This
repository kept its own copy of each tool setting.

- Extend toolconfig-config at a pinned commit. Keep only the buf module
  path, one buf exception and one cargo-deny advisory exception.
- Delete the settings files that ToolConfig now writes.
- Amend the hk steps of the organization. Keep the lockfile step. Set the
  cargo-deny directory and the kingfisher skip for the test database.
- Pin ToolConfig 2026.11.6, hk 2.13.0 and the other tools of the policy.
- Add the mise tasks generate, fix and check.
Why: the policy needs the generated settings files before each tool runs.

- Run toolconfig-action in each job that runs a tool, after mise.
- Run hk with --skip-step toolconfig in the hk workflow.
- Add a concurrency group to the workflows that had none.
- Pin the postgres image of the services by digest.
- Turn off the mise cache in the release job that publishes artifacts.
- Add the organization lint table and enable it in each crate.
- Add the docs, `#[must_use]` and `# Errors` sections that the lints need.
- Derive Debug for the public types. Narrow the visibility of the
  code generators to the crate.
- Move the PostgreSQL type defaults into one table.
- Move the array dimension rule into one function.
- Allow the lints on the generated modules, which `buf generate` and
  `sqlc generate` write.
- Add a license to the example crates.
- Wrap the Markdown at 80 columns.
- Link the discussion form by its full URL.
- Write "parameters" in place of "params".
Format scripts/proto-sync.sh with shfmt and release-please-config.json
with oxfmt, at the settings of the policy.
hk runs oxfmt on release-please-config.json. CI had no oxfmt.
@jrandolf
jrandolf marked this pull request as ready for review November 20, 2026 05:14
@jrandolf
jrandolf merged commit 62459f3 into main Nov 20, 2026
26 checks passed
@jrandolf
jrandolf deleted the chore/org-toolconfig-policy branch November 20, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant