Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Default owner for everything in the repo.
# Must be a GitHub login (username), not a display name — htcom-code's display
# name happens to be "htjulia", but @-references resolve by login only.
# See https://docs.github.com/articles/about-code-owners
* @htcom-code
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: htcom-code
#patreon: # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
#polar: # Replace with a single Polar username
#buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
#thanks_dev: # Replace with a single thanks.dev username
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Bug report
description: Protrus misbehaves — wrong result, crash, leaked worker/container, or a gate / isolation / MCP / debug fault.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for the report. **Protrus** is a Rust host for signed WebAssembly component
modules: it verifies, deploys, routes, hot-swaps and unloads them in-process, in worker
processes, or in OCI containers, behind a `/platform` REST and MCP control plane.

The reports we most want:
- **A gate that let something through** — an unsigned or untrusted artifact, a refused
capability, or a failing candidate that ended up serving.
- **A serving revision lost** — a failed update, rollback or restart that left a module
down or routed to the wrong revision.
- **Leftovers** — worker processes, containers, sockets or networks that outlive their module.
- **Protean parity** — a REST / MCP / config / error contract that differs from Java Protean
without a `non-parity` note in `docs/design/`.

**Security issues:** do **not** file here — see [SECURITY.md](../blob/main/SECURITY.md).
- type: textarea
id: reproducer
attributes:
label: Minimal reproducer
description: The bootstrap JSON, the signed manifest, and the REST/MCP calls that trigger the bug. A failing test is ideal.
render: json
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behaviour
description: What you expected Protrus to do (and, if relevant, what Java Protean does).
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behaviour
description: What happened instead. Include the HTTP status / MCP error and the host's stderr events.
validations:
required: true
- type: dropdown
id: topology
attributes:
label: Host topology (`execution_mode`)
options:
- async-wasm
- worker
- oci
validations:
required: true
- type: input
id: version
attributes:
label: Protrus version or commit
placeholder: e.g. 0.1.0 or a commit SHA
validations:
required: true
- type: input
id: environment
attributes:
label: OS / Rust toolchain / Docker
placeholder: e.g. Ubuntu 24.04, rustc 1.97.1, Docker 28
validations:
required: true
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/htcom-code/protrus/security/advisories/new
about: Report a vulnerability privately — do not open a public issue. See SECURITY.md.
- name: Question / usage help
url: https://github.com/htcom-code/protrus/discussions
about: For "how do I …" questions and embedding help, open a Discussion rather than a bug report.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Feature request
description: Suggest a Protrus capability — lifecycle, gates, isolation, worker/OCI, MCP, debugging, data access, or an embedding API.
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
**Protrus** is a library: embedders cannot patch it where they use it, so it aims to carry
every Java Protean capability, exposed or not as the embedder chooses. Before proposing,
please check [ROADMAP.md](../blob/main/ROADMAP.md) — some things are deliberately not done:

| Not planned | Why |
| --- | --- |
| Compiling Java (or any) source on the server | Modules are pre-built, signed Wasm components |
| Returning a module's source (`get_module_source`) | A component cannot be turned back into source |
| JVM-only knobs (`worker.jvm-args`, executor pools, shared classpath dirs) | No JVM; the Wasm equivalents are described in `docs/design/30` |
| Java bridge wire format (`/__bridge/invoke`, reflection JSON, HMAC) | Host services use named `service@version` calls over private sockets |
- type: textarea
id: problem
attributes:
label: Problem / use case
description: What are you trying to do, and what is missing or awkward today?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: The API, config key, manifest field or behaviour you would like. If Java Protean already has it, name the class or key.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
47 changes: 47 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
Thanks for contributing to Protrus! Keep the title in Conventional Commits form,
e.g. `fix(gate): keep the serving revision when a candidate fails verification`.
PRs are squash-merged, so the title becomes the commit subject on `main`.
Delete any section that does not apply.
-->

## What & why

<!-- What does this change do, and what problem does it solve? Link the issue. -->

## Type of change

- [ ] `fix` — bug fix (no new API)
- [ ] `feat` — new capability (lifecycle, gates, isolation, worker/OCI, MCP, debug, data access)
- [ ] `perf` — performance, no observable behaviour change
- [ ] `docs` — documentation only
- [ ] `refactor` / `chore` / `test` / `ci` — no behaviour change

## Invariants (see CONTRIBUTING.md)

