Skip to content

fix: code quality, security hardening, and test coverage#12

Merged
simonovic86 merged 2 commits intomainfrom
claude/zealous-sammet
Mar 5, 2026
Merged

fix: code quality, security hardening, and test coverage#12
simonovic86 merged 2 commits intomainfrom
claude/zealous-sammet

Conversation

@simonovic86
Copy link
Owner

Summary

  • CI fix: Install TinyGo before make check so WASM integration tests actually run in CI; add test coverage reporting
  • Security: Replace all MustInstantiate (panics) with error-returning Instantiate across 5 call sites (runtime, replay, simulator, tests)
  • Shared constants: Extract config.TickTimeout (100ms) used by agent, replay, and simulator — eliminates 3 duplicated literals
  • Unified manifest loading: New manifest.LoadSidecarData replaces 3 independent implementations (runner, migration, simulator)
  • New tests: 7 validateIncomingManifest tests (accept, disabled, price, memory, capability, nil policy) + 4 LoadSidecarData tests

Test plan

  • All pre-commit checks pass (fmt, vet, lint, tests)
  • go test ./... — all 19 packages pass
  • go vet ./... — clean
  • CI should now run WASM integration tests (TinyGo installed before tests)
  • CI should report test coverage summary

🤖 Generated with Claude Code

simonovic86 and others added 2 commits March 5, 2026 01:57
Extract tick loop logic from cmd/igord/main.go into internal/runner for
testability. Deduplicate captureState/replayResume (3 copies) into
internal/wasmutil. Update HOSTCALL_ABI.md from "Design Draft" to reflect
implemented state. Add WASM hash mismatch and receipt corruption tests.
Flag unimplemented spec items (CM-5, OA-2, EI-11) in status doc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace MustInstantiate with error-returning Instantiate across all WASM
init sites. Extract shared tick timeout constant to config.TickTimeout.
Unify manifest sidecar loading into pkg/manifest.LoadSidecarData. Fix CI
to install TinyGo before tests so WASM integration tests run. Add test
coverage reporting. Add validateIncomingManifest and LoadSidecarData tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonovic86 simonovic86 merged commit 71228ee into main Mar 5, 2026
1 check passed
@simonovic86 simonovic86 deleted the claude/zealous-sammet branch March 5, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant