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
- Audit lib_original.rs: Compare with lib.rs; if superset of removed functions, delete; if contains unique logic, move to dedicated file with documentation
- Remove binaries:
git rm insurance_pool_demo.exe insurance_pool_demo.pdb
- Update .gitignore: Add
*.exe, *.pdb, *.txt in contract directories, .idea/, .codex
- Move test artifacts:
errors.txt (from compilation/test output) and test_out.txt (from test runs) should be moved to target/ or deleted
- Document .agents: Add
AGENTS.md explaining purpose of AI agent configurations
- Clean up .codex: Remove empty file or add purpose documentation
- Remove IDE files:
git rm -r .idea/ and add to global .gitignore
Verification & Testing Steps
- Run
git clean -n to verify files are properly excluded
- Build after cleanup:
cargo build --package utility_contracts (should pass with no changes)
- Run all tests:
cargo test --package utility_contracts
- Check repo size reduction:
git count-objects -vH before and after
- Verify no functional changes:
cargo test should produce identical test results
- Check CI pipeline runs cleanly after cleanup
Description
The
lib_original.rs(37KB) file exists alongsidelib.rs(300KB) without any documentation about which is the current production version, what changes were made, or whetherlib_original.rscan be safely deleted. Similarly,seed_tests.rsis referenced in test outputs but doesn't exist in the source tree. The.agentsdirectory contains configuration for AI coding agents but isn't documented. Theinsurance_pool_demo.exeand.pdbfiles (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 pathinsurance_pool_demo.exe(208KB) - binary should be removedinsurance_pool_demo.pdb(1.3MB) - debug symbols should not be in repo.codex- empty file, unclear purposeerrors.txt(6.3KB) andtest_out.txt(9.9KB) - test artifacts should be in .gitignore.idea/- IDE configuration committedTechnical Context & Impact
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/Step-by-Step Implementation Guide
git rm insurance_pool_demo.exe insurance_pool_demo.pdb*.exe,*.pdb,*.txtin contract directories,.idea/,.codexerrors.txt(from compilation/test output) andtest_out.txt(from test runs) should be moved totarget/or deletedAGENTS.mdexplaining purpose of AI agent configurationsgit rm -r .idea/and add to global .gitignoreVerification & Testing Steps
git clean -nto verify files are properly excludedcargo build --package utility_contracts(should pass with no changes)cargo test --package utility_contractsgit count-objects -vHbefore and aftercargo testshould produce identical test results