Repository navigation
feat(tinydocs-bus): SlideSpec::new constructor over resolved SlideImage values - #41
Conversation
…ge values Hosts resolve image sources under their own policy and build slides from text fields plus bus SlideImage bytes. Pins the wire shape with a serde test. CONTRACT_VERSION stays 4. Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
✨ Finishing Touches
Comment |
Tiny Sweeper reviewTiny Sweeper completed its review; deterministic results follow. State: Ready for maintainer review Review snapshot
Completeness: Complete What changedAdds a public, `#[must_use]`, documented `SlideSpec::new` constructor that takes a `title: impl Into<String>`, optional `body`, `bullets`, optional `speaker_notes`, and `images: Vec<SlideImage>`, and assigns each directly to the corresponding struct field with no branching, transformation, or validation. Because every field is copied one-to-one, the serialized `SlideSpec` and `SlideImage` key sets are unchanged and `CONTRACT_VERSION` is untouched. A crate-local unit test is added that builds a slide two ways (constructor and struct literal), asserts they are equal, pins the sorted JSON key sets for the slide and its image, and round-trips through `serde_json`. No production call sites are modified in this diff. FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. How this fits togetherflowchart LR
n0["SlideSpec<br/>changed"]:::changed
n1["spec_defaults_optional_fields<br/>changed"]:::changed
n2["spec"]:::impacted
n3["assert_rejects"]:::impacted
n4["...cts_over_long_slide_text_naming_its_index"]:::impacted
n5["PresentationSpec"]:::impacted
n1 -->|uses| n5
n2 -->|uses| n5
n3 -->|uses| n5
n4 -->|uses| n0
n4 -->|calls| n2
n4 -->|tests| n2
n4 -->|calls| n3
n4 -->|tests| n3
n5 -->|uses| n0
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0022 · 203,065 in / 18,124 out · 49,536 cached (24%) · ladder/vectors-oai3, deepseek-v4.1-flash · 141 embedded
critique: $0.0007 · 81,127 in / 10,145 out · 39,936 cached (49%) · deepseek-v4.1-flash
security: $0.0006 · 59,507 in / 1,419 out · 3,584 cached (6%) · deepseek-v4.1-flash
tests: $0.0007 · 46,685 in / 4,181 out · 1,920 cached (4%) · deepseek-v4.1-flash
description: $0.0000 · 13,075 in / 327 out · 4,096 cached (31%) · deepseek-v4.1-flash
Adds
SlideSpec::new(title, body, bullets, speaker_notes, images)to tinydocs-bus so hosts can build slides without the struct literal. Takes already-resolved busSlideImagevalues. Testslide_spec_new_matches_literal_and_pins_wire_shapepins the wire shape. CONTRACT_VERSION stays 4.Closes #40
Part of tinyhumansai/openhuman#7578
Part of tinyhumansai/openhuman#7527
Tests: cargo test -p tinydocs-bus (50 passed); clippy 1.98 clean.