Skip to content

Disable incremental compilation and dev debug data - #791

Merged
leynos merged 2 commits into
mainfrom
dev-build-footprint
Oct 23, 2026
Merged

leynos merged 2 commits into
mainfrom
dev-build-footprint

Conversation

@leynos

@leynos leynos commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Part of DF12-110

Applies the concordat rust-dev-build-footprint rule (0.2.1) to wireframe, the pilot of the footprint rollout, on the new pin nightly-2026-10-22 (#794).

  • Cargo.toml: add [profile.dev] with incremental = false and debug = 0.
  • .cargo/config.toml: add [unstable] embed-metadata = false, the native Cargo key for dated nightlies from 2026-07-31. No raw rustc metadata flags are used. The pin is unchanged.
  • tests/workflow_contracts/build_standard_test.py and docs/developers-guide.md: contract tests for the three settings, and a paragraph on the footprint rule, its debugging and rebuild trade-offs and the local overrides.

Rule result (concordat at 0f0b419, concordat artefact rule run rust-dev-build-footprint):

  • before, on origin/main (54868fd): noncompliant (DF-001, DF-002, DF-003)
  • after, on this branch: compliant

Footprint evidence, one dev cargo build into a fresh target directory each, run sequentially on nightly-2026-10-22:

  • origin/main: du -sh target 479M
  • this branch: 246M

Local gates (through the gate slot, sequential): make check-fmt, make lint and make test all pass.

First main push after #794 (Coverage (main), Push on main, CI): all succeeded on ubicloud runners with no out-of-disk failure. The wireframe workflows have no free-disk telemetry, so no least-free-disk figure exists. This change invalidates the sccache keys again.

Overlapping open PRs: none touch Cargo.toml or .cargo/config.toml; #650 touches only tools/dev-fast/config.toml.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: Team
  • Run ID: b193f0a1-22ab-471d-af3f-5976a9362e70
📥 Commits

Reviewing files that changed from the base of the PR and between 168c6f1 and 2feefd5.

📒 Files selected for processing: 2
  • .cargo/config.toml
  • Cargo.toml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

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

Summary

  • Disable incremental compilation and debug information in [profile.dev] in Cargo.toml.
  • Enable Cargo’s unstable no-embed-metadata option in .cargo/config.toml. The nightly toolchain pin remains unchanged.
  • Apply the rust-dev-build-footprint concordat rule (0.2.1). The reported concordat run changed from non-compliant on origin/main to compliant on this branch.
  • The author reports that fresh-target cargo build runs used 247 MB on this branch, compared with 570 MB on origin/main.

Validation

  • The author reports that make check-fmt and make test pass.
  • The author reports that local make lint fails with 13 Whitaker Dylint errors in src/client/pool/core_tests.rs. The same failures were reported on origin/main; hosted CI reportedly passes make lint there.

Walkthrough

Set Cargo development builds to disable incremental compilation and debug information, and enable the unstable no-embed-metadata option.

Changes

Cargo development builds

Layer / File(s) Summary
Set development build artefact options
.cargo/config.toml, Cargo.toml
Disable incremental compilation and debug information in the development profile. Enable Cargo’s unstable no-embed-metadata option.

Possibly related issues

  • leynos/ortho-config#611 — Relate this change to the issue about duplicated Cargo target trees. This change adjusts development-build artefacts, but does not address target-tree duplication.

Suggested labels: Issue

Priority: ⬇️ Low

Change: Other

Merge Risk: ⚪ Minimal · up to 2feef

No concrete merge-blocking issue was found in the reviewed changes.

Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

Failed Failed checks: 2 errors · 1 warning

Check name Status Explanation Resolution
Testing (Overall) Error The pull request changes development build behaviour in Cargo.toml:273-274 and .cargo/config.toml:30-31, but it adds no tests. The existing make test target tests repository functionality, not b… Add a CI-enforced, substantive build-footprint test for the pinned nightly. Build in a fresh target directory and assert the required incremental, debug-info, and embedded-metadata properties, or run the rust-dev-build-footprint concordat…
Testing (Unit And Behavioural) Error The pull request changes the externally observable development-build workflow, but it adds no automated test. The diff changes only .cargo/config.toml and Cargo.toml; it adds `no-embed-metadata = … Add an automated integration or end-to-end build test. Run the pinned Cargo toolchain with a clean target directory, verify that the development profile disables incremental compilation and debug information, and verify that embedded metada…
Developer Documentation Warning The pull request changes the development build standard in Cargo.toml ([profile.dev], incremental = false, debug = 0) and .cargo/config.toml (no-embed-metadata = true). The changed-file di… Update docs/developers-guide.md in the Development builds section. Document that development builds disable incremental compilation and debug information, and that Cargo uses [unstable] no-embed-metadata = true with the pinned nightly t…
Passed Passed checks: 12 passed
Check name Status Explanation
Title check Passed Pass the title. It accurately summarises the primary change: disabling incremental compilation and development debug data. No roadmap number or GitHub issue number is required by the provided context.
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 0…
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.
User-Facing Documentation Passed Pass. The pull request changes only development build settings: Cargo.toml disables incremental compilation and debug data in [profile.dev], and .cargo/config.toml disables embedded metadata. Th…
Module-Level Documentation Passed PASS: The pull request changes only Cargo configuration in Cargo.toml and .cargo/config.toml. It adds build-profile and Cargo unstable settings, but it adds or changes no source modules. The modul…
Testing (Property / Proof) Passed The pull request changes only Cargo build configuration: [profile.dev] sets incremental = false and debug = 0, and .cargo/config.toml enables no-embed-metadata. These settings do not introdu…
Testing (Compile-Time / Ui) Passed Pass this check. The pull request changes only Cargo build configuration: [profile.dev] settings and Cargo's no-embed-metadata option. It introduces no Rust or TypeScript compile-time API behaviou…
Unit Architecture Passed PASS. Restrict the change to Cargo build configuration: [profile.dev] sets incremental = false and debug = 0, and [unstable] enables no-embed-metadata. The pull request changes no Rust units…
Domain Architecture Passed Pass this check. The pull request changes only Cargo build configuration: [profile.dev] in Cargo.toml and [unstable] no-embed-metadata in .cargo/config.toml. It does not change domain logic, a…
Observability Passed PASS — the pull request changes only Cargo build configuration. Cargo.toml:273-275 disables incremental compilation and debug data for [profile.dev]; .cargo/config.toml:31 disables embedded comp…
Description check Passed The description states the PR applies the rust-dev-build-footprint concordat rule to wireframe by adding a [profile.dev] section (incremental = false, debug = 0) in Cargo.toml and an [unstable] embed-…
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 0 files. (2 skipped: 2 unsupported.)

Full details: User-Facing Documentation

Explanation

Pass. The pull request changes only development build settings: Cargo.toml disables incremental compilation and debug data in [profile.dev], and .cargo/config.toml disables embedded metadata. These settings affect build artefacts and developer tooling, not user-facing application or library behaviour. No user-guide update is required.

Full details: Module-Level Documentation

Explanation

PASS: The pull request changes only Cargo configuration in Cargo.toml and .cargo/config.toml. It adds build-profile and Cargo unstable settings, but it adds or changes no source modules. The module-level documentation requirement is therefore not applicable.

Full details: Testing (Property / Proof)

Explanation

The pull request changes only Cargo build configuration: [profile.dev] sets incremental = false and debug = 0, and .cargo/config.toml enables no-embed-metadata. These settings do not introduce an invariant over inputs, states, orderings, or transitions, and they do not introduce a lemma or proof assumption. No property test or exhaustive proof is required by this check.

Full details: Testing (Compile-Time / Ui)

Explanation

Pass this check. The pull request changes only Cargo build configuration: [profile.dev] settings and Cargo's no-embed-metadata option. It introduces no Rust or TypeScript compile-time API behaviour, compiler diagnostic output, or UI output. No new trybuild or snapshot test is required. Existing trybuild coverage remains in tests/compile_error.rs and wireframe_testing/tests/loom_api_surface.rs.

Full details: Unit Architecture

Explanation

PASS. Restrict the change to Cargo build configuration: [profile.dev] sets incremental = false and debug = 0, and [unstable] enables no-embed-metadata. The pull request changes no Rust units, APIs, queries, commands, dependencies, side-effects, or tests. The Unit Architecture criteria are therefore not applicable, and no separation or dependency-visibility failure is introduced.

Full details: Domain Architecture

Explanation

Pass this check. The pull request changes only Cargo build configuration: [profile.dev] in Cargo.toml and [unstable] no-embed-metadata in .cargo/config.toml. It does not change domain logic, adapters, transport, persistence, commands, repositories, or error handling. No domain-boundary failure is introduced.

Full details: Observability

Explanation

PASS — the pull request changes only Cargo build configuration. Cargo.toml:273-275 disables incremental compilation and debug data for [profile.dev]; .cargo/config.toml:31 disables embedded compiler metadata. The diff changes no runtime code, production telemetry, service boundary, queue, storage, or alert behaviour. Logs, metrics, tracing, and alerts are therefore not required by this check.

Full details: Description check

Explanation

The description states the PR applies the rust-dev-build-footprint concordat rule to wireframe by adding a [profile.dev] section (incremental = false, debug = 0) in Cargo.toml and an [unstable] embed-metadata = false entry in .cargo/config.toml. It also lists contract tests, a developer guide paragraph, and footprint measurements. This is directly related to the changeset, so the check passes. Note that the description and the objectives disagree on the nightly pin (the description says the pin is nightly-2026-10-22 and unchanged; the objectives say nightly-2026-03-26), the config key (embed-metadata = false versus no-embed-metadata = true), and the measured sizes (479M/246M versus 570M/247M). These discrepancies do not make the description off-topic, but the author should reconcile them.

Full details: Testing (Overall)

Explanation

The pull request changes development build behaviour in Cargo.toml:273-274 and .cargo/config.toml:30-31, but it adds no tests. The existing make test target tests repository functionality, not build-footprint settings, and the existing workflow contract tests cover only rustflags. Those tests would continue to pass if these new settings were removed. The reported local build measurements are not committed automated tests.

Resolution

Add a CI-enforced, substantive build-footprint test for the pinned nightly. Build in a fresh target directory and assert the required incremental, debug-info, and embedded-metadata properties, or run the rust-dev-build-footprint concordat rule as a failing gate. Ensure the test fails when any of the three settings is removed or inverted.

Full details: Testing (Unit And Behavioural)

Explanation

The pull request changes the externally observable development-build workflow, but it adds no automated test. The diff changes only .cargo/config.toml and Cargo.toml; it adds no-embed-metadata = true, incremental = false, and debug = 0. The existing make test target runs workspace tests, but it does not verify these Cargo build settings or the resulting artefacts.

Resolution

Add an automated integration or end-to-end build test. Run the pinned Cargo toolchain with a clean target directory, verify that the development profile disables incremental compilation and debug information, and verify that embedded metadata is disabled. Keep the test at the Cargo/build boundary rather than testing private helpers.

Full details: Developer Documentation

Explanation

The pull request changes the development build standard in Cargo.toml ([profile.dev], incremental = false, debug = 0) and .cargo/config.toml (no-embed-metadata = true). The changed-file diff contains no documentation update. The Development builds section documents the pinned nightly, linker, rustflags and Cranelift, but does not document these new development build settings (docs/developers-guide.md:945-1004).

Resolution

Update docs/developers-guide.md in the Development builds section. Document that development builds disable incremental compilation and debug information, and that Cargo uses [unstable] no-embed-metadata = true with the pinned nightly toolchain. State the scope and effect of these settings.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Disable incremental builds; let artefacts grow light.
Strip debug details from the development build.
Keep metadata from embedding in the output.
Cargo follows the settings, one build at a time.
Smaller artefacts depart into the night.

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

@sourcery-ai

sourcery-ai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Applies the rust-dev-build-footprint rule to wireframe by disabling dev incremental compilation, debug data, and embedded Cargo metadata on the existing pinned nightly, reducing measured fresh-build usage by roughly 49% while passing local and CI validation.

Flow diagram for reduced Rust development build footprint

flowchart LR
    Source[Source code] --> Cargo[Cargo dev build]
    Cargo --> Profile[Dev profile\nincremental=false\ndebug=0]
    Cargo --> Metadata[Embedded metadata=false]
    Profile --> Target[Fresh target directory]
    Metadata --> Target
    Target --> Size[Build footprint\n479M to 246M]
Loading

File-Level Changes

Change Details Files
Reduce development build footprint through Cargo profile and unstable configuration changes.
  • Disable incremental compilation for dev builds.
  • Disable dev debug information generation.
  • Disable embedded Cargo metadata using the native unstable Cargo setting.
Cargo.toml
.cargo/config.toml
Validate compliance and quantify the resulting disk-usage reduction.
  • Confirm compliance with the rust-dev-build-footprint rule.
  • Measure a fresh sequential dev build decreasing from 479M to 246M.
  • Verify formatting, lint, tests, and the first main CI push pass.
Cargo.toml
.cargo/config.toml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as ready for review October 22, 2026 14:28
@sourcery-ai

sourcery-ai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Sorry @leynos, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 hours and 31 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T01:45:31.028838Z 3ae0d52 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-23T01:45:32.914661Z 3ae0d52 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@coderabbitai coderabbitai Bot added the Issue label Oct 22, 2026

@coderabbitai coderabbitai Bot left a comment

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.

Pre-merge checks failed. Please resolve the failing checks before merging.

@leynos
leynos marked this pull request as draft October 22, 2026 15:13
Set incremental = false and debug = 0 in the default dev profile and set
Cargo's embed-metadata = false for the pinned nightly-2026-10-22, per the
concordat rust-dev-build-footprint rule. This reduces intermediate build
artefact storage.
@leynos
leynos force-pushed the dev-build-footprint branch from 2feefd5 to 3ae0d52 Compare October 23, 2026 01:26
codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as ready for review October 23, 2026 01:42

@sourcery-ai sourcery-ai Bot left a comment

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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ae0d5256c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Cargo.toml Resolved
Comment thread .cargo/config.toml Resolved
@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai Your latest pre-merge table (reviewed at 2feefd5, before this PR was rebased onto the new pin) shows ❌ rows for Testing (Overall) and Testing (Unit And Behavioural), and a Developer Documentation warning. At head ee1d6c6: tests/workflow_contracts/build_standard_test.py now has two contract tests asserting incremental = false, debug = 0 and embed-metadata = false (and the absence of the old key and of raw metadata flags), make test-workflow-contracts passes, the concordat rust-dev-build-footprint rule is compliant on this branch (noncompliant on main), and docs/developers-guide.md documents the settings and their trade-offs. CI is green at this head. Do those two ❌ rows now clear, and do any findings remain open?

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
git rev-parse HEAD
fd -a '^(build_standard_test\.py|developers-guide\.md|Cargo\.toml|config\.toml|AGENTS\.md)$' . | head -60
ast-grep outline tests/workflow_contracts/build_standard_test.py --items all
rg -n -C5 'incremental|embed.metadata|debug =|footprint|trade.off' docs/developers-guide.md Cargo.toml .cargo/config.toml tests/workflow_contracts/build_standard_test.py
gh pr view 791 --repo leynos/wireframe --json headRefOid,state,statusCheckRollup,reviews
gh api graphql -f query='query {
 repository(owner:"leynos", name:"wireframe") {
  pullRequest(number:791) {
   comments(last:30) { nodes { author { login } body url } }
   reviewThreads(first:100) {
    pageInfo { hasNextPage endCursor }
    nodes { isResolved isOutdated path comments(first:30) { nodes { author { login } body url } pageInfo { hasNextPage } } }
   }
  }
 }
}'

Length of output: 51087


🏁 Script executed:

#!/bin/bash
set -euo pipefail
cat -n AGENTS.md
sed -n '75,100p;218,246p' tests/workflow_contracts/build_standard_test.py
sed -n '970,991p' docs/developers-guide.md
rg -n -C4 'test-workflow-contracts|workflow_contracts' Makefile .github
fd -H '^rust-toolchain(\.toml)?$' . --exec cat -n {}
gh api repos/leynos/wireframe/actions/jobs/120198160278 --jq '{conclusion,steps: [.steps[] | {name,conclusion}]}'

Length of output: 32179


@buzzybee-df12 Yes. Treat both testing rows and the documentation warning as cleared at ee1d6c6.

Check Updated assessment Verified evidence
Testing (Overall) ✅ Pass The two contract tests assert all three settings and reject the old metadata key and raw metadata flags. CI runs make test-workflow-contracts, and that step passed.
Testing (Unit And Behavioural) ✅ Pass The tests provide regression coverage at the Cargo configuration boundary. Requiring a separate clean-build artefact test was excessive for this configuration-only change.
Developer Documentation ✅ Pass docs/developers-guide.md documents the settings, inherited test-profile effects, debugging and rebuild trade-offs, and local overrides.

No review findings remain open. GitHub reports both review threads as resolved. The head’s CI build, lint, workflow contract tests, and security checks passed.

Separate that assessment from the recorded review state: CodeRabbit’s CHANGES_REQUESTED review still refers to 2feefd5, and automatic reviews are paused. This reply does not update that review or the old pre-merge table. Request a fresh review with @coderabbitai review to refresh the recorded assessment.

You are interacting with an AI system.

@leynos
leynos merged commit 781d1f4 into main Oct 23, 2026
11 checks passed
@leynos
leynos deleted the dev-build-footprint branch October 23, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants