Skip to content

Simplify for release: stand on published crates alone - #9

Merged
zmaril merged 2 commits into
mainfrom
simplify-for-release
Aug 9, 2026
Merged

Simplify for release: stand on published crates alone#9
zmaril merged 2 commits into
mainfrom
simplify-for-release

Conversation

@zmaril

@zmaril zmaril commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Straitjacket could not build anywhere except inside a full powderworks/
checkout, because nine of its dependencies were Cargo path dependencies on
sibling entl and infact trees. That is the one thing standing between it and
being usable. This removes it.

This is subtraction. No surviving rule was changed.

Headline

before after
Rust lines (src/ + tests/) 6,995 4,008
Direct dependencies 21 9
Transitive crates in Cargo.lock 377 71
path = "../..." dependencies 9 0
Rules 18 10

Direct dependencies are now anyhow, clap, ignore, inventory, regex,
serde, serde_json, toml, and unic-emoji-char. All from crates.io.

What was removed

Eight rules that read facts from packages that were never published, so none of
them could run outside the repository that built them:

exact-clone, near-clone, library-opportunity, effect-capability,
effect-barrier, unknown-barrier, error-discard, analysis-incomplete.

Those eight were the only RepositoryRule implementations. That made the entire
fact subsystem unreachable, so it goes with them: src/facts.rs, the
AnalysisSelection and FactBatch plumbing, the facts sync and facts status subcommands, and the [facts], [effects], and [errors]
configuration sections.

Rules self-register through inventory, so no core file names a rule. Deleting
all eight compiled clean on the first attempt — the coupling that mattered was
never in the rules, it was that main.rs still reached the fact machinery
through CLI subcommands with no rule left to serve.

What replaced entl-codebase

It was doing language-detection-by-extension and a file walk.

  • src/language.rs — the language table: 29 languages with their extensions,
    filenames, shebangs, comment syntax, roles, and the three facets rules gate
    on. A test asserts no two languages claim the same extension.
  • src/walk.rs — the file walk, over the ignore crate, which brings
    .gitignore, .ignore, .git/info/exclude, and hidden-file handling. A walk
    error is returned rather than skipped, because a scan over less than the
    requested tree must not be able to report clean.

observe_rust_compiler did not survive the cut. Its only uses were feeding a
core fact-pack request and the test asserting that.

Old configurations

Someone will have one. A configuration naming a removed rule or section now
fails saying the rule was withdrawn, rather than saying the key is unknown,
which reads like a typo:

straitjacket.toml: [facts] configures exact-clone, near-clone and
library-opportunity, which Straitjacket no longer has. Delete the section.
rule(s) Straitjacket no longer has: error-discard. Remove them from the
configuration.

Verification

Built in a scratch directory with no sibling checkouts present, which is the
thing that could not be done before:

cargo build --locked          Finished `dev` profile
cargo test --locked --workspace   48 passed; 0 failed
cargo fmt --all --check       clean
cargo clippy --locked --workspace --all-targets -- -D warnings   clean

grep -rn 'path = "\.\.\|entl\|infact' Cargo.toml Cargo.lock returns nothing.

Text, JSON, and SARIF output all exercised. The SARIF validates against the
OASIS sarif-schema-2.1.0.json, and ruleIndex values still line up after the
rule removals.

Straitjacket runs its full ruleset on itself and is clean.

Also

  • CI no longer checks out three repositories side by side. One gate job, no
    weekly schedule — that schedule existed to catch unpinned sibling drift.
  • README.md rewritten. It opened with "not ready for use by anyone outside
    this repository" and "Several rules depend on Infact packs that do not exist
    yet". Both are now false.
  • Tests and fixtures for removed rules are deleted, not skipped.
  • notes/todo.txt deleted; it tracked only removed machinery. The durable parts
    moved into notes/field_guide.md, which is rewritten.

Not done here

The repository stays private and nothing is published. The crate is already
named straitjacket, which is the intended crates.io name. Publishing would
additionally want a repository field in Cargo.toml and a version off
0.1.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GbyMWgEUSRGynJwACBvwFu

zmaril and others added 2 commits August 9, 2026 15:04
exact-clone, near-clone, lib-op, effect barrier, effect capability,
unknown barrier, error discard and analysis incomplete all sit behind
Infact or Entl packs that are not published. Cutting them is what lets
straitjacket build on its own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GbyMWgEUSRGynJwACBvwFu
The eight fact-backed rules were the only RepositoryRule implementations,
so removing them made the whole fact subsystem unreachable: facts.rs, the
AnalysisSelection and FactBatch plumbing, and the facts sync/status
subcommands. All of it goes.

That leaves entl-codebase as the last path dependency, used for language
detection and a file walk. src/language.rs owns the language table now and
src/walk.rs walks with the ignore crate. No path dependencies remain, and
straitjacket builds in a checkout with no siblings.

An old configuration naming a removed rule or section fails saying the rule
was withdrawn, rather than saying the key is unknown.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GbyMWgEUSRGynJwACBvwFu
@zmaril
zmaril merged commit eaf1678 into main Aug 9, 2026
1 check passed
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