CI formats, lints and rustdocs no shipped guest crate — all four are outside the workspace and outside every gate #276
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#276
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while building
de.h-dv.svelte(#268). Pre-existing, not introduced by that work, and it affects code that ships inside signed packages operators install.Measured
Four guest crates each declare their own
[workspace]table and appear in the rootCargo.toml'sexcludelist:[workspace]excludecrates/guest/examplecrates/guest/rubycrates/guest/timelinecrates/guest/svelteThat is correct and deliberate — they are
cdylibs withpanic = "abort"forwasm32-unknown-unknown, and the rootexcludecomment says plainly that "a hostcargo build --workspacehas no business linking either, and cargo would try."The consequence is the part nothing states:
cargo fmt --allfrom the repository root does not see a single file under any of them, and neither doescargo clippy --workspace --all-targetsorcargo doc --workspace. Those three commands are the entire formatting/linting/doc gate inci.yml.Then the workflows:
.forgejo/workflows/ci.yml— mentionscrates/guestexactly ONCE, at line 644, inside a COMMENT aboutcrates/guest/example/build.sh. No step reads any guest source..forgejo/workflows/ci-windows.yml— zero mentions..forgejo/workflows/release.yml— two mentions, both packing paths.crates/indexer/tests/formats, lints or rustdocs a guest.So: nothing in CI formats, lints, or rustdocs any shipped guest crate.
How it was demonstrated rather than reasoned about
During #268 the svelte lane appended a deliberately misformatted function to
crates/guest/svelte/src/expr.rs:cargo fmt --all -- --checkrun from the CRATE directory — RED.That is the whole gap in one mutation.
Why it matters more than the usual "CI does not lint X"
crates/guest/ruby,crates/guest/timelineand nowcrates/guest/svelteare the SOURCE ofextractor.wasminsidede.h-dv.ruby,de.h-dv.timelineandde.h-dv.svelte. Those artifacts are signed with the first-party key, published as release assets, pinned by digest, and installed into a machine-wide store. They are also the code that runs inside the sandbox on an operator's files.A clippy lint that CI never runs on a package's extractor is a lint that never ran on the thing this project asks operators to trust most. The current state depends entirely on whoever last touched a guest having remembered to run the three commands by hand, from the right directory — which is a convention, not a gate, and this repository has a long record of what happens to those.
It also interacts badly with the dev loop: a contributor who runs the documented
cargo fmt --all -- --checkfrom the root gets a GREEN that means nothing about the crate they just edited.What this does NOT claim
That any guest is currently unformatted or carries a clippy warning. Every guest lane to date has run the three commands by hand from the crate directory, and #268's did so and recorded the exit codes. The claim is about what is GATED, not about the present state of the tree.
Options
Cargo.toml'sexcludelist (or fromcrates/guest/*/Cargo.toml) and loops fmt/clippy/doc over it. Preferred on this repository's own precedent:GRAMMAR_BUILDSandWASM_ARTIFACTSare both lists-plus-a-loop for exactly this reason, andgrammar_provenance.rs's comment says why — "a THIRD grammar arrives with three more copies, and the fix for a weakness found in one of them has to be applied by hand in each."crates/indexer/tests/asserting every directory matchingcrates/guest/*/Cargo.tomlis named by a CI step, derived on both sides so a guest added without a step is red on the day it is added. This is the shapeci_disk_preflight.rsalready uses for the free-disk step, and it closes the "a new guest silently escapes" hole that options 1 and 2 leave open.2 and 3 are complementary rather than alternatives: the loop does the work, the gate proves the loop's population is the real one.
Note for whoever takes this: the guests need
--target wasm32-unknown-unknownfor clippy, and they areno_std. The #268 lane rancargo clippy --release --target wasm32-unknown-unknown -- -D warningsandRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --document-private-itemsfrom inside the crate; both are clean today, so a step added now starts green.cargo testgrades the Svelte extractor's rules — its fixtures run only in the release workflow, and three of its five rules are asserted nowhere #279Closed by PR #287 (
bea410f), options 2 + 3 as suggested:.forgejo/scripts/guest_gates.shdoes the loop,crates/indexer/tests/ci_guest_gates.rsproves the loop's population is the real one.Verified by dispatch, not by shape alone: CI run #5372 on
7a5fd70— 14/14 jobs green, 1h33m02s. The new job cost ~2.5 min and did not extend the lane. Its runner log shows it graded all four crates, each getting clippy (Finished release) and rustdoc (Documenting …→Generated …/index.html).Two corrections to this issue's text, recorded because both were load-bearing and a future reader will hit them:
1. The
excludetable is wrong, and it is the trap. This issue states all four guests appear in the rootCargo.toml'sexcludelist, and offers deriving the set from it as the first form of option 2. Onlyexampleandrubyare there.timelineandsvelteare outside the workspace purely by virtue of their own[workspace]table, which is what actually excludes a crate —excludeis optional for one that carries it.Run as a mutation, the
exclude-derived discovery grades two of the four crates, silently, and the half it drops containssvelte— the newest guest, and precisely the one a new gate exists to catch. Discovery therefore keys on the[workspace]table, andguest_gates_population_is_not_derivable_from_the_exclude_listpins the difference so it cannot be "simplified" back.2. "Both are clean today, so a step added now starts green" is false for rustdoc. True of fmt and clippy on all four. rustdoc was RED on two, and the gate is green only because they were fixed first:
crates/guest/ruby/src/lib.rs—[`extract`]is ambiguous, naming bothmod extractandpub extern "C" fn extract.crates/guest/timeline/src/lib.rs—[`OUT_LEN`]is a private item linked from the public docs ofSRC_OFFSET, resolving only under--document-private-itemsand 404ing in any other render.Both were demoted to citations per the one intra-doc rule; neither was
#[allow]ed.One addition for whoever touches a guest next. The note here prescribes
cargo clippy --release --target wasm32-unknown-unknown -- -D warnings, and the omission of--all-targetsturns out to be structural rather than incidental: these crates areno_stdwith their own#[panic_handler], so the lib-test target links std's and fails witherror[E0152]: found duplicate lang item panic_implbefore any lint runs. Measured on all four — every one fails with the flag, every one is clean without it. The script says so at the call site.🤖 Generated with Claude Code
https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
mixed_load_ceilingsfails intermittently on the nightly atladder x64withhost.memory_ceiling_exceeded, on a tree that passes the same job hours earlier #288