Skip to content

Upgrade Rust to 1.99.0 and clean Cargo package exclusions - #104

Merged
rmems merged 2 commits into
mainfrom
feature/lim-1514-upgrade-rust-to-1990-and-clean-cargo-package-exclusions
Oct 26, 2026
Merged

rmems merged 2 commits into
mainfrom
feature/lim-1514-upgrade-rust-to-1990-and-clean-cargo-package-exclusions

Conversation

@rmems

@rmems rmems commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

User description

What / why

Rust pin audit: the repo is already on 1.99.0 everywhere, so no toolchain pin changed. Verified sites:

Site Value
Cargo.toml rust-version 1.99.0
rust-toolchain.toml channel 1.99.0
.github/workflows/ci.yml toolchain: (4 jobs: fmt, stub, corpus-ipc, package) 1.99.0
.github/scripts/qualify-package.py cargo +1.99.0 / rustc +1.99.0 1.99.0
Dockerfile FROM rust:1.99.0-bookworm 1.99.0
.devin/blueprint.yaml rustup install/default 1.99.0
README.md, AGENTS.md, CLAUDE.md, REVIEW.md, docs/ci.md, experiments/usefulness/run.sh 1.99.0

No .devcontainer/ or .cursor/ directory exists. The only remaining 1.98.1 strings are in committed experiments/usefulness/results/* and REPORT.md, which intentionally record the historical run that produced them (REPORT.md says so explicitly).

Package exclusion cleanup (cargo package --list --allow-dirty): the crate was shipping

  • .agents/setup (Cursor Cloud bootstrap script: apt-get + rustup), and
  • ~1.9 MiB of experiment result artifacts under experiments/usefulness/results/ (per-run logs, .jsonl.gz traces, summaries).

Both are now in [package] exclude, and REPOSITORY_ONLY in qualify-package.py rejects them so the CI package job fails if they come back. Kept in the package: experiments/usefulness/{PROTOCOL.md,REPORT.md,run.sh,summarize.py,config/,fixtures/} (the usefulness_* examples read those fixtures), .cargo/config.toml (the extracted package needs its libzmq alignment defines; see the comment in qualify-package.py), Cargo.lock (binary crate; --locked is the documented workflow), both licenses, README.md, rust-toolchain.toml.

Package list: 62 files after this change; zero .agents/ or results/ entries.

How verified (Rust 1.99.0, Linux, CPU only)

  • cargo fmt --check — clean
  • cargo clippy --locked --all-targets -- -D warnings — clean
  • cargo test --locked — 159 passed, 1 ignored; config_startup passed
  • RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps — clean
  • CC=gcc CXX=g++ cargo clippy --locked --all-targets --all-features -- -D warnings — clean (libzmq built from source)
  • CC=gcc CXX=g++ cargo test --locked --all-features — 182 passed, 1 ignored; config_startup, thalamic_brainstem_smoke, pub_lifecycle passed
  • python3 -m py_compile .github/scripts/qualify-package.py — ok (full qualify-package.py not run locally; it needs a clean committed checkout and runs a publish dry-run; the CI package job covers it)

Acceptance checklist

  • Every Rust pin site audited and on 1.99.0 (no change needed)
  • [package] exclude audited via cargo package --list; agent/CI/devin files and bulky result artifacts excluded; license/README/fixtures included
  • Package qualification gate updated to enforce the new exclusions
  • fmt, clippy -D warnings, tests (stub + --all-features), rustdoc -D warnings green on 1.99.0
  • CI package job (publish dry-run) — runs in GitHub Actions on this PR

Out of scope: publishing, consumer bumps, edition/API changes.

Closes LIM-1514

Generated by Claude Code

&lt;source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"&gt;&lt;source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"&gt;&lt;img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png" width="162" height="28"&gt; <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1795522358&installation_model_id=442967&pr_number=104&ref=codesmith_pr_footer&repository=Limen-Neural%2Fbrainstem-daemon&return_to=https%3A%2F%2Fgithub.com%2FLimen-Neural%2Fbrainstem-daemon%2Fpull%2F104&signature=f00005541ba8127f0cbc07cbe7e7a193512e646bcc00cdcaba2a8572c32a27dd"&gt;&lt;picture&gt;&lt;source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"&gt;&lt;source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"&gt;&lt;img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28"&gt;
Need help on this PR? Tag @codesmith-bot with what you need.

Generated by Claude Code


CodeAnt-AI Description

Exclude setup scripts and experiment results from published crates

What Changed

  • Published crates no longer include the repository setup script or committed experiment results.
  • Package checks now reject those files if they are included again.
  • The experiment report links to the results on GitHub instead of expecting them in the crate.

Impact

✅ Smaller crate downloads
✅ No repository setup script in published crates
✅ Experiment results remain accessible on GitHub

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@tenki-reviewer

tenki-reviewer Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This change keeps agent-generated scratch directories and experiment result artifacts out of the published crate. Both files that list repository-only paths were updated in lockstep: .github/scripts/qualify-package.py now treats .agents/ and experiments/usefulness/results/ as repository-only, and Cargo.toml excludes the same two paths plus .agents/ from the packaged crate.

Files Change
.github/scripts/qualify-package.py Adds .agents/ and experiments/usefulness/results/ to the REPOSITORY_ONLY path filter.
Cargo.toml Adds .agents/ and experiments/usefulness/results/ to the package exclude list.

Reviewed commit: e2269f2

@linear-code

linear-code Bot commented Oct 25, 2026

Copy link
Copy Markdown

LIM-1514

@codeant-ai

codeant-ai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  Incremental review completed e6d6d00 Oct 26, 2026 · 03:14 03:15
✅  Reviewed your PR e2269f2 Oct 25, 2026 · 12:12 12:14

@codeant-ai

codeant-ai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@amazon-q-developer amazon-q-developer 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.

Review Summary

This PR makes two tightly coupled changes:

  1. Cargo.toml — adds .agents/ and experiments/usefulness/results/ to [package] exclude, preventing those paths from being included in the published .crate archive.
  2. .github/scripts/qualify-package.py — mirrors those exclusions in the REPOSITORY_ONLY tuple, so the CI package job will fail fast if they ever reappear in the packaged file list.

Both changes are consistent with each other and with the rest of the codebase. The startswith-based check in check_package_list correctly handles the trailing-slash convention used for all entries. No logic errors, security issues, or correctness defects were found. The PR is ready to merge pending the CI package job result.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Oct 25, 2026
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 0e3c7b28-5ceb-4b84-9ed1-f4c47b578ac0
Commits

Reviewing files that changed from the base of the PR and between 35090db and e2269f2.

Files selected for processing: 2
  • .github/scripts/qualify-package.py
  • Cargo.toml

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

📝 Summary

Summary by CodeRabbit

  • Chores
    • Distributed packages no longer include repository-specific agent configuration or usefulness experiment results. These files remain outside the package contents, reducing the amount of repository-only material included in package archives.

The Cargo package exclusion list and the REPOSITORY_ONLY qualification check now exclude .agents/ and experiments/usefulness/results/.

Changes: Package exclusions

Layer / File(s) Summary
Exclude repository-only paths
Cargo.toml, .github/scripts/qualify-package.py
Both package exclusion mechanisms add .agents/ and experiments/usefulness/results/. Existing Cargo exclusions remain unchanged.

Priority: Pending latest changes

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

Suggested labels: GItHub Actions

Suggested reviewers: codescene-access

Merge Risk: Minimal · up to e2269

The package exclusion changes are aligned for the repository paths affected by this PR.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the package exclusion cleanup, which is the main implemented change. The Rust upgrade wording is slightly inaccurate because the audit found that Rust 1.99.0 was already c…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description directly matches the changeset. It explains the Rust pin audit and the exclusion of .agents/ and experiments/usefulness/results/ from the Cargo package and qualification c…
Full details: Title check

Explanation

The title clearly identifies the package exclusion cleanup, which is the main implemented change. The Rust upgrade wording is slightly inaccurate because the audit found that Rust 1.99.0 was already configured, but it remains related to the stated objective.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The pull request description directly matches the changeset. It explains the Rust pin audit and the exclusion of .agents/ and experiments/usefulness/results/ from the Cargo package and qualification checks.

Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

codescene-access[bot]

This comment was marked as outdated.

@deepsource-io

deepsource-io Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in d979e27...e6d6d00 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Rust Oct 26, 2026 3:14a.m. Review ↗
Secrets Oct 26, 2026 3:14a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Comment thread Cargo.toml
Comment on lines 21 to 31
"AGENTS.md",
"CLAUDE.md",
"REVIEW.md",
"Dockerfile",
".codacy.yml",
".deepsource.toml",
"docs/",
"experiments/usefulness/results/",
]

[package.metadata.docs.rs]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Excluding experiments/usefulness/results/ from the package leaves a broken relative link in experiments/usefulness/REPORT.md within the packaged .crate.
Severity: LOW

Suggested Fix

Update the relative link in experiments/usefulness/REPORT.md to point to an absolute GitHub repository URL, or exclude REPORT.md alongside the results directory in Cargo.toml.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: Cargo.toml#L17-L31

Potential issue: Adding `experiments/usefulness/results/` to the package `exclude` list
in `Cargo.toml` leaves `experiments/usefulness/REPORT.md` inside the published crate
while stripping the target directory. As a result, the relative link
`[results/d3f369320b226223644284952b9f60f732175480/](results/d3f369320b226223644284952b9f60f732175480/)`
in `REPORT.md` becomes a dead link when browsing the packaged `.crate` contents.

Also affects:

  • .github/scripts/qualify-package.py:31-38

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 64e8c4c — the REPORT.md results link now points at the GitHub tree URL, so it stays valid inside the packaged crate. REPORT.md itself stays in the package since it documents the measured run.


Generated by Claude Code

tenki-reviewer[bot]
tenki-reviewer Bot previously approved these changes Oct 25, 2026
@codeant-ai

codeant-ai Bot commented Oct 25, 2026

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: e2269f278f3f

@tenki-reviewer

tenki-reviewer Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review complete. No new findings in these changes — approved ✅.

Reviewed the latest changes.


This incremental delta changes only experiments/usefulness/REPORT.md — a small documentation edit with no code, configuration, or build changes. No problems were found in the changed content.

Files Change
experiments/usefulness/REPORT.md Minor doc-only update to the usefulness experiment report.

Reviewed commit: 64e8c4c

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread Cargo.toml
codescene-access[bot]

This comment was marked as outdated.

@tenki-reviewer
tenki-reviewer Bot dismissed their stale review October 25, 2026 12:17

Superseded by a newer Tenki approval on this pull request.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 3 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@rmems rmems added this to the 02 — v0.3.0 release qualification milestone Oct 25, 2026 — with Claude
@rmems rmems self-assigned this Oct 25, 2026
@rmems rmems added the chore label Oct 25, 2026 — with Claude
…514)

Every Rust pin site (Cargo.toml rust-version, rust-toolchain.toml, all four
ci.yml toolchain strings, qualify-package.py `cargo +1.99.0`, Dockerfile
FROM tag, .devin/blueprint.yaml, README/AGENTS/REVIEW/docs prose) was
already on 1.99.0, so no toolchain change is needed.

`cargo package --list` showed the crate shipping `.agents/setup` (the
Cursor Cloud bootstrap script) and ~1.9 MiB of committed experiment
result logs/gzipped traces under `experiments/usefulness/results/`.
Exclude both and teach the package qualification gate to reject them.
PROTOCOL.md, run.sh, fixtures, and the examples that consume them stay
packaged; `.cargo/config.toml` stays because the extracted package needs
its libzmq alignment defines.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FWFCFspAvzEAq45Azy9eGS
… excluded from the crate (LIM-1514)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FWFCFspAvzEAq45Azy9eGS
@rmems
rmems force-pushed the feature/lim-1514-upgrade-rust-to-1990-and-clean-cargo-package-exclusions branch from 64e8c4c to e6d6d00 Compare October 26, 2026 03:14
@rmems
rmems merged commit effe295 into main Oct 26, 2026
9 of 13 checks passed

@codescene-access codescene-access 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.

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@rmems
rmems deleted the feature/lim-1514-upgrade-rust-to-1990-and-clean-cargo-package-exclusions branch October 26, 2026 08:02
@rmems rmems added this to Rust stack Oct 26, 2026
@rmems rmems moved this to Done in Rust stack Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore GItHub Actions size:XS This PR changes 0-9 lines, ignoring generated files

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants