Skip to content

[Chore] Repository Cleanup: Remove Binaries, Test Artifacts, Orphaned Files, and IDE Config #19

Description

@KarenZita01

Description

The lib_original.rs (37KB) file exists alongside lib.rs (300KB) without any documentation about which is the current production version, what changes were made, or whether lib_original.rs can be safely deleted. Similarly, seed_tests.rs is referenced in test outputs but doesn't exist in the source tree. The .agents directory contains configuration for AI coding agents but isn't documented. The insurance_pool_demo.exe and .pdb files (1.5MB combined) are compiled Windows binaries committed to the repository, which is poor practice for a Rust/Soroban smart contract repo.

Cleanup issues:

  • lib_original.rs - no clear purpose or migration path
  • insurance_pool_demo.exe (208KB) - binary should be removed
  • insurance_pool_demo.pdb (1.3MB) - debug symbols should not be in repo
  • .codex - empty file, unclear purpose
  • errors.txt (6.3KB) and test_out.txt (9.9KB) - test artifacts should be in .gitignore
  • .idea/ - IDE configuration committed

Technical Context & Impact

  • Affected Components/Files: lib_original.rs, insurance_pool_demo.exe, insurance_pool_demo.pdb, .codex, contracts/utility_contracts/errors.txt, contracts/utility_contracts/test_out.txt, .idea/, .agents/
  • Impact: Repository Hygiene, CI/CD Performance, Security (binaries may contain secrets)

Step-by-Step Implementation Guide

  1. Audit lib_original.rs: Compare with lib.rs; if superset of removed functions, delete; if contains unique logic, move to dedicated file with documentation
  2. Remove binaries: git rm insurance_pool_demo.exe insurance_pool_demo.pdb
  3. Update .gitignore: Add *.exe, *.pdb, *.txt in contract directories, .idea/, .codex
  4. Move test artifacts: errors.txt (from compilation/test output) and test_out.txt (from test runs) should be moved to target/ or deleted
  5. Document .agents: Add AGENTS.md explaining purpose of AI agent configurations
  6. Clean up .codex: Remove empty file or add purpose documentation
  7. Remove IDE files: git rm -r .idea/ and add to global .gitignore

Verification & Testing Steps

  1. Run git clean -n to verify files are properly excluded
  2. Build after cleanup: cargo build --package utility_contracts (should pass with no changes)
  3. Run all tests: cargo test --package utility_contracts
  4. Check repo size reduction: git count-objects -vH before and after
  5. Verify no functional changes: cargo test should produce identical test results
  6. Check CI pipeline runs cleanly after cleanup

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