--account N was silently ignored when UNSANDBOX_PUBLIC_KEY/SECRET_KEY
env vars were set. The credential resolution checked env vars at tier 2
before ever reaching the CSV lookup, so the explicit flag had no effect.
Correct priority order (all 8 SDKs):
1. CLI -p/-k flags (explicit key args)
2. --account N → direct CSV row lookup (bypasses env vars)
3. UNSANDBOX_PUBLIC_KEY / UNSANDBOX_SECRET_KEY env vars
4. ~/.unsandbox/accounts.csv default (row 0 or UNSANDBOX_ACCOUNT)
SDKs updated: C, Python, Go, JavaScript, Ruby, PHP, Java, Rust
Also adds:
- --account N flag to CLI parsers in all 8 SDKs (Go, PHP, Java, Rust
previously had no flag at all; Python/JS/Ruby had the parameter but
never wired it to the CLI)
- test_account_flag.sh integration test for each SDK verifying the
priority behavior with real and garbage credentials
- test-integration Makefile target for the C SDK
Each test file covers 10 real API tests matching the C SDK reference:
health_check, validate_keys, get_languages, execute, execute_error,
session_list, session_lifecycle, service_list, snapshot_list, image_list.
All tests skip cleanly without credentials. No soft passes.
Updated all 7 Makefiles to run dedicated functional test files.
_load_credentials_from_csv used enumerate index (counting comments/blanks)
instead of a data-line counter, so CSVs with comments on line 0 would
never match account_index 0.
test_credentials_missing_all failed on machines with ~/.unsandbox/accounts.csv
because the test didn't isolate the home directory lookup. Now mocks
_get_unsandbox_dir and chdir to tmp_path.
Fixed in both sync and async SDKs.
Add per-client Makefiles for C, Python, and Go with:
- CLI mode: Tests --help, arg parsing, syntax validation
- Library mode: Unit tests, import verification
- Integration mode: API contract validation (with credentials)
- Functional mode: Real-world scenario tests
C client:
- 22 library tests (SHA-256, HMAC-SHA256, detect_language)
- Full unsandbox.c implementation with examples
Python client (sync + async):
- Delegates to sync/ and async/ subdirectories
- pytest-based test suites with coverage
- Examples for concurrent execution, streaming
Go client:
- Delegates to sync/ and async/ subdirectories
- go test integration with vet and fmt
Also update detect-changes.sh to detect changes in
both root-level un.* files AND clients/ directory.