- [ ] **Protean parity** — every changed HTTP / MCP / config / error surface was checked against the
Java Protean contract; any deliberate difference is recorded as `non-parity` in `docs/design/`
(reason, user impact, migration, verification).
- [ ] **No gate bypass** — nothing deploys or launches an artifact without the signature and
promotion gates; worker and OCI launches still re-verify.
- [ ] **Revision fencing** — a failed candidate never replaces the serving revision.
- [ ] **Capability boundary** — a module gets only what it was granted; no secret reaches argv,
environment, container labels or logs.
- [ ] **No leftovers** — workers, containers, sockets and Docker test fixtures are cleaned up.

## Verification

```bash
cargo test --workspace
# OCI / Docker paths, when touched:
cargo test -p protrus-host --test mcp_scenarios -- --ignored
cargo test -p protrus-host --test async_host_composition -- --ignored
```

- [ ] `cargo test --workspace` passes (Docker-backed tests ran, or say why not)
- [ ] No new `cargo clippy --workspace --all-targets` warnings
- [ ] Docs updated if behaviour or configuration changed (`README.md`, `docs/guide/`, `docs/design/`)

## Related

<!-- Closes #123 -->
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2
updates:
# The Rust workspace (crates/*). Grouped so one PR carries a coherent set of bumps.
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
groups:
# wasmtime and its crates move in lockstep (one release number); the component host,
# the linker and the guest-debug API are all pinned to it.
wasmtime:
patterns:
- "wasmtime*"
- "wasi-*"
- "cranelift-*"
# sqlx crates share one version line (the SQL module store and the worker DB adapters).
sqlx:
patterns:
- "sqlx*"
# Everything else that is not a major bump.
rust-minor-and-patch:
update-types: ["minor", "patch"]
exclude-patterns:
- "wasmtime*"
- "wasi-*"
- "cranelift-*"
- "sqlx*"
# poc/* and examples/artifacts/* are guest-component fixtures with their own lockfiles;
# their versions follow the WIT world, not Dependabot.

# GitHub Actions used in .github/workflows/.
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
groups:
actions:
patterns: ["*"]
101 changes: 101 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# GitHub Actions CI. The gate is `cargo test --workspace` (the same command as CONTRIBUTING.md)
# plus a RustSec audit; `ci-complete` is the single required status.
#
# What runs where:
# - test: the whole workspace. Guest-component fixtures are built on the fly with the
# wasm32-unknown-unknown target and wasm-tools. GitHub-hosted ubuntu runners ship Docker, so
# the PostgreSQL / MySQL tests that start throwaway containers run here too.
# - docker-integration: the `#[ignore]`d OCI tests (container scenario, signed OCI pairs). They
# build the production Linux worker image inside Docker, which takes minutes, so they run on
# pushes to main and on demand rather than on every PR, and are not part of the gate.

name: CI

on:
push:
branches: [main]
paths:
- "**/*.rs"
- "**/Cargo.toml"
- "**/Cargo.lock"
- "**/*.wit"
- "**/*.sh"
- "poc/worker-container-fixture/**"
- "examples/**"
- ".github/workflows/ci.yml"
# No paths filter on pull_request on purpose: every PR runs the workflow so the required
# `ci-complete` check always reports. A filtered PR trigger skips the whole workflow on a
# docs-only PR and leaves the required check waiting forever.
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
# Incremental caches only grow on CI; they are never reused across runs.
CARGO_INCREMENTAL: "0"

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v7.0.1
- uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc
with:
toolchain: "1.97.1"
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2.9.3
- uses: taiki-e/install-action@v2.90.8
with:
tool: wasm-tools@1.263.0
- name: test
run: cargo test --workspace --locked

audit:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7.0.1
- uses: taiki-e/install-action@v2.90.8
with:
tool: cargo-audit
- name: RustSec advisories
run: cargo audit

docker-integration:
if: github.event_name != 'pull_request'
needs: test
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v7.0.1
- uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc
with:
toolchain: "1.97.1"
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2.9.3
- uses: taiki-e/install-action@v2.90.8
with:
tool: wasm-tools@1.263.0
- name: container scenario
run: cargo test --locked -p protrus-host --test mcp_scenarios -- --ignored
- name: signed OCI pairs
run: cargo test --locked -p protrus-host --test async_host_composition -- --ignored

# The single required status: green only when every gate job succeeded.
ci-complete:
if: always()
needs: [test, audit]
runs-on: ubuntu-latest
steps:
- name: gate
run: |
echo "test=${{ needs.test.result }} audit=${{ needs.audit.result }}"
[ "${{ needs.test.result }}" = success ] && [ "${{ needs.audit.result }}" = success ]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ target/
/artifacts/
/poc/component-echo/src/bindings.rs
/poc/module-component/src/bindings.rs

# Agent working notes are kept locally, not in the public repository.
AGENTS.md
15 changes: 0 additions & 15 deletions AGENTS.md

This file was deleted.

Loading
Loading