Skip to content

Commit c528dd6

Browse files
fix(examples): complete runtime fixture relocation (#707)
1 parent 1544840 commit c528dd6

8 files changed

Lines changed: 89 additions & 10 deletions

File tree

docs/decision-log.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ Those artifacts live under `examples/`, never `apps/`.
492492
| `apps/react-demo/` | Reference Apps | `reference-apps/react-demo/` |
493493
| `apps/youaskm3-starter-kit/` | Reference Apps | `reference-apps/youaskm3-starter-kit/` |
494494
| `apps/demo-fixtures/expedition-runtime-session.json` | Traverse fixture | `examples/fixtures/expedition-runtime-session.json` |
495-
| `apps/meeting-notes/app.manifest.json` | Traverse fixture | `examples/applications/meeting-notes/app.manifest.json` |
496-
| `apps/traverse-starter/app.manifest.json` | Traverse fixture | `examples/applications/traverse-starter/app.manifest.json` |
495+
| `apps/meeting-notes/` | Traverse fixture | `examples/applications/meeting-notes/` |
496+
| `apps/traverse-starter/` | Traverse fixture | `examples/applications/traverse-starter/` |
497497

498498
### Outcome
499499

examples/applications/meeting-notes/app.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
"workflow_id": "meeting-notes.process",
2020
"workflow_version": "1.0.0",
21-
"path": "../../workflows/examples/meeting-notes/process/workflow.json"
21+
"path": "../../../workflows/examples/meeting-notes/process/workflow.json"
2222
}
2323
],
2424
"model_dependencies": [],

apps/meeting-notes/components/process/component.manifest.json renamed to examples/applications/meeting-notes/components/process/component.manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"schema_version": "1.0.0",
55
"capability_id": "meeting-notes.process",
66
"capability_version": "1.0.0",
7-
"contract_path": "../../../../contracts/examples/meeting-notes/capabilities/process/contract.json",
8-
"wasm_binary_path": "../../../../examples/meeting-notes/process-agent/artifacts/process-agent.wasm",
7+
"contract_path": "../../../../../contracts/examples/meeting-notes/capabilities/process/contract.json",
8+
"wasm_binary_path": "../../../../../examples/meeting-notes/process-agent/artifacts/process-agent.wasm",
99
"wasm_digest": "sha256:5647c39a1d25d8728350f9619025292a62e78a602068a2ad9b6f075751c93d99",
1010
"runtime_constraints": {
1111
"host_api_access": "none",

examples/applications/traverse-starter/app.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
"workflow_id": "traverse-starter.process",
2020
"workflow_version": "1.0.0",
21-
"path": "../../workflows/examples/traverse-starter/process/workflow.json"
21+
"path": "../../../workflows/examples/traverse-starter/process/workflow.json"
2222
}
2323
],
2424
"model_dependencies": [],

