Skip to content

Tryorama -> sweettest for agent, dm, and file-store language#681

Merged
lucksus merged 3 commits intodevfrom
test/languages-sweetests
Feb 19, 2026
Merged

Tryorama -> sweettest for agent, dm, and file-store language#681
lucksus merged 3 commits intodevfrom
test/languages-sweetests

Conversation

@lucksus
Copy link
Copy Markdown
Member

@lucksus lucksus commented Feb 19, 2026

and change CI to run those with our Docker image

Summary by CodeRabbit

Release Notes

  • Chores
    • Refactored CI/CD testing pipeline for improved build reliability.
    • Enhanced integration test infrastructure across agent, direct message, and file storage modules with improved test coverage and DHT synchronization validation.
    • Optimized build processes to target specific packages, reducing build time and complexity.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 19, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR migrates integration testing infrastructure across three bootstrap languages (agent-language, direct-message-language, file-storage) from Node.js/pnpm to Rust/SweetTest. Updates include GitHub Actions workflows, build scripts with targeted cargo compilation, new Rust-based test suites with utilities, and removal of legacy TypeScript tests. Source code visibility adjustments enable test access.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/agent-language-tests.yml, direct-message-language-tests.yml, file-storage-language-tests.yml
Replaced multi-language pnpm workflows with Rust-centric CI: removed Node.js steps, added Cargo dependency caching, replaced build/test with Rust-specific commands (cargo build, cargo test), targeting ubuntu-22.04.
Build Scripts
bootstrap-languages/.../hc-dna/build.sh (3 files)
Updated cargo build invocations to target specific packages using -p flags instead of building all targets; narrowed scope to selected zomes while maintaining hc dna pack and hc app pack flow.
Cargo Workspace Configuration
bootstrap-languages/.../hc-dna/Cargo.toml (3 files)
Added tests/sweettest as workspace member and added trailing commas for consistency formatting across agent-language, direct-message-language, and file-storage.
Agent Language Integration Tests
bootstrap-languages/agent-language/hc-dna/tests/sweettest/Cargo.toml, src/integration_tests.rs, src/lib.rs, src/test_agent_expression.rs, src/utils.rs
New Rust test suite with SweetTest infrastructure for agent expression lifecycle: setup conductors, create/retrieve/update expressions, multi-agent DHT synchronization scenarios. Provides utilities for DNA loading, conductor setup, zome calls, and consistency waits.
Direct Message Integration Tests
bootstrap-languages/direct-message-language/hc-dna/tests/sweettest/Cargo.toml, src/integration_tests.rs, src/lib.rs, src/test_direct_message.rs, src/utils.rs
Rewrote test suite from Tryorama to SweetTest with comprehensive scenarios: recipient storage, status access, inbox DHT operations, access control validation, filtering by DID, P2P signal delivery. Upgraded Holochain dependencies to 0.7.0-dev.10-coasys branch, updated tokio features.
File Storage Integration Tests
bootstrap-languages/file-storage/hc-dna/tests/sweettest/Cargo.toml, src/integration_tests.rs, src/lib.rs, src/test_file_storage.rs, src/utils.rs
New Rust test suite covering chunk storage/retrieval, deduplication, multi-chunk uploads, multi-agent file sharing with DHT propagation, and error cases. Includes utilities for chunk upload loops and file expression creation.
Deleted Node.js Test Files
bootstrap-languages/direct-message-language/hc-dna/tests/package.json, src/index.ts, tsconfig.json
Removed legacy Tryorama-based test infrastructure, including Node.js project config and end-to-end test suite with recipient/status/inbox/P2P signal test cases.
Source Code Visibility Changes
bootstrap-languages/agent-language/hc-dna/zomes/agent_store_integrity/src/lib.rs, bootstrap-languages/file-storage/hc-dna/zomes/integrity/src/lib.rs, bootstrap-languages/file-storage/hc-dna/workdir/dna.yaml
Made struct fields public in agent_store_integrity (did, perspective, direct_message_language). Added FileChunk Clone derive with public field, introduced FileMetadata and FileExpression structs with #[hdk_entry_helper]. Added integrity dependency to file_storage zome in dna.yaml.

Sequence Diagram(s)

sequenceDiagram
    participant Test as Integration Test
    participant Setup as Test Setup
    participant Conductor as SweetConductor
    participant Cell as SweetCell
    participant Zome as Zome Function
    participant DHT as DHT Network

    Test->>Setup: setup_conductors(n, network=true)
    Setup->>Conductor: load DNA & initialize conductor(s)
    Setup->>Cell: create app & cells for agents
    Setup-->>Test: return (conductors, cells)
    
    Test->>Test: create test data (AgentExpression, etc.)
    Test->>Conductor: call_zome(create_agent_expression)
    Conductor->>Zome: invoke zome function
    Zome->>DHT: store entry
    Zome-->>Conductor: return entry hash
    Conductor-->>Test: deserialized result
    
    Test->>Test: await_consistency(delay)
    Note over DHT: DHT sync propagation
    
    Test->>Conductor: call_zome(get_agent_expression)
    Conductor->>Zome: invoke zome function
    Zome->>DHT: retrieve entry
    DHT-->>Zome: fetched entry
    Zome-->>Conductor: return deserialized entry
    Conductor-->>Test: result
    
    Test->>Test: assert on retrieved data
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 From Node.js pnpm forests we hop away,
To Rust and SweetTest, a brighter day!
With conductors spinning and cells aligned,
DHT consistency—no race we'll find.
Our zomes now tested, our schemas clear—
Integration bliss has finally arrived here! 🎉

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test/languages-sweetests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lucksus lucksus merged commit 09f7d39 into dev Feb 19, 2026
0 of 2 checks passed
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