Skip to content

refactor: name the member directories for their role, not their crate - #10

Merged
h4x0r merged 2 commits into
mainfrom
chore/role-named-member-dirs
Aug 24, 2026
Merged

h4x0r merged 2 commits into
mainfrom
chore/role-named-member-dirs

Conversation

@h4x0r

@h4x0r h4x0r commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Renames the workspace member directories to match the role, not the crate:

trash-core/ → core/, trash-forensic/ → forensic/

No crate names change. The name lives in Cargo.toml, not the folder, so nothing published moves — cargo metadata reports the same package names before and after.

Why

CLAUDE.md line 93 and ADR-0008 already say this: "two members: core/ → <x>-core and forensic/ → <x>-forensic". A fleet survey found 8 of 70 workspaces had drifted to naming the directory after the crate. Nothing mechanical ever checked, so it was never caught in review.

It isn't only tidiness — the duplication breaks tooling. find -type d -name trash-forensic matches two directories, the repo and the member inside it, so a script that resolves a repo by name silently reads the wrong Cargo.toml. That happened twice while surveying this exact problem, and produced a confident "this repo has no workspace members" for five repos that have them. core/ and forensic/ cannot collide with a repo name.

What else moved

A rename that only moves directories leaves silent breakage behind, so this also updates:

  • the workspace members list and inter-crate path = deps
  • the fuzz crate's ../ path dependencies
  • paths: filters in .github/workflows — these matter most: left stale they simply stop matching, and the workflow never fires again. Green by never running.
  • doc/ADR file-path citations

URLs were deliberately left alone (the docs site lives at securityronin.github.io/trash-forensic/, which a blanket substitution would have rewritten).

Verification

Full test suite, fmt --check and clippy -D warnings clean; cargo metadata confirms package names unchanged.

🤖 Generated with Claude Code

h4x0r added 2 commits August 23, 2026 15:00
`trash-core/` -> `core/`, `trash-forensic/` -> `forensic/`. No crate name
changes, so nothing published moves -- the name lives in Cargo.toml, not in the
folder.

This is what CLAUDE.md line 93 and ADR-0008 have always said ("two members:
`core/` -> `<x>-core` and `forensic/` -> `<x>-forensic`"). A fleet survey found 8
of 70 workspaces had drifted to naming the directory after the crate; nothing
mechanical ever checked, so 70 code reviews did not catch it.

The duplication is not only untidy, it breaks tooling. `find -type d -name
trash-forensic` matches TWO directories -- the repo and the member inside it --
so a script that resolves a repo by name silently reads the wrong Cargo.toml.
That happened twice while surveying this very problem, and produced a confident
"this repo has no workspace members" for five repos that have them. `core/` and
`forensic/` cannot collide with a repo name.

Updated beyond the two `git mv`s, because a rename that only moves directories
leaves silent breakage behind:

  - root Cargo.toml: members list and the inter-crate `path = "core"`
  - fuzz/Cargo.toml: both `../` path deps
  - .github/workflows/fuzz.yml: the `paths:` filters, which would otherwise stop
    matching and the fuzz workflow would simply never fire again -- green by
    never running
  - docs/PRD.md and all eight ADRs, which cite evidence by file path

URLs were deliberately left alone: the docs site is
`securityronin.github.io/trash-forensic/`, and a blanket substitution would have
rewritten it.

84 tests across 6 targets pass; fmt, clippy -D warnings and mkdocs --strict clean;
the fuzz manifest still resolves.
@h4x0r
h4x0r merged commit 055b39e into main Aug 24, 2026
21 checks 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