apps/traverse-starter/components/process/component.manifest.json renamed to examples/applications/traverse-starter/components/process/component.manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"schema_version": "1.0.0",
55
"capability_id": "traverse-starter.process",
66
"capability_version": "1.0.0",
7-
"contract_path": "../../../../contracts/examples/traverse-starter/capabilities/process/contract.json",
8-
"wasm_binary_path": "../../../../examples/traverse-starter/process-agent/artifacts/process-agent.wasm",
7+
"contract_path": "../../../../../contracts/examples/traverse-starter/capabilities/process/contract.json",
8+
"wasm_binary_path": "../../../../../examples/traverse-starter/process-agent/artifacts/process-agent.wasm",
99
"wasm_digest": "sha256:5647c39a1d25d8728350f9619025292a62e78a602068a2ad9b6f075751c93d99",
1010
"runtime_constraints": {
1111
"host_api_access": "none",

packages/web/TraverseEmbedder/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,6 @@ npm test # builds with tsc, then runs the node:test suite
123123
`npm test` compiles a set of real WASI capability modules from WebAssembly
124124
Text format via `wabt` (a devDependency, mirroring the Rust crate's `wat`
125125
crate test fixtures) and runs `BundleEmbedder` against them — including one
126-
test that loads and executes the real, checked-in `apps/traverse-starter`
126+
test that loads and executes the real, checked-in `examples/applications/traverse-starter`
127127
bundle end to end — so the browser execution engine is exercised for real,
128128
not mocked.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
repo_root="${TRAVERSE_REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
6+
7+
for forbidden_path in \
8+
"apps/demo-fixtures" \
9+
"apps/meeting-notes" \
10+
"apps/traverse-starter"
11+
do
12+
if [[ -d "${repo_root}/${forbidden_path}" ]] &&
13+
[[ -n "$(find "${repo_root}/${forbidden_path}" -type f -print -quit)" ]]; then
14+
echo "Runtime-owned fixture remains under ${forbidden_path}" >&2
15+
exit 1
16+
fi
17+
done
18+
19+
required_paths=(
20+
"examples/fixtures/expedition-runtime-session.json"
21+
"examples/applications/meeting-notes/app.manifest.json"
22+
"examples/applications/meeting-notes/components/process/component.manifest.json"
23+
"examples/applications/traverse-starter/app.manifest.json"
24+
"examples/applications/traverse-starter/components/process/component.manifest.json"
25+
)
26+
27+
for required_path in "${required_paths[@]}"; do
28+
test -s "${repo_root}/${required_path}"
29+
done
30+
31+
for app_path in \
32+
"apps/android-demo/" \
33+
"apps/browser-consumer/" \
34+
"apps/macos-demo/" \
35+
"apps/react-demo/" \
36+
"apps/youaskm3-starter-kit/" \
37+
"apps/demo-fixtures/expedition-runtime-session.json" \
38+
"apps/meeting-notes/" \
39+
"apps/traverse-starter/"
40+
do
41+
grep -Fq "\`${app_path}\`" "${repo_root}/docs/decision-log.md"
42+
done
43+
44+
for app_id in traverse-starter meeting-notes; do
45+
validate_output="$(
46+
cd "${repo_root}"
47+
cargo run -q -p traverse-cli -- app validate \
48+
--manifest "examples/applications/${app_id}/app.manifest.json" --json
49+
)"
50+
grep -q '"status": "validated"' <<<"${validate_output}"
51+
grep -q "\"app_id\": \"${app_id}\"" <<<"${validate_output}"
52+
done
53+
54+
starter_output="$(
55+
cd "${repo_root}"
56+
cargo run -q -p traverse-cli -- agent execute \
57+
examples/traverse-starter/process-agent/manifest.json \
58+
examples/traverse-starter/runtime-requests/process.json
59+
)"
60+
grep -q "status: completed" <<<"${starter_output}"
61+
grep -q "capability_id: traverse-starter.process" <<<"${starter_output}"
62+
63+
meeting_output="$(
64+
cd "${repo_root}"
65+
cargo run -q -p traverse-cli -- agent execute \
66+
examples/meeting-notes/process-agent/manifest.json \
67+
examples/meeting-notes/runtime-requests/process.json
68+
)"
69+
grep -q "status: completed" <<<"${meeting_output}"
70+
grep -q "capability_id: meeting-notes.process" <<<"${meeting_output}"
71+
72+
TRAVERSE_REPO_ROOT="${repo_root}" bash "${repo_root}/scripts/ci/runtime_home_smoke.sh"
73+
74+
echo "App ownership boundary smoke test passed."

scripts/ci/repository_checks.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ required_files=(
6767
"contracts/examples/hello-world/capabilities/say-hello/contract.json"
6868
"workflows/examples/hello-world/say-hello/workflow.json"
6969
"examples/applications/traverse-starter/app.manifest.json"
70-
"apps/traverse-starter/components/process/component.manifest.json"
70+
"examples/applications/traverse-starter/components/process/component.manifest.json"
7171
"examples/traverse-starter/process-agent/manifest.json"
7272
"examples/traverse-starter/process-agent/build-fixture.sh"
7373
"examples/traverse-starter/process-agent/src/agent.rs"
@@ -76,6 +76,7 @@ required_files=(
7676
"contracts/examples/traverse-starter/capabilities/process/contract.json"
7777
"workflows/examples/traverse-starter/process/workflow.json"
7878
"scripts/ci/traverse_starter_example_smoke.sh"
79+
"scripts/ci/app_ownership_boundary_smoke.sh"
7980
"docs/exception-process.md"
8081
"docs/project-management.md"
8182
"docs/multi-thread-workflow.md"
@@ -329,6 +330,7 @@ grep -q "hello.world.say-hello" examples/hello-world/README.md
329330
grep -q "traverse-starter.process" contracts/examples/traverse-starter/capabilities/process/contract.json
330331
grep -q "traverse-starter.process-agent" examples/traverse-starter/process-agent/manifest.json
331332
grep -q "traverse-starter.process-component" examples/applications/traverse-starter/app.manifest.json
333+
grep -q "traverse-starter.process-component" examples/applications/traverse-starter/components/process/component.manifest.json
332334
grep -q "app validate --manifest \"\$app_manifest\" --json" scripts/ci/traverse_starter_example_smoke.sh
333335
grep -q "/v1/workspaces/local-default/execute" scripts/ci/traverse_starter_example_smoke.sh
334336
grep -q "starter_status: complete" scripts/ci/traverse_starter_example_smoke.sh
@@ -495,4 +497,7 @@ TRAVERSE_REPO_ROOT="$(pwd)" bash "$(pwd)/scripts/ci/new_capability_scaffold_smok
495497
echo "Running WASI host ABI import whitelist verification..."
496498
TRAVERSE_REPO_ROOT="$(pwd)" bash "$(pwd)/scripts/ci/wasi_host_abi_imports.sh"
497499

500+
echo "Running app ownership boundary verification..."
501+
TRAVERSE_REPO_ROOT="$(pwd)" bash "$(pwd)/scripts/ci/app_ownership_boundary_smoke.sh"
502+
498503
echo "Repository checks passed."

0 commit comments

Comments
 (0)