Skip to content

test(contracts): validate howl.* envelopes against vendored schema (Go, no howldream import) - #41

Merged
howlcipher merged 1 commit into
mainfrom
feat/howl-contract-schema-validation
Sep 12, 2026
Merged

howlcipher merged 1 commit into
mainfrom
feat/howl-contract-schema-validation

Conversation

@howlcipher

Copy link
Copy Markdown
Owner

Summary

  • Adds contracts/howl/, a pure-Go package that loads and compiles the vendored howl.* JSON Schema files (copied from howldream@bd10b18, pinned in contracts/howl/SOURCE.md) and validates envelopes against them using github.com/santhosh-tekuri/jsonschema/v5.
  • This is the cross-language contract test tracked in howldream/issues.md item 1: proof that the schema is useful to a consumer with no Python, no howldream import, and no network access at test time.
  • contract_test.go covers: a valid envelope validates; missing required field fails; unsupported schema_version fails; out-of-enum verification_status fails; forged authority.executable=true fails; injected privileged fields (executor, execution_capability, approved, bypass_review) fail via additionalProperties: false; a nested candidate with forged trust="VERIFIED" fails; all five vendored schemas compile.
  • Un-ignores go.sum (previously gitignored when this module had zero dependencies) since this introduces the module's first external dependency.

Test plan

  • gofmt -l . — clean
  • go vet ./... — clean
  • go build ./... — clean
  • go test ./... — all packages pass, including the new contracts/howl (9 test cases) and the existing apps/candidate_evaluator (confirms the recently-merged evaluator still passes on main)
  • CI green on this PR

🤖 Generated with Claude Code

https://claude.ai/code/session_01RrPsEcYPRHDjPnZVViLi48

…o, no howldream import)

Adds contracts/howl/, a pure-Go package that loads and compiles the
vendored howl.* JSON Schema files (copied from howldream commit
bd10b18, pinned in SOURCE.md) and validates envelopes against them
using github.com/santhosh-tekuri/jsonschema/v5.

This is the cross-language contract test referenced in
howldream/issues.md item 1: contract_test.go proves a real
howl.exploration_result/v1 envelope validates, and that forged
authority.executable, an out-of-enum verification_status, an
unsupported schema_version, a missing required field, an injected
privileged field, and a nested candidate with forged trust all fail
validation — with no Python, no howldream import, and no network
access at test time.

Un-ignores go.sum (previously gitignored when this module had zero
dependencies) since this is the module's first external dependency
and needs checksum pinning for reproducible builds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrPsEcYPRHDjPnZVViLi48
@howlcipher
howlcipher merged commit 55d4b15 into main Sep 12, 2026
1 check passed
@howlcipher
howlcipher deleted the feat/howl-contract-schema-validation branch September 12, 2026 05:25
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