build(runner): reduce development debug information (#18307)

## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Agents and contributors compile the Rust runner inside workspaces
with limited storage.
> - Default development builds include full debug information in many
test executables.
> - A controlled Linux build used 11.54 GiB with those defaults.
> - This pull request uses line-only debug information for the
development profile and its test profile.
> - The measured build used 4.35 GiB and retained source-line
information for backtraces.

## Linked Issues or Issue Description

**What existing behavior does this improve?**

The storage used by Rust development builds and default-profile test
builds in `packages/paperclip-runner`.

**Current behavior**

The workspace uses Cargo's full development debug information. A clean
Linux ARM64 comparison on source
`d2280108f56872a6052a5011649a73cef9aac206`, Rust 1.97.1, and four build
jobs used 11.54 GiB for the test build output. This can exceed a small
sandbox's entire disk allocation.

**Proposed behavior**

Set `[profile.dev] debug = "line-tables-only"` in the Rust workspace
manifest. The default test profile inherits it. The same comparison used
4.35 GiB, a 62.3% reduction. Incremental compilation stays enabled.
Release settings stay as they are.

**Reason and benefit**

Reduce build storage while preserving file names and line numbers in
backtraces. This avoids removing all debug information or changing which
tests compile.

**Breaking changes**

Default development builds omit type and local-variable debugger
information. Contributors can restore it with
`CARGO_PROFILE_DEV_DEBUG=2` and `CARGO_PROFILE_TEST_DEBUG=2`. There are
no product API changes.

Related: #18172 handles workspace export after disk exhaustion. #16500
proposes separate CI-only debug settings and test scheduling changes.
This PR sets the workspace default and remains compatible with explicit
environment overrides. Searches found no existing PR for
`line-tables-only`.

## What Changed

- Set the runner workspace development debug level to
`line-tables-only`.
- Document test-profile inheritance and the full-debug environment
overrides.

## Verification

- Prior controlled comparison: fresh target directory per setting,
shared dependency downloads outside timing, identical source and
lockfile, Rust/Cargo 1.97.1, Linux ARM64, four build jobs, and a six-GiB
memory limit. First compile library tests, then all test targets with
`cargo test --locked --offline -p paperclip-runner-core --no-run
durable::`. Both configurations compiled all 32 test executables.
Measure the target directory with `du -sk`, counting hard links once.
Full debug: 11.54 GiB. Line-only debug: 4.35 GiB. These numbers exclude
source, registry, image, and Node dependencies. The initial benchmark
setup omitted an external fixture; that run was discarded after adding
the fixture from the same source revision.
- Current manifest verification passed on Linux ARM64 / Rust 1.97.1 with
profile environment overrides unset: all 32 test executables compile,
all 98 durable unit tests pass, and development binaries build. Verbose
compiler commands show `-C debuginfo=line-tables-only` and an
incremental directory for both the library and its test harness. This
verifies test-profile inheritance from the manifest. The fresh target
directory is 4.36 GiB on the updated source. No new test asserts the
manifest text; validation uses the actual compiler and existing tests.
- `cargo metadata --manifest-path
packages/paperclip-runner/runner/Cargo.toml --locked --offline --no-deps
--format-version 1` and `git diff --check` pass.
- [CI passed on commit
`14d798139f5ff04414c6acbe15cec04e9b680a00`](https://github.com/paperclipai/paperclip/actions/runs/41059532543),
including the `ci / verify` aggregate. The separate native Docker Runner
check also passed. The final check inventory has 55 successful checks,
four expected skips, and the neutral review described below; the legacy
security status passed. Two first-attempt worker interruptions required
one targeted retry each: Runner Vitest 2/2 received a shutdown signal
during native integration verification, and chat 1/3 lost communication
with GitHub. The exact interruption causes remain unknown. The Runner
retry passed 132 files / 2,321 tests (two existing skips), then four
native integration files / 127 tests (five existing skips). The chat
retry and final aggregate passed. The successful retries establish
recovery on this commit; they do not establish the cause of either
original interruption.
- Greptile reviewed the current commit at 5/5 with no findings. The
separate Paperclip review execution did not complete and returned a
neutral check without an assessment. This is not counted as a completed
review.

## Risks

- Native debugger inspection of types and local variables needs a
full-debug override. Source-line backtraces remain available.
- Changing debug settings rebuilds affected artifacts. Existing
full-debug outputs may remain until the contributor cleans their target
directory.
- The measured savings are from Linux ARM64 and the cited source
revision. Other platforms and workloads can differ. This is a
build-profile change, not a sandbox capacity increase.

## Model Used

OpenAI GPT-6 through Codex, with reasoning, repository tools, shell
execution, and Linux build measurements. The session does not expose a
more specific serving model ID or context-window size.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip authored and GitHub committed 2026-10-30 14:21:01 -05:00
1 parent 8362dbff4d
commit 36f4422389
2 files changed
+10

No files matched your search

+7
View File
@@ -552,6 +552,13 @@ pnpm --filter @paperclipai/paperclip-runner verify
The verification command requires a stable Rust toolchain with `cargo` on
`PATH`, in addition to Node.js 24.11+ and pnpm 9+.
Rust development builds use `debug = "line-tables-only"` to reduce build storage
while retaining file names and line numbers in backtraces. The default test
profile inherits this setting. Incremental compilation remains enabled, and
release profiles keep their existing settings. For full debugger support,
including local variables and types, set `CARGO_PROFILE_DEV_DEBUG=2` and
`CARGO_PROFILE_TEST_DEBUG=2` for the build or test command.
Minimal Debian/Ubuntu hosts without root access can extract the required
Playwright browser libraries into a user-owned cache and run the same acceptance
sequence with:
@@ -2,6 +2,9 @@
members = ["crates/runner-core"]
resolver = "2"
[profile.dev]
debug = "line-tables-only"
[workspace.package]
version = "0.0.0"
edition = "2021"