Skip to content

docs(readme): rewrite the architecture section to match the tree - #267

Closed
LeadcodeDev wants to merge 1 commit into
chantier/audit-2026-09from
docs/readme-architecture
Closed

LeadcodeDev wants to merge 1 commit into
chantier/audit-2026-09from
docs/readme-architecture

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

Severity Medium, category coherence. Location: README.md:2034

Impact

Every structural claim in this block is false. Verified: there is no root src/ (ls src → No such file or directory, the tree is crates/*/src); there is no layout/ directory (ls crates/rustmotion-core/src/layout → No such file or directory — taffy replaced it); the Widget trait does not exist (grep -rn "Widget" crates/ returns exactly two hits, both comments, one of which is crates/rustmotion-core/src/traits/painter.rs:1: "Painter trait — replaces the old Widget::render"); the pipeline is box_tree → layout_pass → paint_pass, not "measure → layout → paint"; and the Component enum in crates/rustmotion-components/src/lib.rs:355-418 has 60 variants, not 51 (CLAUDE.md's "Composants disponibles (60)" is the correct count). The "CLI Reference" section (README.md:88-104) documents only rustmotion render and 9 of its flags, while crates/rustmotion/src/cli/mod.rs declares 11 subcommands (Render, Concat, Still, Captions, Validate, Batch, Schema, Info, Skills, Completions, plus nested) — validate, the gate CLAUDE.md makes mandatory before delivering any scenario, is entirely absent, as are --watch, --frames, --var, --props, --strict-anim. The branch HEAD (4d54504 fix(crates): ship the README with every published crate) adds readme = "../../README.md" to all four crate manifests, so this document becomes the front page of rustmotion, rustmotion-core, rustmotion-components and rustmotion-html on crates.io and docs.rs. A contributor following it looks for src/components/ and implements Widget.

Fix

Rewrite the Architecture block from the (accurate) one in crates/rustmotion/CLAUDE.md: the crates/ workspace layout, the box_tree → layout_pass → paint_pass pipeline, the Painter trait signature, and 60 components. Extend the CLI Reference to cover the other 10 subcommands, validate first. Add a test in the same family as crates/rustmotion/tests/skill_files_match_disk.rs asserting the README's component count equals Component's variant count, so this cannot silently drift again now that it is published metadata.

Evidence the audit read

├── components/              # 51 components (each implements Widget trait)
├── engine/
│   ├── render/              # Render pipeline (component, scene, background, transforms)
│   └── renderer.rs          # Skia drawing primitives
├── layout/                  # Flex/grid layout engines
├── traits/                  # Widget, Styled, Animatable, Timed, Container

Every component implements the `Widget` trait:

trait Widget {
    fn paint(&self, canvas: &Canvas, ctx: &PaintContext) -> Result<()>;
    fn measure(&self, constraints: &Constraints) -> (f32, f32);
    fn layout(&self, constraints: &Constraints) -> LayoutNode;

Based directly on the chantier branch.

Part of the September 2026 audit remediation chantier. Refs #220 (RM-02).

@LeadcodeDev LeadcodeDev added the bug Something isn't working label Sep 21, 2026
@LeadcodeDev LeadcodeDev self-assigned this Sep 21, 2026
@LeadcodeDev
LeadcodeDev added this pull request to stack #276 September 22, 2026 05:51
@LeadcodeDev
LeadcodeDev force-pushed the docs/readme-architecture branch 6 times, most recently from 7e218eb to 4a734ee Compare September 22, 2026 09:06
Every structural claim in this block is false. Verified: there is no root `src/` (`ls src` → No such file or directory, the tree is `crates/*/src`); there is no `layout/` directory (`ls crates/rustmotion-core/src/layout` → No such file or directory — taffy replaced it); the `Widget` trait does not exist (`grep -rn "Widget" crates/` returns exactly two hits, both comments, one of which is `crates/rustmotion-core/src/traits/painter.rs:1`: "`Painter` trait — replaces the old `Widget::render`"); the pipeline is box_tree → layout_pass → paint_pass, not "measure → layout → paint"; and the `Component` enum in `crates/rustmotion-components/src/lib.rs:355-418` has 60 variants, not 51 (CLAUDE.md's "Composants disponibles (60)" is the correct count). The "CLI Reference" section (README.md:88-104) documents only `rustmotion render` and 9 of its flags, while `crates/rustmotion/src/cli/mod.rs` declares 11 subcommands (Render, Concat, Still, Captions, Validate, Batch, Schema, Info, Skills, Completions, plus nested) — `validate`, the gate CLAUDE.md makes mandatory before delivering any scenario, is entirely absent, as are `--watch`, `--frames`, `--var`, `--props`, `--strict-anim`. The branch HEAD (`4d54504 fix(crates): ship the README with every published crate`) adds `readme = "../../README.md"` to all four crate manifests, so this document becomes the front page of rustmotion, rustmotion-core, rustmotion-components and rustmotion-html on crates.io and docs.rs. A contributor following it looks for `src/components/` and implements `Widget`.

Refs #220
@LeadcodeDev
LeadcodeDev force-pushed the docs/readme-architecture branch from 4a734ee to 11be118 Compare September 22, 2026 09:09
@LeadcodeDev

Copy link
Copy Markdown
Owner Author

Closed and reopened as a fresh pull request: GitHub registered this one as part of a stack, and a stacked pull request cannot be merged through either the GraphQL or the REST merge endpoint. The finding itself is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant