Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ jobs:
- name: Run cargo audit
env:
CARGO_TERM_COLOR: always
run: cargo audit --deny warnings
run: |
cargo audit --deny warnings \
--ignore RUSTSEC-2024-0436 \
--ignore RUSTSEC-2021-0127

deny:
name: Dependency Policy (cargo-deny)
Expand Down
4 changes: 4 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ allow = [
"MIT-0",
"Unicode-3.0",
"Unlicense",
"Zlib",
"OFL-1.1",
"Ubuntu-font-1.0",
"MPL-2.0",
Comment on lines +19 to +22
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, find and examine the deny.toml file
find . -name "deny.toml" -type f

Repository: flyingrobots/echo

Length of output: 72


🏁 Script executed:

# Search for RUSTSEC-2021-0127 in the entire codebase
rg "RUSTSEC-2021-0127" --type toml --type yaml --type yml

Repository: flyingrobots/echo

Length of output: 88


🏁 Script executed:

# Search for any advisory-related files or documentation
fd -e md -e txt | xargs grep -l "RUSTSEC-2024-0436\|RUSTSEC-2021-0127\|advisory" 2>/dev/null | head -20

Repository: flyingrobots/echo

Length of output: 116


🏁 Script executed:

# Check deny.toml size and read it
wc -l ./deny.toml && echo "---" && cat -n ./deny.toml

Repository: flyingrobots/echo

Length of output: 1806


🏁 Script executed:

# Read decision-log.md
wc -l ./docs/decision-log.md && echo "---" && cat -n ./docs/decision-log.md

Repository: flyingrobots/echo

Length of output: 42351


🏁 Script executed:

# Read execution-plan.md
wc -l ./docs/execution-plan.md && echo "---" && cat -n ./docs/execution-plan.md

Repository: flyingrobots/echo

Length of output: 37400


🏁 Script executed:

# Search for RUSTSEC-2021-0127 everywhere (including markdown)
rg "RUSTSEC-2021-0127"

Repository: flyingrobots/echo

Length of output: 920


🏁 Script executed:

# Check GitHub workflows for advisory handling
find .github/workflows -name "*.yml" -o -name "*.yaml" | xargs cat | grep -A 5 -B 5 "RUSTSEC"

Repository: flyingrobots/echo

Length of output: 774


🏁 Script executed:

# Search for which dependencies might use the new licenses
rg "Zlib|OFL-1.1|Ubuntu-font|MPL-2.0" --type toml

Repository: flyingrobots/echo

Length of output: 165


🏁 Script executed:

# Check if there's a Cargo.lock that might reveal dependencies
wc -l Cargo.lock && head -200 Cargo.lock | grep -A 2 "name = " | head -50

Repository: flyingrobots/echo

Length of output: 1401


🏁 Script executed:

# Search Cargo.lock for license metadata for packages using the new licenses
rg -A 10 "^name = " Cargo.lock | grep -B 1 -E "license = \"(Zlib|OFL|Ubuntu|MPL)" | head -40

Repository: flyingrobots/echo

Length of output: 43


🏁 Script executed:

# Try an alternative: search for common crates known to use these licenses
rg "fontdue|ab_glyph|rusttype" Cargo.lock -A 5

Repository: flyingrobots/echo

Length of output: 801


Add RUSTSEC-2021-0127 to the advisories ignore list and document rationale for new licenses.

Lines 19–22 add four new licenses ("Zlib", "OFL-1.1", "Ubuntu-font-1.0", "MPL-2.0") without justification. Additionally, deny.toml omits RUSTSEC-2021-0127 from the advisories section despite both GitHub workflows (security-audit.yml and ci.yml) ignoring it. This creates two problems:

  1. Incomplete advisory policy: RUSTSEC-2021-0127 (serde_cbor legacy advisory) is suppressed in CI workflows but missing from deny.toml, which should be the single source of truth for dependency policies.

  2. Undocumented license allowlist: No rationale exists for the four new licenses. Compare to line 43–45, which provides essential context (wgpu/paste unmaintainedness). Each new license needs documented:

    • Which dependency requires it
    • Why it aligns with project policy

Add RUSTSEC-2021-0127 to lines 42–46 and precede lines 19–22 with a comment block explaining the license rationale:

[advisories]
ignore = [
    # wgpu transitively depends on paste 1.0.15; upstream is unmaintained but
    # tracked in wgpu#5185. Safe to ignore until wgpu publishes a replacement.
    "RUSTSEC-2024-0436",
+   # serde_cbor is a legacy dependency with an unmaintained advisory; ignoring
+   # prevents CI flakiness if re-introduced through cached lockfiles.
+   "RUSTSEC-2021-0127",
]
    "Unlicense",
+   # Font rendering (ab_glyph via egui): Zlib, OFL-1.1, Ubuntu-font-1.0.
+   # MPL-2.0 accepted for [specify: which dep].
    "Zlib",
    "OFL-1.1",
    "Ubuntu-font-1.0",
    "MPL-2.0",
📝 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
"Zlib",
"OFL-1.1",
"Ubuntu-font-1.0",
"MPL-2.0",
"Zlib",
# Font rendering (ab_glyph via egui): Zlib, OFL-1.1, Ubuntu-font-1.0.
# MPL-2.0 accepted for [specify: which dep].
"Zlib",
"OFL-1.1",
"Ubuntu-font-1.0",
"MPL-2.0",

]

# Modernized for cargo-deny >=0.14.21 (PR #611):
Expand Down
3 changes: 2 additions & 1 deletion docs/decision-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

| Date | Context | Decision | Rationale | Consequence |
| ---- | ------- | -------- | --------- | ----------- |
| 2025-12-10 | CI cargo-audit warnings | Keep `cargo audit --deny warnings` green by ignoring RUSTSEC-2024-0436 (paste unmaintained via wgpu/metal) and RUSTSEC-2021-0127 (serde_cbor legacy advisory) in `security-audit.yml`. | Paste is an unmaintained transitive dep of wgpu with no downstream replacement yet; serde_cbor was removed from the codebase but may reappear through cached lockfiles—ignoring prevents CI flakiness while we track upstream updates. | Security audit job passes; advisories remain documented and will surface again once upstreams ship replacements or if serde_cbor re-enters the tree. |
| 2025-12-10 | CI cargo-audit warnings | Keep `cargo audit --deny warnings` green by ignoring RUSTSEC-2024-0436 (paste unmaintained via wgpu/metal) and RUSTSEC-2021-0127 (serde_cbor legacy advisory) in both `security-audit.yml` and `ci.yml`. | Paste is an unmaintained transitive dep of wgpu with no downstream replacement yet; serde_cbor was removed from the codebase but may reappear through cached lockfiles—ignoring prevents CI flakiness while we track upstream updates. | Security audit jobs now ignore these advisories in both workflows; advisories remain documented and will surface again once upstreams ship replacements or if serde_cbor re-enters the tree. |
| 2025-12-10 | CI cargo-deny index warnings | Prime crates.io index with `cargo fetch --locked` in the `deny` job before running `cargo-deny` (ci.yml). | `cargo deny` was emitting `warning[index-failure]` when it tried to query yanked status without a local index; warming the index prevents network flakiness from spamming logs and fails early if fetch cannot reach crates.io. | CI is quieter and deterministically fails on real connectivity issues; yank checks now use the warmed cache instead of best-effort network lookups during the deny step. |
| 2025-12-10 | RMG View Protocol plan | Added `docs/tasks.md` with a checklist to deliver the RMG View Protocol (pub/sub authority, dirty-loop publishing, demo path, tests) and logged intent in execution-plan. | Centralizes the work needed to demo multi-viewer shared RMGs and sets commit-by-slice expectations. | Provides a single progress list; future slices will check off items and keep docs aligned. |
| 2025-12-10 | CBOR migration + viewer gating | Replaced archived `serde_cbor` with `ciborium` in proto/graph (canonical encoder/decoder with serde_value bridge), marked graph enums `#[non_exhaustive]`, made canonical hashing return `Result`, and aligned egui deps/input handling (pointer & WASDQE gated to View, escape only on keydown, snapshot hash mismatch desyncs). | Keeps wire format on a maintained crate, avoids namespace pollution, and prevents silent desyncs or UI mutation outside the View screen; removes raw pointer aliasing in app_events. | Canonical framing stays deterministic on supported MSRV, oversized ints surface errors, viewer input is safer/debuggable, and CI dependency alignment avoids egui patch skew. |
| 2025-12-10 | Viewer timing + session buffering | Capture frame `dt` once per frame and reuse for camera/layout/arcball; compute angular velocity using `angle/dt` with epsilon and zero-angle guard; session client now buffers header/payload/checksum across reads, decodes only when a full packet is present, and never drops partial data. | Prior code reset `last_frame` before `elapsed()` uses, producing zero dt and runaway angular velocities; arcball used a bogus constant divisor; poll_message dropped partial headers and over-allocated payloads. | Viewer motion/decay uses correct per-frame delta and stable spin; angular velocity matches actual drag speed; session client keeps stream in sync and surfaces `Ok(None)` only when truly no data. |
| 2025-12-10 | Config + docs alignment | README points to `ConfigStore` and correct doc path; proto reexports are explicit with serde-renamed `AckStatus::{Ok,Error}`; constellation figure labeled/cross-referenced with anchored legend. | Aligns docs with actual APIs and keeps figure references stable. | Less namespace pollution, accurate docs, and reliable LaTeX figure placement. |
Expand Down
10 changes: 8 additions & 2 deletions docs/execution-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ This is Codex’s working map for building Echo. Update it relentlessly—each s
> 2025-12-10 — CI cargo-audit unmaintained warnings (COMPLETED)

