Skip to content

ci: fail a pull request that closes an issue a spec still cites as not met - #270

Closed
Moep90 wants to merge 304 commits into
kapicorp:mainfrom
Moep90:ci/spec-status
Closed

Moep90 wants to merge 304 commits into
kapicorp:mainfrom
Moep90:ci/spec-status

Conversation

@Moep90

@Moep90 Moep90 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Today 22 requirements stayed Since: not met yet (#n) after the pull requests that implemented them merged and closed their issues. #267 fixes the data. This PR stops it from happening again.

The new Spec status job runs on every pull request. It asks GitHub which issues the pull request closes (closingIssuesReferences, the same list a Closes #n line produces). It then fails when docs/specs still cites one of them as not met yet (#n), and names the file and line. It only checks issues that this pull request closes. An issue closed by hand does not block unrelated pull requests.

The spec comes first, as its own commit: CLI-63, the new job in CLI-33 and in the job-paths table, and one sentence in docs/specs/README.md.

Verified

I extracted the job's script from the YAML and ran it against real data:

Specs from Pull request Expected Result
main #248, the fix for issue 247, while CLI-61 still says "not met yet (#247)" fail exit 1, names cli-and-release.md:474
#267's branch #248 pass exit 0
main #265, closes nothing pass exit 0

zizmor 1.30.1 reports no findings.

This touches ci.yml and cli-and-release.md. So does #267, which edits different lines, and I'll check the two together before asking for review.

ademariag and others added 30 commits September 18, 2026 10:31
…follow the binary

The binary is krab; everything that is krab's own identity now says so:

- crates `krab-inventory`, `krab-server`, `krab-compile`, `krab-lsp`
  (directories, package names, `use krab_inventory::`, RUST_LOG targets);
- environment variables `KRAB_PYTHON`, `KRAB_PYTHON_REQUIREMENTS`,
  `KRAB_NO_DAEMON`, `KRAB_INVENTORY_PATH`, the test-only `KRAB_CORPUS` and
  `KRAB_COMPILED`, `KRAB_RUNNER_TRACE_GLOBALS`. The `KAPITAN_*` spellings
  of the first four are copied to the new name at start-up with a note on
  stderr, for this release. `KRAB_NO_DAEMON=1` now parses (the strict bool
  parser only took `true`; the docs always said `=1`);
- `$XDG_RUNTIME_DIR/krab`, `/tmp/krab-<uid>`, `~/.local/state/krab`,
  `~/.cache/krab`, temp prefix `krab-compile-`;
- `compiled/.krab-manifest.json` and the engine string `krab <version> ...`
  (one full recompile);
- VS Code: package `krab`, settings `krab.path`, `krab.python`,
  `krab.trace.server`, command `krab.restartServer`, artifact `krab-vscode`;
  the publisher stays `kapicorp`.

Deliberately still `kapitan`: the `.kapitan` file, the bundled Python
package components import from, `KAPITAN_VAR_<name>`, `KAPITAN_HELM_PATH`,
`KAPITAN_HELM_TIMEOUT`, the `__KAPITAN_LITERAL__` marker, and the lookup
of a kapitan PEX on PATH for `--backend python`.

Verified on the grid: full compile byte-identical to the release output,
the environment rebuilt under ~/.cache/krab, the daemon under the new
runtime dir, `KAPITAN_NO_DAEMON=1` accepted with the note.

Closes kapicorp#94

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
rename the binary to krab, and everything of krab's own that still said kapitan
tests/fixtures/expected is what kapitan 0.36.3 prints for the fixture
inventory, and crates/krab-inventory/tests/fixture.rs compares krab
against it byte for byte. Nothing verified that the committed snapshot was
still the reference's output, so an expectation written by hand, or one
left stale after a fixture change, would have passed.

The job installs the reference, regenerates the directory and fails if the
result differs from what is committed. omegaconf is pinned because kapitan
0.36.3 accepts >=2.4.0.dev3 and 2.4.0.dev15 dropped ListMergeMode, which
its omegaconf backend imports, so a fresh resolution cannot render at all.

Signed-off-by: moep90 <volleyballlive@googlemail.com>
Issue forms for bugs, parity gaps and ideas, modelled on the ones in
kapicorp/kapitan. The parity form asks for the reference behaviour, a
reproduction both implementations can run, and whether a fixture case
exists. The PR template carries the checks from CONTRIBUTING.md.

actions/labeler maps the tree onto the area: labels the roadmap board
groups by, and dependabot watches cargo and the actions.

SECURITY.md says where to report and what is in scope around refs and the
daemon. It makes no response-time promise, since there is nobody to hold
to one yet.

Signed-off-by: moep90 <volleyballlive@googlemail.com>
…ONS.md

They were spread over README.md and two places in DESIGN.md. Both now
point at the table instead of restating it, and a difference that is not
listed is a bug.

Signed-off-by: moep90 <volleyballlive@googlemail.com>
CONTRIBUTING.md states the cycle contributors already follow: the issue
carries the specification, the fixture case comes first, the parity check
verifies, and a deliberate difference gets a row in DECISIONS.md.

CLAUDE.md holds the build and test commands, the parity rule, the crate
layering and the invariants. AGENTS.md points at it for other tools.

Signed-off-by: moep90 <volleyballlive@googlemail.com>
The Rust job installed omegaconf unpinned so the resolver tests would run
against the real package. kapitan 0.36.3 accepts >=2.4.0.dev3 and a fresh
resolution now picks 2.4.0.dev15, which dropped ListMergeMode; the parity
job therefore pins dev3. Pinning the same version here keeps both jobs on
one omegaconf instead of letting them drift apart silently.

cargo test --locked passes against 2.4.0.dev3.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
…he way

make_repo set user.email and user.name per repository but left everything
else to the developer's global configuration, so a setting that changes
what git init, git commit or git tag do changed the test outcome. With
tag.gpgsign set, git tag v1 wants a message and two tests fail on a
contributor's machine while CI stays green.

git_ok now runs git with GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM pointed
at /dev/null, which also closes commit.gpgsign and init.templatedir. The
production helper keeps inheriting the configuration, which real fetches
need for credentials and url.*.insteadOf.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
It named the packages and would have contradicted the pinned install as
soon as ci.yml changed. What matters for running the tests is which
modules have to be importable; the workflow keeps the versions.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
…version

rust-toolchain.toml pins the compiler and lists rustfmt and clippy, so a
fresh checkout installs both on its first cargo command instead of failing
on a missing component.

[workspace.lints.clippy] selects seven lints that are already clean here.
print_stdout and print_stderr make the rule that only the CLI formats
output machine-checked; main.rs and the tests that report why they skipped
opt out where printing is the point.

rust-version said 1.85 and nothing checked it. cargo +1.85 check fails:
textwrap needs 1.90, the icu crates 1.88, idna_adapter 1.86. It says 1.90
now, which is what the workspace builds on.

Pinning surfaced three warnings a floating stable had not reached yet and
five unsafe blocks without a SAFETY comment.

The crates are publish = false: [patch.crates-io] replaces saphyr-parser
with a patched copy and cargo strips patches when packaging, so a
published krab-inventory would silently lose the PyYAML fixes.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Two documents asked contributors to keep docs/CLI.md in sync with --help
and nothing checked it. A test now walks every subcommand of the built
binary and fails when a command or a long flag is missing from the
reference. It found --lines on server logs, which is documented now.

The check is one-directional on purpose: an undocumented flag is a bug,
while a document that still names a removed flag can be a migration note.

The fixture test gained the other half of its own check. It already failed
on an expected file with no target behind it; a target added without
expected output was silently never compared.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
…runner

Every archive gets a build provenance attestation, so a downloader can
check with gh attestation verify which workflow and which commit produced
the binary. Keyless through Sigstore; no secrets to hold.

Release notes come from git-cliff instead of GitHub's generated ones,
grouped by the area: prefix the repository already uses. cliff.toml takes
the subject line only, so commit trailers stay out of a public artifact.

The aarch64 Linux build used a cross linker configured by hand. A
ubuntu-22.04-arm runner builds it natively, on the architecture it ships
for, and the glibc floor is unchanged.

The workflow also pins every action to a commit, starts from no
permissions and grants them per job, keeps the checkout token out of
.git/config, and passes one run: block's values through env: instead of
interpolating them into the script.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
rust-version in Cargo.toml is the only place that needs the number, and
cargo names the version it wants when the toolchain is too old. README and
GETTING-STARTED carried a second copy that nothing would have corrected.

uv, ruff, jj, helix and clap state no Rust version in their README at all,
on the same reasoning: people installing a prebuilt binary never run cargo
build, and people who do get told by cargo.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
The git tag snippet in CONTRIBUTING.md named a version that was right when
it was written. It reads the version out of the manifest now, the way
release.yml does.

The install snippet in README.md is the one version string that has to
track the code: the curl under it 404s when it drifts. A test asserts it
matches the manifest, so bumping the workspace version fails until the
README is bumped with it. Prose naming an older release on purpose is
historical and deliberately not matched.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
The only one in the documentation.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Both named a version that was current when written. git cliff --unreleased
needs no tag argument, and the verify example takes the archive the reader
actually downloaded.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Every action is pinned to a commit; the workflow floated on tags, with
actions/checkout three majors behind. dtolnay/rust-toolchain publishes no
tags and takes the toolchain from the ref, so the pinned commit names it.

A new push to a pull request makes the run in flight pointless and it kept
going anyway. Runs on main are not cancelled: they are what the cache is
saved from. The workflow starts from no permissions and grants them per
job, and no checkout leaves its token in .git/config.

Releases ship macOS binaries and nothing tested them, for a program that
holds a unix socket, spawns python3 and watches the filesystem. The test
job runs on both; format and clippy stay on Linux.

RUSTFLAGS is part of cargo's build fingerprint and of the rust-cache key,
so denying warnings through it cost a rebuild and a cache miss every run.
build.warnings does the same without either.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
A link to an item that was renamed turns into plain text without saying
so. It found one on the first run: kapitan.compile[0].name in a doc
comment, which rustdoc read as a link to an item named 0. That comment is
also the --help text for the argument, and the line already used
backticks, so the path is quoted now.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
AGENTS.md pointed at CLAUDE.md, which no tool follows: Claude Code reads
CLAUDE.md and ignores AGENTS.md when both exist, and every other agent
reads AGENTS.md and finds four lines of redirect. The instructions live in
AGENTS.md now and CLAUDE.md imports it, so both are read and there is one
copy. A symlink would be the other option, but git checks one out as a
text file on Windows without core.symlinks, and this repository has a VS
Code extension.

The architecture section moves to docs/ARCHITECTURE.md, shaped after
rust-analyzer's and wasmtime's contributor guides: bird's eye view, entry
points, a code map per crate, then the invariants that break quietly. It
belongs with the documents a contributor reads.

Dependabot waits seven days before proposing a release, so a version
published minutes ago has had time to be caught if it was compromised.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
…macos

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
…acos

# Conflicts:
#	CONTRIBUTING.md

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
The three jobs that check a fact rather than run the tests. Each was held
out of the first version of this pull request because it needs something
from kapicorp#101 or kapicorp#103, and splitting below that line is what lost them.

The MSRV job reads rust-version out of the manifest, so the number lives
in one place. cargo-deny fails on licences, wildcards and registries and
only reports advisories, because one published overnight should not block
an unrelated pull request. zizmor lints these workflow files themselves.

deny.toml lists every licence currently in the tree: a new dependency
under anything else is a decision rather than an accident.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Merges kapicorp#97's reference-parity job and its omegaconf pin into this file,
brought to the same standard as the rest: pinned actions, nothing beyond
read permission, and no credentials left behind in .git/config.

Branch protection cannot require a job that is conditionally skipped, and
the dependency-policy job is one. A CI passed job aggregates the seven, so
protection requires a single check that does not change when a job is
added or starts skipping.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Link rot happens on someone else's server, so this runs on a schedule
rather than per pull request, and by hand before a release.

It found one broken link, twice: the roadmap board that CONTRIBUTING.md
and docs/ROADMAP.md point contributors at. The board exists but is a
private org project, so an anonymous request gets 404 either way; the
config excludes it for that reason rather than treating it as rot.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
The parity target appears in prose in six files and there is no
machine-readable source for it, so the copies are checked against each
other. Bumping it in one file and not the rest is the failure that
matters, and it is quiet in a project whose whole claim is byte parity.

Mentions without a patch version name the minor series on purpose and are
left alone.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Four types described in one twenty-two line paragraph, with oci orphaned
at the end away from the other three. Same words, one row each, and the
rules that apply to all of them left as prose after it.

Also repairs a wrap in DESIGN.md that left HelmChart alone on a line in
the middle of a sentence.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
It sat between CI and releases and Layout and conventions, which is where
every other pull request that adds to the release section also inserts.
At the end of the file it collides with nothing.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
…macos

# Conflicts:
#	CONTRIBUTING.md

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Contributors work from a fork and cannot merge, so a plan whose next step
is a merge is a plan that stalls. Splitting by file rather than by
dependency loses work, and a pairwise merge check misses the conflicts
that only appear in threes. A version in prose rots unless a test holds it
to its source. A decision kept in a conversation does not survive it.

Each of those cost time in this repository rather than being hypothetical.
The releasing bullet named a version, which the third rule forbids.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Three claims in it were wrong. cargo test -p krab-inventory
fixture::name_of_case ran no test at all and still exited ok, because
fixture is the name of the test binary and not a module path in the
filter. The comment naming RUSTFLAGS described a CI detail this file does
not control. python_resolvers was implied not to skip, and it does.
cargo fmt lost its --check, which is what CI and the pull request
template ask for.

The overview is shorter. A study of 138 tasks across 12 repositories
(arXiv:2602.11988) found repository overviews in context files measurably
unhelpful, and docs/ARCHITECTURE.md now carries what the crates do.

The rule about splitting pull requests names the check instead of
describing the goal, following Anthropic's own guidance that a concrete
verifiable instruction is followed more reliably than a vague one. The
releasing bullet told contributors to merge two lines after saying they
cannot; it is scoped to maintainers now.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
ademariag and others added 18 commits October 27, 2026 19:54
ci: test the oldest and newest supported Python, and support 3.10
…eads

A changes job diffs the pull request against its base, the way the deny job already did, and gates every other job on its own path list. A push to main, or a change to ci.yml, still runs everything. CLI-62 holds the path list. The test job also covers markdown, because docs_consistency.rs reads every markdown file.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
docs: code map, extension checklists and tested registration lists
release: Linux binaries need at most glibc 2.17
release: publish krab as a wheel on PyPI
logging: logfmt by default, JSON with KRAB_LOG_FORMAT=json
….6.7

deps: bump clap from 4.6.6 to 4.6.7
…ror-2.0.21

deps: bump thiserror from 2.0.20 to 2.0.21
ci: run a job on a pull request only when it changes a path the job reads
…/editors/vscode/fast-uri-3.1.9

build(deps-dev): bump fast-uri from 3.1.7 to 3.1.9 in /editors/vscode
…/editors/vscode/qs-6.17.0

build(deps-dev): bump qs from 6.16.0 to 6.17.0 in /editors/vscode
…/editors/vscode/undici-7.30.1

build(deps-dev): bump undici from 7.29.1 to 7.30.1 in /editors/vscode
kapicorp#230, kapicorp#232 and kapicorp#233 added these warning codes while kapicorp#240 was open. kapicorp#240 added the test that every code is documented and merged without them, so every_diagnostic_code_is_documented fails on main.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
…codes

docs: document class_fallback, unknown_section and krab_extension
@github-actions github-actions Bot added documentation Improvements or additions to documentation area: packaging Crates, release binaries, CI labels Oct 27, 2026
ademariag and others added 2 commits October 27, 2026 20:52
release: keep logfmt compatible with glibc 2.17
…requirement

22 requirements stayed "not met yet" after the pull requests that implemented them merged and closed their issues. CI checks it from now on.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
…t met

The Spec status job reads the issues the pull request closes (closingIssuesReferences) and fails when docs/specs still says "Since: not met yet (#n)" for one of them (CLI-63).

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
@Moep90

Moep90 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Replaced by #291.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: packaging Crates, release binaries, CI documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants