Skip to content

Build-artifact hygiene: no documented stale-artifact pruning mechanism #229

Description

@tensor4all-ai-bot

Summary

A source-level build-artifact hygiene audit of tensor4all/strided-rs main (commit dc0a8e03286c61a84d56446b5cc2c53295f75d76, "build: reduce Cargo artifact size (#228)") against the shared build-artifact controls added in tensor4all/tensor4all-agent-rules#9 found one confirmed, non-duplicate failure: the repository documents no stale-artifact pruning mechanism.

PASS/FAIL table

Control Shared-rule basis Result
Control 1 — Default profiles (dev/test debug = 0, overrides preserved, no full release debuginfo) rules/rust/performance.md:51-59, rules/common/docs-and-tests.md:63-66 PASS
Control 2 — Comprehensive CI profile (incremental = false, strip = "symbols"; coverage job exempt) rules/rust/performance.md:60-61, rules/common/docs-and-tests.md:55,67-68 PASS
Control 3 — Explicit local pre-PR attestation for hosted-CI-measured gates rules/common/docs-and-tests.md:69-73 PASS (see note)
Control 4 — Documented stale-artifact pruning mechanism rules/rust/performance.md:62-65, rules/common/docs-and-tests.md:74-78 FAIL

Control 1 — PASS

  • Cargo.toml:54-55 sets [profile.dev] debug = 0; Cargo.toml:57-58 sets [profile.test] debug = 0. debug-assertions, overflow-checks, and incremental keep their Cargo defaults.
  • No [profile.release] override exists, so release uses Cargo's default debug = false (no full debuginfo).
  • The one-command debugger override is available and unblocked: CARGO_PROFILE_DEV_DEBUG=1 / CARGO_PROFILE_TEST_DEBUG=1 (pattern demonstrated at docs/2026-08-09-cargo-artifact-reduction.md:24,46).

Control 2 — PASS

  • .github/workflows/ci.yml:41 runs hosted tests with cargo test --profile ci (also facade doctests at ci.yml:44).
  • Cargo.toml:61-64 defines [profile.ci] inherits = "test"; incremental = false; strip = "symbols".
  • Coverage job (.github/workflows/ci.yml:60-73) runs cargo llvm-cov --workspace with its own instrumentation-owned profile and is exempt from symbol stripping, consistent with docs/2026-08-09-cargo-artifact-reduction.md:80-81 and the audit's coverage exemption.

Control 3 — PASS (note)

The draft audit originally flagged this control as failing, but that finding was removed as unsupported. rules/common/docs-and-tests.md:69-73 states the local pre-PR gate may be attestation-based — a permission, not an obligation — while rules/common/docs-and-tests.md:53-55 assigns coverage enforcement to hosted CI. That enforcement exists: .github/workflows/ci.yml:71-73 runs scripts/check-coverage.py against per-file thresholds and fails the job when thresholds are missed. AGENTS.md:53-60 documents the local pre-PR gate (cargo fmt --all -- --check, cargo test --workspace) per the local-validation guidance; the repository has no local coverage gate, and the policy imposes none.

Control 4 — FAIL (confirmed)

rules/rust/performance.md:62-65 requires: "Document the pruning mechanism (an age-based sweep tool, or a periodic cargo clean), and propose a cleanup when target/ growth is dominated by stale artifacts." rules/common/docs-and-tests.md:74-78 likewise states repositories "should document a pruning mechanism (an age-based sweep tool or a periodic full clean)". Current main documents none:

  • AGENTS.md — no mention of artifact pruning or cargo clean anywhere.
  • REPOSITORY_RULES.md — no mention of artifact pruning.
  • docs/2026-08-09-cargo-artifact-reduction.md — documents profile-based size reduction (debug = 0, stripped ci profile) and a rejected integration-test consolidation experiment, but prescribes no pruning mechanism.
  • docs/superpowers/plans/2026-07-04-fused-elementwise-dag.md:13 — contains a plan-scoped note "run du -s . before work; if over 100GB, propose cleanup before continuing". This is a dated plan instruction for one issue, not a repository-wide documented pruning policy.
  • .github/workflows/ci.yml:46-50 — CI reports du -sh target and df -h target for visibility but performs no pruning.
  • No check-pr*.sh/cleanup script, Makefile/Justfile, or scheduled workflow addresses stale-artifact removal.

Expected remediation

Document a concrete pruning mechanism in repository-level documentation (AGENTS.md, REPOSITORY_RULES.md, or a dedicated docs/ file). Minimum viable options:

  • Prescribe a periodic cargo clean cadence (e.g., weekly, or after every N dependency bumps), and/or
  • Document an age-based sweep command (e.g., find target -type f -mtime +14 -delete after confirming no build is in progress) with usage notes, and
  • Add a trigger to propose a cleanup when target/ growth is clearly dominated by stale artifacts no current build uses, optionally integrated as a scheduled CI workflow that prunes the runner cache.

Scope and exclusions

  • This audit is source-level only. It did not inspect or estimate local target/ size and ran no cargo build, cargo test, cargo clean, or du on target/; local target/ size is owned by a separate parent-AGENTS check and is explicitly excluded here.
  • Coverage/instrumentation profiles are exempt from symbol stripping and were not audited against the strip requirement.
  • Related open PRs: none currently open address this control (gh pr list --state open returns none). No existing issue covers it (gh issue list --state all searched for artifact/target/pruning/coverage-attestation topics).

Policy authority

  • tensor4all/tensor4all-agent-rules#9 — PR that added the build-artifact controls.
  • rules/rust/performance.md:62-65 and rules/common/docs-and-tests.md:74-78 — the stale-artifact pruning documentation requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions