Event starters
Timer · shared counter & scoped mapping
Timer · shared counter & scoped mapping. Explicit variable scopes and deterministic mapping.
Last verified 2026-10-31 at f4ce7d0 — simulation fixtures
Studio activation is a one-time payment of USD 20.
Flow
Drawn at build time from the node positions in the template's process definitions. Numbered markers are the walkthrough stages.
Scroll sideways to see the whole flow.
List the 5 activities and 4 transitions
Activities
- Start
start - Increment shared counter
variables.increment - Cooperative wait
sleep - Map timer result
data.mapper - End
end
Transitions
- Start → Increment shared counter (on success)
- Increment shared counter → Cooperative wait (on success)
- Cooperative wait → Map timer result (on success)
- Map timer result → End (on success)
Walkthrough
- Increment shared counterInspect the activity and map its explicitly scoped input.
- Cooperative waitInspect the activity and map its explicitly scoped input.
- Map timer resultInspect the activity and map its explicitly scoped input.
What you will practise
- Map upstream activity outputs without waiting for live runs.
- Keep global, run-local and shared state separate.
- Run a safe simulation without activating any listener.
Sample cases
1 case with 2 assertions, run with python -m server.integration examples --all in simulation.
Sample input
PassedA complete deterministic simulation with isolated shared state. Sleep is skipped in simulation.
Expected result All fields match the scoped mapping result.
2/2 assertions
- Successful simulation
- Mapped output
This sample run only; not a production certification.
Prerequisites
- Runtime
- Cohuno runtime 1.27.0, the version recorded when these cases last passed.
- Starter
- Timer. The gallery never activates it; sample runs pass the case input directly.
- Optional dependencies
- None beyond the base runtime.
- Simulation fixtures
- None: no activity in this template uses a connector.
Verification details
Provenance
What was verified, and when. The content part changes whenever the pack, a process in its closure, the runtime version or a case result changes; the gallery check then fails until the gallery is regenerated and the changed templates are verified again.
Verified content
- Pack SHA-256
1b8da1a3d654e4e21517cd4289ca2305506c027e50fc6ce2396dfef1170f0b8f- Closure SHA-256
01caadf9a70e4414a640baa4d919cf80ba9aaae3c29af7c0a9be2ffda6c5b50b- Runtime
1.27.0- Results
- 1/1 cases, 2/2 assertions, mode simulate, external calls: none.
- Files in the closure
server/integration/example_packs/timer_context_lab.jsonserver/integration/templates/timer_context_lab.json
Verification event
- Commit
f4ce7d08eedc90267b405ed1974344153a8b3a34- Verified at (UTC)
2026-10-31T21:19:21Z
How the Cohuno team reproduces this check
PYTHONPATH=. python -m server.integration examples --example timer_context_lab PYTHONPATH=. python scripts/export_public_gallery.py --check