feat(hybrid-gate): let a repo with no Cargo manifest use the fleet gate - #57
Open
forkwright wants to merge 1 commit into
Open
feat(hybrid-gate): let a repo with no Cargo manifest use the fleet gate#57forkwright wants to merge 1 commit into
forkwright wants to merge 1 commit into
Conversation
dioptron and mneme are design-phase repos with no Cargo.toml anywhere. Their gate is a bare Gate-Passed trailer check, and the trailer is emitted only by `kanon gate --tier full`, which needs a build box the fleet does not declare. No PR in either repo can pass. They are not strict; they are unsatisfiable. An earlier attempt to point them here (dioptron#42, mneme#3) was closed with the reasoning that "the trailer-only passthrough (stamped locally via the nobuild gate tier) remains the correct gate class for no-code repos". That premise is false: `kanon gate --tier nobuild` runs only non-compiling stages and its own help says it "never emits the trailer". The nobuild tier cannot mint what those gates require, so the passthrough was never satisfiable either. Those PRs also failed at `cargo metadata` -- which is the concrete thing this change fixes. No new inputs. Every non-Rust behaviour comes from widening two mechanisms that already exist, because a caller-declared `rust_project: false` would be a second fact about the repo that drifts from reality the moment a Cargo.toml lands: - The existing Cargo-manifest detection moves ahead of toolchain setup so its output can gate more than the build cache. Toolchain install, cargo-nextest install and the Rust cache now all skip when there is no manifest -- the same condition the cache step already used. - fmt, clippy and nextest skip on an empty command, mirroring doctest_cmd's existing skip-on-empty exactly. `check` stays unconditional on purpose. It is the one step a non-Rust caller must wire something into, so a full-gate-build can never be configured to verify nothing. Non-regression, verified structurally rather than asserted: workflow_call input keys, defaults, types and required flags are byte-identical; job ids and job NAMES are byte-identical, so no check-run context is renamed and no repo's branch protection is stranded; the full-gate-build step-name set is unchanged and only reordered. All 11 confirmed callers have a root Cargo.toml and non-empty fmt/clippy/nextest commands, so every new condition evaluates true for them and every gated step still always runs. WARNING for a docs-phase caller: docs_only_exemption defaults true and its patterns match essentially all of such a repo's content, so leaving it at the default would exempt nearly every PR forever. A required check that samples rather than proves is worse than none, because it is trusted. Such a caller must set it false and wire a real command into check_cmd. This deliberately does NOT install the kanon binary. kanon ships no release asset and the repo is private, so the only precedent (epistole's kanon-lint) needs two private checkouts, FLEET_REPO_TOKEN and a ~10-minute cargo install, and is non-required for exactly that cost. That cost does not belong on the one required check; a repo wanting kanon-lint coverage adds a separate non-required job beside its gate call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finding
dioptronandmnemeare design-phase repos with noCargo.tomlanywhere. Their gate is abare
Gate-Passedtrailer check, and that trailer is emitted only bykanon gate --tier full,which needs a build box the fleet does not currently declare. No PR in either repo can pass.
They are not strict; they are unsatisfiable.
Evidence — and a correction to a prior decision
An earlier attempt to point them here (
dioptron#42,mneme#3) was closed unmerged with:That premise is false.
kanon gate --help, verbatim:Only
full"emits the Gate-Passed trailer on success". The nobuild tier cannot mint what thosegates require, so the passthrough was never satisfiable either. Those PRs also failed at
cargo metadata— which is the concrete thing this change fixes.Desired correction
No new inputs. Every non-Rust behaviour comes from widening two mechanisms that already exist.
A caller-declared
rust_project: falsewas rejected deliberately: it would be a second fact aboutthe repo, and it drifts from reality the moment a
Cargo.tomllands.than the build cache. Toolchain install,
cargo-nextestinstall and the Rust cache now all skipwhen there is no manifest — the same condition the cache step already used.
fmt,clippyandnextestskip on an empty command, mirroringdoctest_cmd's existingskip-on-empty exactly.
checkstays unconditional on purpose. It is the one step a non-Rust caller must wiresomething into, so a
full-gate-buildcan never be configured to verify nothing.Done when: dioptron and mneme can call this reusable and get a check that actually runs.
Non-regression — verified structurally, not asserted
workflow_callinput keys, defaults, types, required flagsfull-gate-buildstep-name setAll 11 confirmed callers (gnomon, koinon, epistole, sphragis, heurema, harmonia, hamma, akroasis,
thumos, theatron, zetesis) have a root
Cargo.tomland non-emptyfmt_cmd/clippy_cmd/nextest_cmd, so every new condition evaluates true for them and every gated step still alwaysruns.
WARNING for a docs-phase caller
docs_only_exemptiondefaultstrueand its patterns (**.md,docs/**,llms.txt) matchessentially all of such a repo's content — leaving it at the default would exempt nearly every PR
forever. A required check that samples rather than proves is worse than none, because it is
trusted. Such a caller must set it
falseand wire a real command intocheck_cmd. This is nowstated on the input itself.
What this deliberately does NOT do
It does not install the
kanonbinary. kanon ships no release asset and the repo is private, sothe only precedent (epistole's
kanon-lint) needs two private checkouts,FLEET_REPO_TOKENand a~10-minute
cargo install— and is non-required for exactly that cost. That does not belong on theone required check. A repo wanting kanon-lint coverage adds a separate non-required job beside its
gate call, as epistole does.
Known gap, not papered over
mneme's.kanon-ci.tomlis onlykanon lint .andkanon lint --writing README.md— bothneed the kanon binary, so unlike dioptron (which has 3 kanon-free Python stages) mneme has nothing
to put in a required
check_cmdtoday. That needs a kanon-free check authored before mneme adoptsthis; it is not fixed here.
CI note
GitHub Actions is in a major outage (incident opened 2026-08-26T15:11:58Z, database failover in
progress). Checks on this PR may queue,
startup_failure, or never be created. Nothing red herebefore that incident closes is evidence about the change.