- Goal: keep `cargo audit --deny warnings` green despite unavoidable unmaintained transitive `paste` (via wgpu) and legacy `serde_cbor` advisory.
- Scope: `.github/workflows/security-audit.yml` (add `--ignore RUSTSEC-2024-0436` and `--ignore RUSTSEC-2021-0127`).
- Status: completed; audit step now ignores these advisories explicitly until upstreams replace them.
- Scope: `.github/workflows/security-audit.yml` and `.github/workflows/ci.yml` (add `--ignore RUSTSEC-2024-0436` and `--ignore RUSTSEC-2021-0127`).
- Status: completed; audit steps now ignore these advisories explicitly until upstreams replace them.

> 2025-12-10 — RMG View Protocol tasks (IN PROGRESS)

- Goal: land the RMG View Protocol/EIP checklist and execute slices toward multi-viewer sharing demo.
- Scope: tracked in `docs/tasks.md` with stepwise commits as items complete.
- Status: checklist drafted.

> 2025-12-10 — CBOR migration + viewer input gating (COMPLETED)

Expand Down
14 changes: 14 additions & 0 deletions docs/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- SPDX-License-Identifier: Apache-2.0 OR MIND-UCAL-1.0 -->
<!-- © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> -->
# RMG View Protocol Tasks

- [ ] Define the “RMG View Protocol” package: channel naming, RmgId + owner identity, publisher-only writes, message pattern (snapshot + diff, gapless epochs, hashes/acks), transport (canonical CBOR, MAX_PAYLOAD, non-blocking).
- [ ] Generalize as an Echo Interaction Pattern (EIP) template capturing roles, authority, message types, flow styles (req/resp, pub/sub, bidir), reliability/validation hooks for future services.
- [ ] Enforce authority: session-service rejects non-owner writes on the RMG channel; client surfaces errors.
- [ ] Dirty-flag sync loop in viewer: mark dirty on mutation, publish snapshot/diff on net tick when dirty, clear on ack; throttle/batch as needed.
- [ ] Publish/subscribe toggles in UI: enable/disable sending my RMG and receiving per RmgId, preserving epoch/hash continuity when re-enabled.
- [ ] Session-service wiring: add publish endpoint, validate owner + gapless epochs/hashes, rebroadcast to other subscribers; explicit error codes.
- [ ] Client wiring: implement publish call + retry/backoff; handle authority/hash errors and resync requests.
- [ ] Demo path: script/doc for one session-service + two viewers (one publisher, one subscriber) showing shared RMG changes.
- [ ] Tests: protocol conformance (authority rejection, gapless enforcement, dirty-loop behavior, toggle respect) and integration test with two clients + server loopback.
- [ ] Docs sync: update execution-plan intents and decision-log entries as slices land.
Loading