Skip to content

Repository automation: Dependabot, labeler, CodeQL, mutation testing and the issue forms - #2

Merged
Paururo merged 2 commits into
mainfrom
chore/automation
Aug 22, 2026
Merged

Paururo merged 2 commits into
mainfrom
chore/automation

Conversation

@Paururo

@Paururo Paururo commented Aug 22, 2026

Copy link
Copy Markdown
Member

Ports get_MNV's repository automation, adapted to what distree actually has: no
npm, no Python test runners, one crate instead of a workspace.

What arrives

Dependabot Monthly, grouped, majors kept apart. Cargo, pip for the docs, and the actions themselves
Auto-merge The routine group merges itself once CI passes; a major never does
Labeler parser, distances, cli, tests, ci, packaging, documentation, from the files a pull request touches
CodeQL Rust and the workflows, on push and pull request
Dependency review Refuses a pull request that adds a dependency with a known advisory
Mutation testing By hand, four shards, advisory
Stale sweep Three months to stale, one more to close; never touches bug, security or pinned
Templates Bug report and feature request forms, a pull request template, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT

Twelve labels were created on the repository to match, so nothing here
references a label that does not exist.

Two things worth reading rather than skimming

A cron I should not have added. crossvalidate.yml had a weekly schedule.
That is a build-and-test job on a timer, which is exactly what you asked not to
have: it spends minutes every week and reports failures nobody asked for, with
nobody watching when it goes wrong. It is workflow_dispatch only now. The
stale sweep keeps its cron, as the same exception you made in get_MNV, and the
file says so.

Mutation testing was run before it was configured. 478 mutants, 397 caught,
58 survivors. Two survivors looked like real test gaps and neither was:

  • skip_whitespace_bytes looks dead, because whitespace outside quoted labels
    is stripped before the parser runs. Making it panic if it ever skipped
    anything and running the suite proved otherwise: the torture test reaches it,
    because a malformed quote leaves whitespace inside what the stripper took for
    a quoted region. It stays.
  • The + 1 in the LCA table's levels survives removal. Two attempts to kill
    it, a ladder and two deep chains, both passed without it. The second phase of
    mrca is a greedy descent that accumulates jumps rather than taking one, so
    it can climb 2^levels - 1, which is already enough. The + 1 is margin, and
    it stays.

The rest are equivalent mutants or error-message wording, and all ten in the
library scope are named individually in .cargo/mutants.toml.

The one thing the run did produce is a test: nothing put a tree deep enough to
stress the lifting table through the LCA path at all, so
test_lifting_table_is_deep_enough_for_a_ladder now does. 97 tests, up from 96.

src/main.rs is outside the mutation scope. Its survivors are the batch and
buffer size constants, which change how fast the run is and not what it prints,
and warning conditions, which change wording. The integration tests cover its
behaviour end to end, which is the right granularity for a command line. The one
numerically load-bearing part, write_fixed_fast, is already checked directly
against the standard formatter over 200,000 values.

Not included

fuzz/ is deliberately absent from Dependabot. It is a separate workspace that
resolves its own versions and CI never builds it, so a bump there would be
merged on the strength of a green run that never compiled the thing being
bumped.

There is no Q&A contact link in the issue template config, because Discussions
are not enabled here. Worth turning on: an answer in Q&A gets marked as the
answer and the next person finds it, while an answer in an issue is seen once.

Note on this pull request

The labeler cannot label the pull request that introduces it: pull_request_target
runs the workflow from the base branch, which does not have the file yet. Labels
applied by hand, from the same globs the automation will use from now on.

Dependabot with the shape get_MNV settled on, after its first attempt
opened one pull request per dependency and led with majors: monthly,
grouped, majors kept apart, and the routine group merging itself once CI
passes. fuzz/ is deliberately left out. It is a separate workspace that
CI never builds, so a bump there would merge on the strength of a green
run that never compiled it.

The labeler, with globs for this project rather than get_MNV's: parser,
distances, cli, tests, ci, packaging, documentation. Twelve labels
created to go with it.

CodeQL over rust and the workflows themselves, which is not a curiosity:
those queries know about unsafe uses of pull_request_target, and the
labeler runs on exactly that trigger. Dependency review to refuse a new
dependency with a known advisory, which is the half Dependabot does not
cover. Issue forms, a pull request template, and the community health
files.

The stale sweep is the one scheduled workflow, the same exception you
asked for in get_MNV: a maintenance sweep has nothing to hang off except
time. Which is also why crossvalidate.yml lost its weekly cron in this
commit. I put it there and should not have: it builds and tests, and a
build-or-test job on a timer is the thing you asked not to have.

Mutation testing, scoped to the library. It was run first rather than
added blind: 478 mutants, 397 caught. The survivors in main.rs are
argument handling and warning text, so the scope excludes it; the ten in
the library are documented one by one in .cargo/mutants.toml, including
the two that looked like real gaps and turned out not to be. One of them
took a probe to settle: skip_whitespace_bytes looks dead, and making it
panic if it ever skipped anything proved it is not, because a malformed
quote leaves whitespace the stripper could not see.
@Paururo Paururo added distances Distance modes, the LCA structure and midpoint rooting ci Workflows, checks and repository automation labels Aug 22, 2026
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Rust 1.98's clippy added chunks_exact_to_as_chunks, so this turned CI red
on the next run against stable. The code is already on main, which means
main is red too until this lands: it is a new lint on old code rather
than anything this branch introduced.

Same reading, one less unwrap: as_chunks gives [u8; 8] directly instead
of a slice that has to be converted at every element.
@Paururo
Paururo merged commit 9fee2da into main Aug 22, 2026
7 checks passed
@Paururo
Paururo deleted the chore/automation branch August 23, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Workflows, checks and repository automation distances Distance modes, the LCA structure and midpoint rooting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants