Skip to content

refactor: Remove dylints#4183

Open
maurolacy wants to merge 13 commits into
constructorfabric:mainfrom
maurolacy:refactor/remove-dylints
Open

refactor: Remove dylints#4183
maurolacy wants to merge 13 commits into
constructorfabric:mainfrom
maurolacy:refactor/remove-dylints

Conversation

@maurolacy

@maurolacy maurolacy commented Jul 6, 2026

Copy link
Copy Markdown

Since dylints have been moved to https://github.com/constructorfabric/cargo-gears, this removes them from here. It also updates the many references to dylints throughout doc comments and docs, removes it from CI, Makefiles, etc.

Closes Bechma/cargo-gears#4.

Summary by CodeRabbit

  • New Features

    • Architecture linting is now available through the cargo gears lint workflow.
    • Added configuration for architecture lint rules and supported rule exclusions.
    • Added validation for gear folder naming conventions.
  • Documentation

    • Updated contributor guidance, architecture references, security guidance, testing instructions, and review templates to reflect the new lint workflow.
    • Added new architecture and component reference documentation.
  • Chores

    • CI and local quality checks now use the consolidated architecture lint workflow.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The repository migrates architecture lint execution from an in-tree Dylint workspace to cargo gears lint, updates CI and developer tooling, removes the old lint workspace, and synchronizes contributor, architecture, security, testing, source comments, and presentation documentation.

Changes

Architecture lint migration

