Repository navigation
docs: rewrite the researchers section - #90
Conversation
Rewrite the start page, add a page on running a workflow across the TES services of several Nodes, rewrite the SPE page with the steps for researchers and operators, and mark the Crypt4GH tutorial as needing proTES 0.3.0. Point Funnel to calypr/funnel and fix broken links. Closes #66 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Reviewer's GuideRewrites the Researchers documentation into task-oriented guidance for federated TES workflows, WESkit-based secure processing environments, and Crypt4GH with proTES, while correcting stale links and clearly marking deployment and compatibility gaps. Sequence diagram for federated workflow execution through proTESsequenceDiagram
participant Researcher
participant Notebook
participant proTES
participant TES1
participant TES2
Researcher->>Notebook: jupyter-lab demo.ipynb
Notebook->>TES1: Submit workflow tasks
TES1-->>Notebook: Task results
Notebook->>TES2: Submit workflow tasks
TES2-->>Notebook: Task results
Notebook->>proTES: Submit workflow tasks
proTES->>TES1: Forward task
proTES->>TES2: Forward task
TES1-->>proTES: Task result
TES2-->>proTES: Task result
proTES-->>Notebook: Workflow results
Sequence diagram for Crypt4GH task decryption with proTESsequenceDiagram
participant Researcher
participant proTES
participant Middleware
participant Funnel
participant Container
participant Results
Researcher->>proTES: POST /ga4gh/tes/v1/tasks
proTES->>Middleware: Process task with Crypt4GH middleware
Middleware->>Funnel: Submit decrypt executor and task
Funnel->>Container: Decrypt .c4gh files
Container->>Container: Run researcher task command
Container-->>Funnel: Task output
Funnel-->>proTES: Task status and outputs
proTES-->>Researcher: Task ID and results
Funnel->>Results: Store analysis results
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Documentation build overview
|
There was a problem hiding this comment.
Hey - I've found 8 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/researchers/crypt4gh-with-protes.md" line_range="3" />
<code_context>
-Create a configuration file named `server-config.yaml` in the cloned Funnel directory on your **server VM**:
+# Crypt4GH with proTES
+
+This page shows how researchers can analyse Crypt4GH-encrypted sensitive
+data without getting access to the decrypted data. A data holder encrypts
+the data with [Crypt4GH](https://crypt4gh.readthedocs.io/). The researcher
</code_context>
<issue_to_address>
**Decrypted data can escape**
When researchers can submit or alter the task command, the documented flow runs researcher-controlled commands on decrypted files, so a command can copy plaintext into TES outputs or send it elsewhere, making the page’s confidentiality promise false.
Restrict tasks to trusted, approved commands and prevent them from exposing plaintext through outputs or network access.
Also at `docs/researchers/crypt4gh-with-protes.md:4`, `docs/researchers/crypt4gh-with-protes.md:8`.
</issue_to_address>
### Comment 2
<location path="docs/researchers/crypt4gh-with-protes.md" line_range="85-86" />
<code_context>
```
-**Configuration Details:**
+The server listens on all interfaces (`HostName`), serves its HTTP API on
+port 8000 and the RPC port for workers on 9090. `Compute: "manual"` means
+that you start the workers yourself. Start the server:
</code_context>
<issue_to_address>
**Untrusted callers can submit Funnel tasks**
When the Funnel VM is reachable from an untrusted network, an external caller can submit a task to the exposed Funnel API, which the worker executes; this gives the caller a path to run tasks on the worker and access data available to those tasks. The setup does not configure authentication or restrict the API and RPC ports to trusted peers.
Restrict the API and RPC ports to the proTES gateway and worker on a private network, and document how to enable authentication before exposing Funnel beyond a trusted test network.
</issue_to_address>
### Comment 3
<location path="docs/researchers/spe-with-weskit.md" line_range="71" />
<code_context>
+ dashboard](https://gitlab.com/one-touch-pipeline/weskit/gui/-/tree/spe4hd_demo)
+ is a lightweight web app to run and watch workflows. You can use it as a
+ template for your own.
+6. **Connect LS Login.** Register one service at LS Login (see the
+ [LS Login guide](https://www.lifescience-ri.eu/registering-integrating-and-managing-your-service/))
+ for WESkit, the S3 server and the web interface. Configure WESkit for
</code_context>
<issue_to_address>
**Services cannot authenticate independently**
When an operator follows the setup to configure LS Login for all three components, registering one LS Login service for WESkit, S3 and the web interface leaves the other services without their own client configurations and credentials; their callbacks fail, and sharing a client identity and secret weakens isolation between the integrations.
Register a separate LS Login client, with its own credentials and redirect URI, for each service.
Also at `docs/researchers/spe-with-weskit.md:72-73`.
</issue_to_address>
### Comment 4
<location path="docs/researchers/crypt4gh-with-protes.md" line_range="372-374" />
<code_context>
-Each task submission returns a task ID that you can use to monitor progress:
+Use `task2_encrypt_file.json` and `task3_decrypt_and_write_size.json` in the
+same way. Replace `localhost:8080` with the address of your proTES. If your
+proTES requires access tokens (see its [access
+control](https://protes.readthedocs.io/en/v0.3.0/access-control/)), add an
+`Authorization: Bearer` header. Each submission returns a task ID. Use it to
+watch the task:
</code_context>
<issue_to_address>
**Remote bearer tokens travel in cleartext**
When a researcher follows the replacement instruction for a remote proTES endpoint that requires a token, the task example uses `http://`, and the instruction says to replace only `localhost:8080` before adding a bearer token. For a remote proTES endpoint, `curl` therefore sends the token unencrypted, where a network observer can capture and reuse it.
Use an `https://` URL for remote proTES endpoints and state that the HTTP example is for localhost testing only.
</issue_to_address>
### Comment 5
<location path="docs/researchers/crypt4gh-with-protes.md" line_range="374" />
<code_context>
+same way. Replace `localhost:8080` with the address of your proTES. If your
+proTES requires access tokens (see its [access
+control](https://protes.readthedocs.io/en/v0.3.0/access-control/)), add an
+`Authorization: Bearer` header. Each submission returns a task ID. Use it to
+watch the task:
</code_context>
<issue_to_address>
**Task polling is rejected**
When proTES access control is enabled and the researcher checks a submitted task’s status, the task-status `curl` omits the bearer header, so proTES rejects the request with `401 Unauthorized` and the researcher cannot monitor the task using the documented command.
Include the `Authorization: Bearer` header in the task-status request as well as the submission request.
</issue_to_address>
### Comment 6
<location path="docs/researchers/federated-workflows.md" line_range="42-43" />
<code_context>
+ line;
+ - `.inputs`: the location and the URL of each input file, and one line
+ `workflow` with the input of the workflow;
+ - `.env`: `FUNNEL_SERVER_USER` and `FUNNEL_SERVER_PASSWORD` for Funnel
+ services, and `TES_GATEWAY`, the address of the proTES gateway.
+3. Start the notebook:
+
</code_context>
<issue_to_address>
**Funnel passwords can enter source control**
When a researcher commits or shares the cloned project directory containing `.env`, the instructions place `FUNNEL_SERVER_USER` and `FUNNEL_SERVER_PASSWORD` in a `.env` file inside the cloned repository without warning that it contains secrets or should remain untracked. If the researcher commits or shares the project, the Funnel credentials are exposed.
Explicitly require keeping `.env` out of version control and shared artifacts, and recommend restricting its local permissions or using a secret store.
</issue_to_address>
### Comment 7
<location path="docs/researchers/spe-with-weskit.md" line_range="85-89" />
<code_context>
+
+### Results copy script
+
+WESkit writes the file `log.json` into the log folder of a run when the run
+has finished. The script looks for new finished runs, uploads their file
+`results.csv` to the bucket if the run made the plot `plots/quals.svg`, and
+marks the run with the file `upload_token`,
+so that it uploads each run only once. Replace `USERNAME` and `PASSWORD`, and
+adapt the paths and files to your workflow.
</code_context>
<issue_to_address>
**Failed uploads are marked complete**
When `mc cp` fails, for example during a transient storage or network error, the script still touches `upload_token` after `mc cp`, even when the copy fails; later cron runs see the token and skip the directory, so the researcher never receives that run’s results.
Create `upload_token` only after a successful upload, and leave failed uploads eligible for retry.
</issue_to_address>
### Comment 8
<location path="docs/researchers/federated-workflows.md" line_range="11-16" />
<code_context>
+gateway, which forwards each task to one of the TES services.
+
+!!! warning "Under construction"
+ The demonstrator dates from 2023 and was not updated for the current
+ products. Its README lists the versions that it was built for: for
+ example, the proTES image `elixircloud/protes:20230218`. proTES 0.4.0
+ configures its TES services differently (`custom.tes.backends` instead
+ of `tes.service_list`: see the [upgrade
+ steps](https://protes.readthedocs.io/en/latest/upgrading/)). There is no
+ public deployment with a guaranteed uptime, either. Until both are
+ documented, deploy the services yourself or write to
</code_context>
<issue_to_address>
**Outdated demonstrator steps**
The walkthrough says the demonstrator dates from 2023 and was not updated for current products, but still directs researchers to use its files and notebook without current proTES configuration. This leaves the request to fix or remove outdated steps unmet.
</issue_to_address>Linked issues
#66 docs: rewrite the researchers section · 3 of 5 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Check every page against the current deployment and products; fix or remove outdated versions, URLs and steps. | 🟡 Partly met | The pages update many references and document known limitations, but the federated-workflow and Crypt4GH instructions still rely on outdated or unverified setup details. |
| 2 | Use plain, simple, correct English, consistent terms, short sentences, and numbered steps. | ✅ Met | The rewritten pages use short, task-oriented sections and numbered steps where appropriate. |
| 3 | Link to product documentation for generic instructions instead of repeating them. | ✅ Met | The pages link to upstream WESkit, Funnel, proTES and workflow-engine documentation for generic setup guidance. |
| 4 | Fill the stubs that #63 left in this section. | ✅ Met | The new federated-workflows page provides a demonstrator walkthrough. |
| 5 | Let a reader follow the section from its start page to a working result without outdated or repeated content. | 🟡 Partly met | The pages provide routes and steps, but the start page says researchers cannot yet find published TES addresses or documented access, and two tutorials retain outdated or unverified setup instructions. |
Sourcery assessment
Approval pending. 8 findings to address first.
Blocking findings: docs/researchers/crypt4gh-with-protes.md:3, docs/researchers/crypt4gh-with-protes.md:86, docs/researchers/spe-with-weskit.md:71, docs/researchers/crypt4gh-with-protes.md:374, docs/researchers/crypt4gh-with-protes.md:374, and 3 more
Warn that task commands see decrypted data, restrict the Funnel ports, register one LS Login client per service, retry failed uploads of the results script, protect the .env file and use HTTPS for remote proTES. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
There was a problem hiding this comment.
Linked issues
#66 docs: rewrite the researchers section · 3 of 5 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Check each page against the current deployment and products, and fix or remove outdated content. | 🟡 Partly met | The pages flag known limitations, but the federated demonstrator remains unupdated for current products, and the Crypt4GH middleware setup and tested versions are still missing. |
| 2 | Use plain, simple English, task-oriented sections, numbered steps, and consistent terms. | ✅ Met | |
| 3 | Link to product docs for generic instructions instead of repeating them. | ✅ Met | |
| 4 | Fill the stubs left by #63 in this section. | ✅ Met | The new federated-workflows page provides steps for the demonstrator that the start page previously identified as missing. |
| 5 | Let a researcher follow the start page to a working result without outdated or repeated content. | 🟡 Partly met | The pages provide entry points and steps, but the deployment has no published TES service addresses or documented access process, and the Crypt4GH middleware installation is not documented. |
Summary
Rewrites the Researchers section (part of #61).
demo-tes-hybrid-clouddemonstrator (Snakemake through TES services and the proTES gateway), taken from its README and notebook.main). Funnel now links tocalypr/funnel. The task files are unchanged.mkdocs.yml. No page moved, so no new redirects.Closes #66
Part of #61.
Facts checked
.tes_instances,.inputs,.env,jupyter-lab demo.ipynb), its 2023 versions: README and notebook ofelixir-cloud-aai/demo-tes-hybrid-cloud.custom.middlewares, plugins replace middlewares: proTES upgrade notes and release notes of v0.4.0. proTES 0.3.0 has the middleware loader andcustom.middlewares: the v0.3.0 tag. No Crypt4GH plugin in foca-plugins 0.1.0; the middleware repository's last commit is from 2024.Compute: manual,RPCClient.ServerAddress,Node,Worker.WorkDir,LocalStorage.AllowedDirs,node run): compared with the default config ofcalypr/funnel.spe4hd_demo: exist (HTTP 200).Verification
python scripts/check_names.py: passes.mkdocs build --strict: passes (locally).pytest: 25 passed, 100 % coverage.Lane
Light lane: docs only, no code, secrets or workflows. I reviewed the diff myself; no reviewer subagents.
Declined review findings
None yet (light lane, no reviewer subagents).
Open questions
Marked "Under construction" in the pages and collected in #89; nothing was invented:
🤖 Generated with Claude Code
https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Summary by Sourcery
Rewrite the Researchers documentation to give users clearer paths for running federated workflows and securely processing sensitive data.
New Features:
Bug Fixes:
Enhancements:
Documentation: