Commit graph

13 commits

Author SHA1 Message Date
59e6d4ebf8 Create comprehensive SDK testing and refactoring framework for agents
- test_sdk_library.py: Python test framework for validating library functions
- run_sdk_tests.sh: Master test runner for all language SDKs
- SDK_TESTING_GUIDE.md: Detailed guide on test structure and patterns
- AGENT_REFACTORING_INSTRUCTIONS.md: Step-by-step refactoring walkthrough
- REFACTORING_CHECKLIST.md: Comprehensive checklist for SDK refactoring

Agents can now validate their refactoring work independently with:
  python3 tests/test_sdk_library.py --languages {language}
  ./tests/run_sdk_tests.sh --languages {language}

Framework tests:
- Unit tests: credential loading, HMAC signing, function signatures
- Integration tests: real API calls (requires UNSANDBOX_API_KEY)
- Functional tests: end-to-end CLI execution

This enables parallel refactoring with automatic validation.
2026-01-15 14:51:32 -05:00
a46bf88a3e Fix V result redefinition and Crystal nil type error
- V: Rename result variables in cmd_key to avoid redefinition (xdg_result, mac_result, win_result)
- Crystal: Fix Bool | Nil type by explicitly checking stdout.nil? before string check

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 10:04:06 -05:00
9329d9365f Fix Crystal test class variables and V implementation syntax
- Crystal: Wrap class variables in TestCounter class (top-level @@ not allowed)
- V: Fix deprecated const() syntax to individual const declarations
- V: Fix os.execute or-blocks to use exit_code checks
- V: Fix shell variable escaping (use $ for literal $ in shell strings)
- README: Add unit test documentation and CI badge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 09:57:49 -05:00
160740e1ea Fix Elixir warning and Go cache warnings
- Elixir: Remove unused module attributes @passed/@failed
- Go: Add cache: false to all setup-go actions (no go.sum file)
2026-01-06 09:46:48 -05:00
6a431abd07 Fix Julia HMAC tests - convert secret to Vector{UInt8} 2026-01-06 09:43:40 -05:00
dc29e64196 Fix Julia, Lua, and OCaml test failures
- Julia: Rename test() to run_test() to avoid name collision
- Julia: Use lambda syntax instead of do-block for cleaner execution
- Lua: Fix signature format test - verify structure instead of counting colons
- OCaml: Use apt-get instead of failing setup-ocaml@v2 action
2026-01-06 09:40:05 -05:00
a1eedc55ea Fix failing unit tests in GitHub Actions matrix
- Clojure: Use 'clojure' instead of 'clj -M' for standalone script
- Dart: Add proper pubspec.yaml with SDK environment constraint
- Julia: Install SHA package before running tests
- Lua: Use lua5.4 explicitly, add awk for portable HMAC output parsing
- Perl: Install libjson-perl and libwww-perl dependencies
- Bash: Make un.sh executable before test
- OCaml: Add str.cma and unix.cma for Str module support
- OCaml unit test: Remove Str dependency with pure string search
2026-01-06 09:20:41 -05:00
0b7c6fd08d Add unit tests for all 42 language implementations
Unit tests for extension mapping, signature format, language detection,
argument parsing, file operations, and API constants for:

Systems: C, C++, Rust, Go, Zig, Nim, D, V, Crystal
JVM: Java, Kotlin, Groovy, Clojure
.NET: C#, F#
Functional: Haskell, OCaml, Scheme, Common Lisp, Erlang, Elixir
Scripting: Python, Ruby, JavaScript, TypeScript, Lua, Perl, PHP, Tcl, Bash, AWK, PowerShell
Scientific: Julia, R, Fortran
Legacy/Exotic: COBOL, Prolog, Forth, Raku, Objective-C, Dart

All tests validate internal functions without API calls.
2026-01-05 22:07:13 -05:00
1e46faef8b Add unit tests for 18 languages 2026-01-05 21:35:41 -05:00
a379e061fc Add unit and integration tests for all major implementations 2026-01-05 21:29:44 -05:00
a4f9bfa377 Add HMAC authentication to all 42 implementations
- Update all un.* implementations to use HMAC-SHA256 signing
- Headers: Authorization (Bearer public_key), X-Timestamp, X-Signature
- Signature: HMAC-SHA256(secret_key, "timestamp:METHOD:path:body")
- Fix test suite issues (bash arithmetic, ES module compat, TCL shebang)
- Add CLAUDE.md with inception testing documentation
- Update README.md with HMAC auth and dependency table
- All 38 implementations pass inception test via un2
2025-12-28 14:24:03 -05:00
fd2268e11b Fix license comment syntax for JS/TS/Lua/Elixir
- JavaScript/TypeScript: Use // comments after shebang (not # which is invalid)
- Lua: Use -- comments after shebang (not # which is invalid)
- Elixir: Use # comments after shebang (not %% which is Erlang)

All 42 implementations validated passing after fixes.
2025-12-23 11:18:14 -05:00
2b35819393 Initial commit: 42 UN CLI implementations
Unsandbox CLI implementations in 42 programming languages for the
permacomputer project. Public domain software for code execution
across all ecosystems.

Languages: Python, JavaScript, Ruby, Go, Rust, C, C++, Java, Kotlin,
C#, F#, Haskell, OCaml, Clojure, Scheme, Common Lisp, Erlang, Elixir,
D, Nim, Zig, V, Dart, Groovy, Scala, Julia, R, Crystal, Fortran,
COBOL, Prolog, Forth, Tcl, Raku, Lua, PHP, Perl, Bash, TypeScript,
Objective-C, PowerShell, AWK

Includes test suites and service lifecycle tests.
2025-12-23 09:57:08 -05:00