Skip to content

Build and test

Choose verification for the changed surface and the concrete invariant at risk. Work directly on main, preserve owner work, and exercise the real path when practical. Run a full matrix only when a named security/protocol boundary or authoritative release requirement warrants it.

Terminal window
cargo fmt --all -- --check
cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
cargo test --locked --workspace --all-targets --all-features
swift build --package-path apple-identity
swift test --package-path apple-identity
swift test --package-path fascia/apple
swift test --package-path sdk/apple/TohsenoCompanionKit
swift test --package-path companion/apple/TohsenoCompanion
swift test --package-path macos/Tohseno
forge build --root contracts
forge test --root contracts -vvv
node --test studio/tests/static_assets.test.mjs
(cd website && bun run typecheck && bun test)
./scripts/test-ontology-lifecycle.sh
./scripts/test-local-companion-e2e.sh
./scripts/test-macos-service-lifecycle.sh
./scripts/test-network-e2e.sh

The lifecycle scripts use isolated service, Shot, relay and LaunchAgent fixtures. They must not touch the developer’s actual LaunchAgent or remove unrelated Keychain entries.

Terminal window
cd packages/cli
npm test
npm run test:pack

Use focused tests when adequate; an isolated packed installation checks the shipped launcher path.

Terminal window
cargo fmt --all --check
cargo clippy -p tohseno-protocol --all-targets -- -D warnings
cargo test -p tohseno-protocol --all-targets
cargo run -q -p tohseno-protocol --example generate_vectors

Generator output must exactly match the committed vector. Do not overwrite a vector merely to make drift pass.

Terminal window
swift test --package-path macos/Tohseno
swift test --package-path sdk/apple/TohsenoCompanionKit
swift test --package-path companion/apple/TohsenoCompanion
./scripts/test-local-companion-e2e.sh

The E2E uses a real isolated relay/service and deterministic fixture harness; it proves durable encrypted delivery and exact-base behavior without paid model inference or real service state.

Terminal window
cd website/docs-pages
bun install
bun run check
bun run build
bun run verify

Starlight validates content/frontmatter and produces static output in dist/, including Pagefind search. The build syncs the shared assets and current AI-readable docs first.