Layer / File(s) Summary
Lint execution and repository cleanup
.github/workflows/ci.yml, Makefile, Gears.toml, dylint.toml, tools/scripts/ci.py, tools/dylint_lints/*
CI and Make targets invoke cargo gears lint --dylint; cargo-gears configuration replaces local Dylint workspace wiring, and obsolete Dylint tooling is removed.
Repository documentation alignment
CONTRIBUTING.md, docs/ARCHITECTURE_MANIFEST.md, docs/TESTING.md, docs/security/*, docs/arch/*, README.md
Contributor, architecture, testing, security, ADR, and checklist references are updated to use cargo-gears architecture lint terminology and commands.
Web and presentation documentation
docs/slides/*, docs/web-docs/*, docs/toolkit_unified_system/*
Slides and web documentation describe the cargo-gears lint suite and add architecture and component reference pages.
Source comments and lint references
gears/*, libs/*, guidelines/*, studio-kit-gears/*
Code comments, design records, and lint-related references identify architecture lint enforcement through cargo-gears without changing runtime logic.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: artifizer, aviator5, mikefalcon77

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: removing dylints.
Linked Issues check ✅ Passed The PR removes the dylint implementation and adds cargo-gears guidance/docs, matching the linked issue’s cleanup goal.
Out of Scope Changes check ✅ Passed The changes stay within the dylint-to-cargo-gears migration scope and do not show unrelated feature work.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@maurolacy
maurolacy force-pushed the refactor/remove-dylints branch from 0ac28cc to 75fb806 Compare July 6, 2026 10:03
Comment thread .github/workflows/ci.yml
Comment thread Makefile
@maurolacy
maurolacy requested a review from Artifizer July 7, 2026 09:44
@maurolacy
maurolacy force-pushed the refactor/remove-dylints branch from 7cb142a to 44ed3de Compare July 7, 2026 09:47
@maurolacy
maurolacy force-pushed the refactor/remove-dylints branch 3 times, most recently from 00058fc to a59a690 Compare July 13, 2026 07:26
@Artifizer

Copy link
Copy Markdown
Contributor

@maurolacy

  1. Do we have an instruction explaining how to add a new dylint rule? I would expect some dev experience like - I add a rule locally on my machine and forked repos, run it on my current gears-rust, then commit new lint and then bump (?) gears-rust to use that new version (?)

  2. Do we have a flag to slip certain lints in cargo gears lint --dylint ... ?

@maurolacy

Copy link
Copy Markdown
Author

@maurolacy

  1. Do we have an instruction explaining how to add a new dylint rule? I would expect some dev experience like - I add a rule locally on my machine and forked repos, run it on my current gears-rust, then commit new lint and then bump (?) gears-rust to use that new version (?)
  2. Do we have a flag to slip certain lints in cargo gears lint --dylint ... ?

Good points. I'll address both in follow-up comments / commits.

@maurolacy

maurolacy commented Jul 13, 2026

Copy link
Copy Markdown
Author
  1. Do we have an instruction explaining how to add a new dylint rule? I would expect some dev experience like - I add a rule locally on my machine and forked repos, run it on my current gears-rust, then commit new lint and then bump (?) gears-rust to use that new version (?)

A guide is out of scope now here. Created one in cargo-gears: constructorfabric/cargo-gears#80.

Also added a section in CONTRIBUTING.md here, outlining the process and referencing the guide above.

@maurolacy
maurolacy force-pushed the refactor/remove-dylints branch 5 times, most recently from 585975b to 5b24b3d Compare July 15, 2026 07:45
@aviator5

Copy link
Copy Markdown
Contributor

@maurolacy could you please remove tools/dylint_lints/de09_gts_layer/de0904_no_hardcoded_gts_prefix/ as well?
That dylint rule is implemented in cargo gears here: constructorfabric/cargo-gears#81

Mauro Lacy added 10 commits July 17, 2026 00:41
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
…ents

Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
…other docs

Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
…docs

Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
Mauro Lacy added 2 commits July 17, 2026 00:41
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
@maurolacy
maurolacy force-pushed the refactor/remove-dylints branch from 4174c38 to 4e60cd0 Compare July 16, 2026 22:42
Co-Authored-By: Claude Opus 4.6
Signed-off-by: Mauro Lacy <mauro.lacy@acronis.com>
@maurolacy
maurolacy force-pushed the refactor/remove-dylints branch from 4e60cd0 to cb41d01 Compare July 17, 2026 08:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (1)
docs/security/fips/adrs/0005-fips-dependency-policy.md (1)

91-91: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Minor wording nitpick.

"a custom cargo gears lint lint" is repetitive. Consider using "rule" instead to match the terminology in the "Option B" heading.

💡 Proposed change
-If even stricter assurance is needed later, a custom `cargo gears lint` lint can walk `use` and `extern crate` paths at the source-code level. This catches a forbidden crate that is **in** the dep graph but the workspace's own code does not directly import — covering workspace discipline beyond what `cargo-deny` enforces. Not built today because Phase A + B closes the practical gap.
+If even stricter assurance is needed later, a custom `cargo gears lint` rule can walk `use` and `extern crate` paths at the source-code level. This catches a forbidden crate that is **in** the dep graph but the workspace's own code does not directly import — covering workspace discipline beyond what `cargo-deny` enforces. Not built today because Phase A + B closes the practical gap.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/security/fips/adrs/0005-fips-dependency-policy.md` at line 91, In the
sentence describing the future source-level check, replace the repeated “a
custom cargo gears lint lint” wording with “a custom cargo gears lint rule,”
matching the terminology used in the “Option B” heading while preserving the
rest of the explanation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 414-415: Pin cargo-gears to an explicit version in the
installation command at .github/workflows/ci.yml lines 414-415, and apply the
exact same version to the cargo-gears installation command in Makefile line 141.
Preserve the existing --locked behavior so CI and local development use
identical, deterministic tool versions.

In `@docs/arch/errors/DECOMPOSITION.md`:
- Line 60: Update the traceability reference in the decomposition document to
use the canonical identifier cpt-cf-errors-component-architecture-lint-rules,
matching the existing reference in DESIGN.md and removing the embedded backticks
from the ID.

In `@docs/REPO_PLAYBOOK.md`:
- Around line 252-253: Remove the stray unmatched opening Markdown brackets from
the Dylint references in the “Anti-patterns” and “Common mistakes” rows of the
checklist table, while preserving the intended link text and destinations.

In `@docs/security/SECURITY.md`:
- Line 452: Update the DE0708 status in docs/security/fips/PRD.md lines 172-173
to reflect that the implemented cargo gears lint is active, or explicitly scope
the deferral to a stricter future rule. The references in
docs/security/SECURITY.md lines 452 and 490 require no direct change; use them
as the current implementation and documentation baseline.

In `@docs/TESTING.md`:
- Around line 321-339: Update the “Custom Architecture Lints” command examples
in the testing documentation to use the CI-equivalent dylint invocation: replace
plain `cargo gears lint` and `make gears-lint` references with `cargo gears lint
--dylint` and the Makefile target `make dylint`, while preserving the existing
`make gts-docs` command.

In `@docs/WHY_GEARS.md`:
- Line 564: Update the Gears architecture-lint reference in the documented
workspace safety pipeline to use the `make gears-lint` target instead of `make
lint`, while preserving the existing `make clippy` and `make safety` references.

In `@Gears.toml`:
- Around line 4-7: Update the config value in the [apps.gears-rust.dev] manifest
entry from the repository-root-relative lint.yml path to config/lint.yml,
preserving the existing gears configuration.

In `@gears/system/cluster/docs/TRACEABILITY-AUDIT.md`:
- Line 32: Update the marker-source sentence in TRACEABILITY-AUDIT.md to use the
same architecture-lint wording as the external cargo-gears CLI, or explicitly
describe how those markers are counted; keep the references to cluster-sdk/tests
and cluster/examples unchanged.

---

Nitpick comments:
In `@docs/security/fips/adrs/0005-fips-dependency-policy.md`:
- Line 91: In the sentence describing the future source-level check, replace the
repeated “a custom cargo gears lint lint” wording with “a custom cargo gears
lint rule,” matching the terminology used in the “Option B” heading while
preserving the rest of the explanation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread .github/workflows/ci.yml
Comment on lines +414 to +415
- name: Install cargo-gears
run: cargo install --locked cargo-gears

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Pin the cargo-gears version.

The cargo-gears tool is currently installed dynamically without pinning a specific version. Consequently, the latest published version will be downloaded on every run. This can cause unexpected CI or local build failures if a newly published release of cargo-gears introduces breaking CLI changes or new, stricter architecture lints that the repository currently violates.

  • .github/workflows/ci.yml#L414-L415: update the command to pin a specific version, e.g., cargo install --locked cargo-gears@<version>, to guarantee determinism in the pipeline.
  • Makefile#L141: pin the exact same version here to ensure that developers' local environments identically match the CI behavior.
📍 Affects 2 files
  • .github/workflows/ci.yml#L414-L415 (this comment)
  • Makefile#L141-L141
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 414 - 415, Pin cargo-gears to an
explicit version in the installation command at .github/workflows/ci.yml lines
414-415, and apply the exact same version to the cargo-gears installation
command in Makefile line 141. Preserve the existing --locked behavior so CI and
local development use identical, deterministic tool versions.

#### 1.5 `cargo gears lint` enforcement rules

> Traces to: `cpt-cf-errors-component-dylint-rules`, PRD § 12 Risks — "LLM agents bypass compile checks"
> Traces to: `cpt-cf-errors-component-`cargo gears lint`-rules`, PRD § 12 Risks — "LLM agents bypass compile checks"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Keep the traceability ID valid.

The inline backticks make this identifier invalid: cpt-cf-errors-component-cargo gears lint-rules. Use the canonical ID already used in docs/arch/errors/DESIGN.md: cpt-cf-errors-component-architecture-lint-rules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/arch/errors/DECOMPOSITION.md` at line 60, Update the traceability
reference in the decomposition document to use the canonical identifier
cpt-cf-errors-component-architecture-lint-rules, matching the existing reference
in DESIGN.md and removing the embedded backticks from the ID.

Comment thread docs/REPO_PLAYBOOK.md
Comment on lines +252 to +253
| Anti-patterns | [x] `p2` | [docs/checklists/](./checklists), [architecture lints via cargo gears lint | Add unified anti-pattern catalog |
| Common mistakes | [x] `p2` | [architecture lint rules and checklists (in cargo-gears CLI) | Add “top mistakes” short guide |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix stray Markdown link brackets.

The replacement of the old Dylint links left behind unmatched opening brackets [.

💡 Proposed fix
-| Anti-patterns | [x] `p2` | [docs/checklists/](./checklists), [architecture lints via cargo gears lint | Add unified anti-pattern catalog |
-| Common mistakes | [x] `p2` | [architecture lint rules and checklists (in cargo-gears CLI) | Add “top mistakes” short guide |
+| Anti-patterns | [x] `p2` | [docs/checklists/](./checklists), architecture lints via `cargo gears lint` | Add unified anti-pattern catalog |
+| Common mistakes | [x] `p2` | architecture lint rules and checklists (in `cargo-gears` CLI) | Add “top mistakes” short guide |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Anti-patterns | [x] `p2` | [docs/checklists/](./checklists), [architecture lints via cargo gears lint | Add unified anti-pattern catalog |
| Common mistakes | [x] `p2` | [architecture lint rules and checklists (in cargo-gears CLI) | Add “top mistakes” short guide |
| Anti-patterns | [x] `p2` | [docs/checklists/](./checklists), architecture lints via `cargo gears lint` | Add unified anti-pattern catalog |
| Common mistakes | [x] `p2` | architecture lint rules and checklists (in `cargo-gears` CLI) | Add “top mistakes” short guide |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/REPO_PLAYBOOK.md` around lines 252 - 253, Remove the stray unmatched
opening Markdown brackets from the Dylint references in the “Anti-patterns” and
“Common mistakes” rows of the checklist table, while preserving the intended
link text and destinations.

Comment thread docs/security/SECURITY.md
**Phase A** (shipped) bans crates not currently in the graph — zero-pain regression gate: future PRs adding `md2`/`md4`/`ripemd`, `chacha20poly1305`/`salsa20`, the Curve25519 family (`x25519-dalek`, `ed25519-dalek`, …), alternative TLS frameworks (`openssl`, `boring`, `native-tls`), or alternative rustls CryptoProviders (`rustls-symcrypt`, `rustls-mbedcrypto-provider`, `rustls-openssl`, `rustls-rustcrypto`, `rustls-graviola`, `rustls-wolfcrypto-provider`, `boring-rustls-provider`) all fail the gate.

**Non-FIPS hasher guard** — Dylint lint **DE0708** (`no_non_fips_hasher`) rejects new `sha2`/`sha1`/`md5` imports outside an explicit allow-list (one entry: file-storage content hashing — see [Non-cryptographic `sha2` and `rand` usage](#non-cryptographic-sha2-and-rand-usage)), preventing unreviewed non-FIPS crypto usage from creeping in. All previous direct use sites have been replaced with inline FNV-1a (a deterministic, non-cryptographic fingerprint): `libs/toolkit-odata/src/pagination.rs` (cursor consistency) and `oidc-authn-plugin/src/infra/token_client.rs` (credential cache key). `sha2` remains in the dependency graph as a Phase B transitive (via `sqlx-core`, `sqlx-postgres`, `lopdf`, `rust-embed-utils`) and will be promoted to Phase A once those pull-throughs are eliminated.
**Non-FIPS hasher guard** — Architecture lint **DE0708** (`no_non_fips_hasher`, via `cargo gears lint`) rejects new `sha2`/`sha1`/`md5` imports outside an explicit allow-list (one entry: file-storage content hashing — see [Non-cryptographic `sha2` and `rand` usage](#non-cryptographic-sha2-and-rand-usage)), preventing unreviewed non-FIPS crypto usage from creeping in. All previous direct use sites have been replaced with inline FNV-1a (a deterministic, non-cryptographic fingerprint): `libs/toolkit-odata/src/pagination.rs` (cursor consistency) and `oidc-authn-plugin/src/infra/token_client.rs` (credential cache key). `sha2` remains in the dependency graph as a Phase B transitive (via `sqlx-core`, `sqlx-postgres`, `lopdf`, `rust-embed-utils`) and will be promoted to Phase A once those pull-throughs are eliminated.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== Search DE0708 / no_non_fips_hasher / cargo gears lint ==\n'
rg -n --hidden -S 'DE0708|no_non_fips_hasher|cargo gears lint|fips140=only|sha2|sha1|md5' \
  docs .github . 2>/dev/null | sed -n '1,220p'

printf '\n== Show relevant SECURITY.md sections ==\n'
sed -n '430,520p' docs/security/SECURITY.md | cat -n

printf '\n== Show relevant FIPS PRD section ==\n'
sed -n '150,190p' docs/security/fips/PRD.md | cat -n

printf '\n== Find CI/config files mentioning gears/lint/fips ==\n'
git ls-files | rg '(^|/)(\.github/|.*(Cargo|rust|fips|security).*(toml|yaml|yml|md)$)'

Repository: constructorfabric/gears-rust

Length of output: 50384


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== docs/security/fips/PRD.md around lines 160-180 ==\n'
sed -n '160,180p' docs/security/fips/PRD.md | cat -n

printf '\n== docs/security/fips/adrs/0005-fips-dependency-policy.md around source-level enforcement ==\n'
sed -n '20,120p' docs/security/fips/adrs/0005-fips-dependency-policy.md | cat -n

printf '\n== lint config for DE0708 ==\n'
sed -n '1,80p' dylint.toml | cat -n

printf '\n== CI workflow architecture lint job ==\n'
sed -n '380,435p' .github/workflows/ci.yml | cat -n

printf '\n== any direct code references to no_non_fips_hasher ==\n'
rg -n -S 'no_non_fips_hasher|DE0708' gears docs .github dylint.toml deny-fips.toml Cargo.toml | sed -n '1,160p'

Repository: constructorfabric/gears-rust

Length of output: 18271


Update the FIPS PRD’s DE0708 status. cargo gears lint --dylint is already wired into CI, and DE0708 is documented as active in docs/security/SECURITY.md; the Phase C deferral in docs/security/fips/PRD.md#L172-L173 is stale. Keep the PRD aligned with the implemented lint, or scope it to a stricter future rule if that’s the intent.

📍 Affects 2 files
  • docs/security/SECURITY.md#L452-L452 (this comment)
  • docs/security/SECURITY.md#L490-L490
  • docs/security/fips/PRD.md#L172-L173
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/security/SECURITY.md` at line 452, Update the DE0708 status in
docs/security/fips/PRD.md lines 172-173 to reflect that the implemented cargo
gears lint is active, or explicitly scope the deferral to a stricter future
rule. The references in docs/security/SECURITY.md lines 452 and 490 require no
direct change; use them as the current implementation and documentation
baseline.

Comment thread docs/TESTING.md
Comment on lines +321 to +339
## 8. Custom Architecture Lints

`Dylint` is the main project-specific lint layer. Unlike generic linting tools such as
`clippy`, it enforces Gears-specific architectural and repository rules: layer
separation, DTO placement, REST conventions, security-sensitive patterns, documentation
constraints, and GTS-related validation.
Custom architecture lints are the main project-specific lint layer. Unlike generic
linting tools such as `clippy`, they enforce Gears-specific architectural and repository
rules: layer separation, DTO placement, REST conventions, security-sensitive patterns,
documentation constraints, and GTS-related validation.

The lints are shipped as part of the `cargo-gears` CLI (crate `cargo-gears-lints` in the
separate `cf-cli` repository) and are run via `cargo gears lint`.

Useful local commands include:

```bash
make dylint # run custom lints across the workspace
make dylint-list # list available Dylint lints
make dylint-test # run lint UI / golden tests
make gts-docs # validate GTS identifiers in docs and schema files
cargo gears lint # run custom lints across the workspace
make gears-lint # Makefile shortcut for the above
make gts-docs # validate GTS identifiers in docs and schema files
```

The CI `dylint` job both tests the lint crates themselves and applies the lints to the
workspace. For the current lint catalog and development notes, see
[`tools/dylint_lints/README.md`](../tools/dylint_lints/README.md).
The CI `lint` job applies the architecture lints to the workspace on every PR.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

rg -n 'cargo gears lint|--dylint|gears-lint|make lint' .github/workflows/ci.yml docs/TESTING.md Makefile tools/scripts/ci.py

Repository: constructorfabric/gears-rust

Length of output: 1648


🏁 Script executed:

set -euo pipefail

printf '\n== ci workflow excerpt ==\n'
sed -n '388,425p' .github/workflows/ci.yml

printf '\n== Makefile excerpt ==\n'
sed -n '288,302p' Makefile

printf '\n== docs/TESTING.md excerpt ==\n'
sed -n '320,350p' docs/TESTING.md

printf '\n== ci.py lint references ==\n'
rg -n 'lint|dylint|gears' tools/scripts/ci.py

Repository: constructorfabric/gears-rust

Length of output: 4302


🏁 Script executed:

set -euo pipefail

printf '\n== gears-lint references ==\n'
rg -n 'gears-lint|^dylint:|^lint:' Makefile docs/TESTING.md .github/workflows/ci.yml

printf '\n== Makefile around lint targets ==\n'
sed -n '280,310p' Makefile

Repository: constructorfabric/gears-rust

Length of output: 1661


Use make dylint here The Makefile target is dylint, and CI runs cargo gears lint --dylint, so this section should point to the same local command instead of make gears-lint / plain cargo gears lint.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/TESTING.md` around lines 321 - 339, Update the “Custom Architecture
Lints” command examples in the testing documentation to use the CI-equivalent
dylint invocation: replace plain `cargo gears lint` and `make gears-lint`
references with `cargo gears lint --dylint` and the Makefile target `make
dylint`, while preserving the existing `make gts-docs` command.

Comment thread docs/WHY_GEARS.md
- **Tenant-safe ORM use** — `clippy.toml` configures `disallowed-methods` for direct SeaORM `all`, `one`, `count`, update, and delete execution methods, with reasons pointing developers to secure scoped wrappers.

Go and C# teams can enforce many of these rules with `golangci-lint`, `go vet`, Roslyn analyzers, and custom build policy. The practical difference in Gears is that the Rust compiler, Clippy, custom `dylint` rules, and Cargo feature checks are already wired into one standard workspace safety pipeline (`make clippy`, `make lint`, `make dylint`, `make safety`).
Go and C# teams can enforce many of these rules with `golangci-lint`, `go vet`, Roslyn analyzers, and custom build policy. The practical difference in Gears is that the Rust compiler, Clippy, custom architecture lints (via `cargo gears lint`), and Cargo feature checks are already wired into one standard workspace safety pipeline (`make clippy`, `make lint`, `make safety`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the architecture-lint Make target here.

make lint is documented as the generic warnings check, while make gears-lint runs cargo gears lint. Replacing make dylint with make lint makes this sentence point to the wrong command for custom architecture lints.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/WHY_GEARS.md` at line 564, Update the Gears architecture-lint reference
in the documented workspace safety pipeline to use the `make gears-lint` target
instead of `make lint`, while preserving the existing `make clippy` and `make
safety` references.

Comment thread Gears.toml
Comment on lines +4 to +7
[apps.gears-rust.dev]
config = "lint.yml"
gears = []

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the location of lint.yml
fd lint.yml

Repository: constructorfabric/gears-rust

Length of output: 182


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the manifest entry and the code that loads its config path
git ls-files 'Gears.toml' 'config/lint.yml' | sed -n '1,20p'
echo '--- Gears.toml ---'
cat -n Gears.toml
echo '--- search for config path handling ---'
rg -n 'config\s*=|lint\.yml|Gears\.toml|cargo-gears|manifest' -S .

Repository: constructorfabric/gears-rust

Length of output: 50385


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the manifest and any path resolution logic for the config field
cat -n Gears.toml
echo '---'
rg -n 'config\s*=|config path|resolve.*config|manifest.*path|from_manifest|PathBuf::from|canonicalize' -S .

Repository: constructorfabric/gears-rust

Length of output: 50385


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- repo files around manifest/gear config ---'
git ls-files | rg '(^|/)(Gears\.toml|Cargo\.toml|.*gear.*|.*manifest.*|.*config.*|src/|crates/)' | head -n 200

echo '--- Gears.toml ---'
cat -n Gears.toml

echo '--- find Rust files mentioning Gears.toml or config field ---'
rg -n --glob '!**/target/**' --glob '!**/*.min.*' --glob '!**/dist/**' --glob '!**/build/**' \
  'Gears\.toml|config\s*=|lint\.yml|cargo-gears|manifest' \
  src .github crates . 2>/dev/null | head -n 200

Repository: constructorfabric/gears-rust

Length of output: 11482


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- repo files around manifest/gear config ---'
git ls-files | rg '(^|/)(Gears\.toml|Cargo\.toml|.*gear.*|.*manifest.*|.*config.*|src/|crates/)' | head -n 200

echo '--- Gears.toml ---'
cat -n Gears.toml

echo '--- find Rust files mentioning Gears.toml or config field ---'
rg -n --glob '!**/target/**' --glob '!**/*.min.*' --glob '!**/dist/**' --glob '!**/build/**' \
  'Gears\.toml|config\s*=|lint\.yml|cargo-gears|manifest' \
  src crates .github 2>/dev/null | head -n 200

Repository: constructorfabric/gears-rust

Length of output: 11482


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'top-level files:\n'
git ls-files | awk -F/ 'NF==1{print}' | sort

printf '\npossible source files:\n'
git ls-files | rg '^(src|crates|apps)/.*\.(rs|toml)$' | head -n 200

printf '\nmanifest-related files:\n'
git ls-files | rg 'Gears\.toml|lint\.yml|Cargo\.toml|manifest' | head -n 200

Repository: constructorfabric/gears-rust

Length of output: 5038


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- exact references to lint.yml / Gears.toml in tracked source ---'
git ls-files '*.rs' '*.toml' | xargs rg -n --no-messages 'Gears\.toml|lint\.yml|config\s*=' | head -n 200

Repository: constructorfabric/gears-rust

Length of output: 22926


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- Rust files mentioning manifest/config logic ---'
git ls-files '*.rs' | xargs rg -n --no-messages 'Gears\.toml|config\s*=|lint\.yml|PathBuf|manifest|toml' | head -n 200

echo '--- tree of likely source roots ---'
fd -t f -d 2 . .

Repository: constructorfabric/gears-rust

Length of output: 20649


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search only Rust sources for manifest/config handling.
rg -n --glob '*.rs' --glob '!**/target/**' \
  'Gears\.toml|config\s*=|lint\.yml|PathBuf::from|canonicalize|manifest' \
  .

Repository: constructorfabric/gears-rust

Length of output: 50385


Point config at config/lint.yml. config = "lint.yml" points at the manifest root, but the file lives under config/, so loading will fail if the path is resolved from Gears.toml.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Gears.toml` around lines 4 - 7, Update the config value in the
[apps.gears-rust.dev] manifest entry from the repository-root-relative lint.yml
path to config/lint.yml, preserving the existing gears configuration.

§2 ("Requirements Covered" per feature).
- **Marker source**: `@cpt-dod:` markers grepped from `cluster-sdk/src`,
`cluster-sdk/tests`, `cluster/examples`, and `tools/dylint_lints/de14_cluster`.
`cluster-sdk/tests`, `cluster/examples`, and architecture lints (in `cargo-gears` CLI).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n 'lint crate|cargo-gears|cargo gears lint' gears/system/cluster/docs/TRACEABILITY-AUDIT.md

Repository: constructorfabric/gears-rust

Length of output: 332


🏁 Script executed:

#!/bin/bash
sed -n '24,40p;100,112p' gears/system/cluster/docs/TRACEABILITY-AUDIT.md

Repository: constructorfabric/gears-rust

Length of output: 1761


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- matches ---'
rg -n 'cargo-gears|lint crate|architecture lints|`@cpt-dod`:' -S .
printf '%s\n' '--- files named cargo-gears ---'
fd -a 'cargo-gears|lint' .

Repository: constructorfabric/gears-rust

Length of output: 50384


Sync the marker-source wording with cargo-gears. Line 32 points to architecture lints in the external CLI, but the later lint crate wording at lines 105-107 is stale. Update that sentence to match the external source, or explain how those markers are counted.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gears/system/cluster/docs/TRACEABILITY-AUDIT.md` at line 32, Update the
marker-source sentence in TRACEABILITY-AUDIT.md to use the same
architecture-lint wording as the external cargo-gears CLI, or explicitly
describe how those markers are counted; keep the references to cluster-sdk/tests
and cluster/examples unchanged.

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.

Clean dylint in main repo

4 participants