Worked Examples
Validate scientifically research collaboration exports — Workspace
Validate scientifically research collaboration exports — Workspace Application: Workspace Status: Useful first draft, not a production-verified procedure. Research and governance question Evaluate whether research collaboration ex
Application: Workspace
Related applications: Research, Library, Workbench, Research Hub, Reporting Studio, Platform Core
Classification: Scientific Validation / Collaboration and Export Governance
Audience: Research software engineers, data stewards, computational scientists, reviewers, and platform operators
Technical level: Intermediate to advanced
Estimated reading time: 18–24 minutes, excluding execution and review
Example contract: sc-collaboration-export-demo/1 (illustrative; not a deployed API schema)
Primary acceptance: Each recipient obtains only material approved for that exact project, revision, purpose, and access context, with intact files, traceable provenance, usable methods, and independently examinable limitations.
1. Research question and validation boundary
The governing question is whether a collaboration export preserves both scientific meaning and institutional authority when material leaves its originating Workspace. A technically successful download is insufficient. The recipient must be able to identify what was exported, why it was permitted, which revision the export represents, which transformations produced its results, and whether the information supports the intended inference.
Evaluate three independent claims: (1) scope correctness—only approved objects and metadata were transferred; (2) technical integrity—the recipient received exactly the declared revision and unchanged bytes; and (3) scientific interpretability—methods, units, source references, assumptions, uncertainty, and limitations remain sufficient to assess the findings. A checksum can support the second claim, but cannot independently establish the first or third.
For a required authorized set A and actual exported set E, the exclusion requirement is E − A = ∅. Completeness of required materials is A − E = ∅ unless the approval explicitly permits a documented subset. A receiver should also reject unexpected files not declared in the manifest.
2. Scope, actors, and threat model
Record the exporting organization, project, immutable source revision, export purpose, intended recipients, applicable data license, consent or confidentiality restrictions, approving authority, access decision, expiry conditions, and revocation procedure. Distinguish the project owner, scientific author, independent reviewer, operator, and recipient; one role should not silently substitute for another.
Consider accidental over-sharing, cross-project or cross-organization access, stale approval, changed files after review, path traversal, symlink substitution, unsupported schema versions, incomplete provenance, and the possibility that private information appears in filenames, logs, revision histories, notebooks, embedded metadata, or GitHub commits. Audit and denial behavior should be verified with disposable synthetic identities rather than real participant records.
Authorization boundary: An export request, browser button, CSV approval field, or GitHub repository role does not by itself authorize disclosure. In a production integration, the trusted server must independently revalidate identity, authorization, recipient scope, material classification, rights, and the exact accepted revision immediately before creating or publishing an export. Revocation cannot reliably retract a copy that a recipient has already downloaded.
3. Minimum evidence and export manifest contract
| Evidence element | Why it matters | Required validation |
|---|---|---|
| Organization and project identifiers | Prevent attribution to the wrong tenant or project | Match trusted context and receiver expectations |
| Immutable revision and approval reference | Associate release with one accepted state | Reject stale or mismatched revisions |
| Declared artifact paths and SHA-256 hashes | Detect missing, changed, or added payload files | Hash each file and compare the exact path set |
| Method and source versions | Preserve computational interpretation | Resolve references to the intended versions |
| Provenance parents | Connect derived results to inputs and methods | Check references; inspect transformation evidence |
| Units, spatial/temporal scope, and uncertainty | Avoid scientifically misleading reinterpretation | Recompute or independently review substantive results |
| Rights and permitted reuse | Prevent disclosure or downstream misuse | Review license, consent, embargo, attribution, and data minimization |
| Reviewer and audit decision | Make accountability inspectable | Verify reviewer independence, approval time, and release record |
For interoperability, evaluate W3C PROV-O for entity/activity/agent relationships, RO-Crate 1.2 for research-object metadata, and BagIt (RFC 8493) for packaged file fixity. The accompanying JSON manifest borrows general ideas from these standards but does not claim conformance to any of them.
4. Executable synthetic test repository
The companion example uses only Python standard-library modules and no network access. It creates two approved synthetic artifacts, keeps a third private fixture out of the export, records SHA-256 hashes and minimal provenance links, and verifies the resulting package. It deliberately uses a local approval JSON file solely to exercise test cases. It is not a trusted approval service.
sc_collaboration_export_demo/
├── collaboration_export.py
├── tests/test_export.py
├── .github/workflows/validate.yml
├── .gitignore
└── README.md
# Created during the example run (not tracked in Git):
synthetic-source/
approval.json
methods/protocol.txt
results/summary.csv
private/participants.csv
synthetic-export/
manifest.json
payload/methods/protocol.txt
payload/results/summary.csv
The synthetic method states that 2 + 3 = 5; the CSV records synthetic_sum,5,count. This toy calculation exists only to make the independent scientific check executable. It is not observed scientific data or evidence of a deployed application feature.
5. macOS Terminal: run the validation locally
Use Terminal on a Mac with Python 3.10 or later and Git. If you use Homebrew, it can install missing tools, but this example has no third-party Python dependencies. Extract the companion archive to a working directory first.
# macOS: Terminal; Python 3.10+ and Git required.
python3 --version
git --version
# Optional, if Homebrew is already installed:
# brew install python git gh
cd /path/to/sc_collaboration_export_demo
python3 -m unittest discover -s tests -v
python3 collaboration_export.py seed --root synthetic-source
python3 collaboration_export.py build \
--root synthetic-source \
--approval synthetic-source/approval.json \
--out synthetic-export \
--revision r1 --org org-demo --project proj-demo
python3 collaboration_export.py verify \
--package synthetic-export \
--revision r1 --org org-demo --project proj-demo
# macOS checksum command (confirm local file integrity):
shasum -a 256 synthetic-export/payload/results/summary.csv
The expected successful output includes Ran 11 tests ... OK, a message reporting two exported synthetic files, and a receiver verification result for the same organization, project, and revision. shasum -a 256 is the usual macOS command-line equivalent of the Linux SHA-256 command. Do not equate a matching local hash with proof that the supplying organization is authentic.
6. Linux Terminal: run the same acceptance suite
The following commands apply to Ubuntu or Debian-style environments; use the equivalent package manager on other Linux distributions. They can also run in a disposable Linux development container without production database or network access.
# Ubuntu/Debian; other Linux distributions use their package manager.
python3 --version
# Install dependencies only if missing:
# sudo apt-get update && sudo apt-get install -y python3 git
cd /path/to/sc_collaboration_export_demo
python3 -m unittest discover -s tests -v
python3 collaboration_export.py seed --root synthetic-source
python3 collaboration_export.py build \
--root synthetic-source \
--approval synthetic-source/approval.json \
--out synthetic-export \
--revision r1 --org org-demo --project proj-demo
python3 collaboration_export.py verify \
--package synthetic-export \
--revision r1 --org org-demo --project proj-demo
# Linux checksum command (confirm local file integrity):
sha256sum synthetic-export/payload/results/summary.csv
To transfer an approved package from a Linux system to a trusted recipient, use a transport that is authorized for that research classification. For example, an approved SSH/SFTP channel may be appropriate for some internal projects, while regulated data may require a dedicated controlled transfer service. The destination must verify access and the manifest again after transfer.
7. Inspect the machine-readable manifest and scientific result
A representative excerpt from the tested synthetic manifest is shown below. The full generated manifest also states the demonstration’s limitations. The source_ref and derived_from fields describe a small provenance relationship: the result derives from the synthetic protocol version.
{
"schema_version": "sc-collaboration-export-demo/1",
"organization_id": "org-demo",
"project_id": "proj-demo",
"revision_id": "r1",
"approval_ref": "synthetic-approval-01",
"assets": [
{"path": "methods/protocol.txt",
"source_ref": "demo-protocol-v1",
"method_version": "protocol-v1",
"derived_from": [],
"bytes": 48, "sha256": "d05f9c7bf7f426de3ad3d3fe9e9d13e3a185c02c2a758ed1a043f15564e9aa08"},
{"path": "results/summary.csv",
"source_ref": "demo-result-v1",
"method_version": "protocol-v1",
"derived_from": ["demo-protocol-v1"],
"bytes": 40, "sha256": "08b44d9ee75d345e8d9b2e559ee3248d8d46c6a90a786b65958d31d4e60c0fb9"}
]
}
The 64-character hexadecimal SHA-256 values above are specific to the generated example files, not arbitrary values to reuse for other research objects. Checksums help detect alterations relative to a given manifest; they do not bind that manifest to a trusted producer unless a separate signature, attestation, or trusted channel is verified.
Run an independent computation and deliberate negative test:
# Inspect the synthetic, explicitly approved deliverables.
find synthetic-export -type f -print | sort
python3 -m json.tool synthetic-export/manifest.json
# Independent calculation using only the documented toy protocol.
python3 - <<'PYEX'
import csv
with open('synthetic-export/payload/results/summary.csv', newline='') as f:
rows = list(csv.DictReader(f))
assert len(rows) == 1
assert rows[0]['metric'] == 'synthetic_sum'
assert rows[0]['unit'] == 'count'
assert int(rows[0]['value']) == 2 + 3
print('PASS: synthetic result agrees with method 2 + 3 = 5')
PYEX
# Negative test: verify rejects an altered result file.
cp synthetic-export/payload/results/summary.csv \
synthetic-export/payload/results/summary.csv.tmp
printf 'unauthorized,9,count\n' \
>> synthetic-export/payload/results/summary.csv
if python3 collaboration_export.py verify \
--package synthetic-export --revision r1 \
--org org-demo --project proj-demo; then
echo 'FAIL: tampering was accepted'; exit 1
else
echo 'PASS: tampered payload rejected'
fi
mv synthetic-export/payload/results/summary.csv.tmp \
synthetic-export/payload/results/summary.csv
For a substantive research export, go beyond a toy arithmetic check: rerun the appropriate notebook or workflow against the approved input version, reconcile units and uncertainty, verify the intended model version and configuration, inspect missing observations, and compare outputs within a documented numerical tolerance. Record why a differing result is acceptable or not; never silently substitute newly downloaded data for the frozen revision.
8. GitHub: version the validation code, not confidential research material
A GitHub repository can store a reviewable export contract, test fixtures, CI workflow, and documentation. It should not be treated as an authorization boundary or as a default destination for real participant data. Use a private repository for internal development where appropriate, review repository access roles, and keep even private repositories free of credentials and unnecessary restricted data.
To initialize an example repository using GitHub CLI:
# Run only with the synthetic example; never publish real research data here.
cd /path/to/sc_collaboration_export_demo
python3 -m unittest discover -s tests -v
git init
git add collaboration_export.py tests README.md .gitignore .github/workflows
git diff --cached --stat
git commit -m "Add synthetic research export acceptance tests"
# Optional after checking repository visibility and account permissions:
# gh auth login
# gh repo create OWNER_OR_ORG/sc-collaboration-export-demo \
# --private --source=. --remote=origin --push
# Inspect pull-request CI before enabling any production release.
The included .github/workflows/validate.yml is a sample CI gate. It runs the same unit tests, generates the synthetic export, validates its checksums and scope, and checks that the synthetic private file is absent. The workflow has only contents: read permission; it does not upload research material or make a release. Review and pin external GitHub Actions to full commit identifiers before adopting the workflow for a sensitive production supply chain.
name: Synthetic collaboration export validation
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run acceptance checks
run: python -m unittest discover -s tests -v
- name: Generate and verify synthetic export
run: |
python collaboration_export.py seed --root synthetic-source
python collaboration_export.py build --root synthetic-source --approval synthetic-source/approval.json --out synthetic-export --revision r1 --org org-demo --project proj-demo
python collaboration_export.py verify --package synthetic-export --revision r1 --org org-demo --project proj-demo
test ! -e synthetic-export/payload/private/participants.csv
For distributable releases, a reviewed pipeline may optionally use GitHub artifact attestations and verify them with the documented tooling. A release digest or attestation establishes different kinds of evidence than recipient authorization; neither establishes scientific correctness or permission to disclose a dataset. Protect secrets using push protection and repository policies, but never rely on secret scanning as proof that a dataset is free of sensitive information.
9. Negative cases and developer acceptance matrix
| Test | Expected behavior | Example status |
|---|---|---|
| Matching approved revision and files | Export two scoped files; verify paths and hashes | PASS, local synthetic test |
| Excluded participant fixture | Do not include the file or its contents in package | PASS, local synthetic test |
| Tampered result after export | Reject changed size or SHA-256 | PASS, local synthetic test |
| Unexpected added file | Reject undeclared payload | PASS, local synthetic test |
| Stale or wrong revision | Reject export against different approved revision | PASS, local synthetic test |
| Wrong organization or project | Reject mismatched scope | PASS, local synthetic tests |
| Denied approval | Reject synthetic export attempt | PASS, local synthetic test |
| Path traversal or symlink | Reject unsafe file reference | PASS, local synthetic tests |
| Missing provenance parent | Reject nonresolving declared relationship | PASS, local synthetic test |
| Unsupported schema version | Fail closed instead of guessing how to parse it | PASS, local synthetic test |
| Actual production tenant/recipient policies | Prove access enforcement with real identity integration and approved synthetic test accounts | NOT TESTED |
| Reproducibility of a real scientific claim | Independent reviewer reconciles data, code, methods, and uncertainty | NOT TESTED |
| macOS and hosted GitHub Actions execution | Run commands and retain their own run receipts | NOT TESTED |
These are local example outcomes, not evidence that a currently deployed Workspace export operation passes any of these checks. Stronger tests should also cover metadata redaction, expired recipient authorization, revoked rights, export-size limits, concurrent object updates, interrupted transfer, archive extraction, and disclosure via log or file names.
10. Provenance, reusability, and scientific comparability
Use an explicit provenance model. At a minimum, distinguish entities (dataset, method, generated figure, report revision), activities (analysis execution, export assembly, review, approval), and agents (author, reviewer, automated service). W3C PROV-O provides a vocabulary for these concepts. Where a distributed package needs richer scholarly descriptions, consider an RO-Crate with versioned dataset, software, attribution, and license metadata. Where physical file manifests and bag validation are central, consider BagIt. Select a conformant profile intentionally; a custom JSON document is not an RO-Crate or BagIt package by naming convention alone.
Provenance coverage can be assessed as required source/method links that resolve ÷ total required source/method links. A value of 1.0 is a useful completeness gate, but it does not determine whether those sources actually support a finding. A researcher must separately validate analytical assumptions, sampling design, variable definitions, units, spatial and temporal boundaries, uncertainty, and known limitations.
For datasets with access restrictions, FAIR principles do not require unrestricted public distribution. Metadata can be discoverable while data remain access controlled, so long as the permitted access pathway and reuse conditions are clear.
11. Security, rights, and institutional review
Require explicit release authorization before export. Verify source licenses and any contractual, privacy, embargo, ethics, and institutional restrictions. Inspect for direct identifiers, re-identification risks, embedded document metadata, GPS information in images, notebook outputs, personal paths, credentials, and private internal IDs. Apply data minimization and recipient-specific scope.
A production design should create an immutable export receipt identifying the accepted revision, policy decision, reviewer, object set, calculated digests, redaction results, release time, destination class, and independent verification outcome. Audit logs should avoid copying restricted payload contents. If a recipient loses permission after delivery, block future downloads, revoke access where technically possible, and document that previously exported copies may be beyond the platform’s control.
Protect the producer and recipient from arbitrary paths, symlink and archive extraction attacks, overly large files, malformed JSON, unsupported schema changes, and mixed-version data. Snapshot or otherwise pin source objects so the approval scope and copied bytes cannot drift while packaging. The example demonstrates only some of these checks.
12. Evidence record and acceptance decision
A real acceptance record should include build and Git commit references, exact data revision, signed or trusted approval, method version, digest list, recipient scope, reproducibility receipt, independent scientific review, security and rights approval, and a decision for the exact package. Do not promote a synthetic fixture to a production acceptance receipt.
{
"record_type": "illustrative_collaboration_export_validation",
"environment": "local_synthetic_linux",
"schema_version": "sc-collaboration-export-demo/1",
"project_id": "proj-demo",
"revision_id": "r1",
"tests_passed": 11,
"tests_failed": 0,
"unapproved_files_exported": 0,
"scoped_artifacts_verified": 2,
"independent_production_review": "not_performed",
"production_authorization_verified": false,
"sustainable_catalyst_release_decision": "NOT_ASSESSED"
}
Scientific completion criterion: An authorized and independent recipient can identify every released object and its exact approved revision; reproduce or critically examine the relevant results from permitted inputs and methods; determine which uncertainties and limitations affect interpretation; and verify that no unauthorized materials or relationships were disclosed. Any missing required evidence, integrity mismatch, authorization mismatch, or unresolved scientific inconsistency is a release blocker.
13. Implementation guidance for Sustainable Catalyst developers
The recommended integration point is a server-side export service associated with a single Workspace project and revision. A proposed workflow is: identify the requesting principal and intended recipient; resolve the accepted research object and revision; evaluate tenant, role, classification, consent, license, and embargo policy; obtain documented approval; pin inputs and outputs; build an allowlisted payload; generate its evidence manifest; scan for disallowed content and metadata; compute file fixity; record the release decision; and make only the approved package available through a controlled delivery mechanism. Revalidate authorization at retrieval.
For later integration with Research, Library, Reporting Studio, and Workbench, keep stable object and method identifiers, allow links to immutable computational runs, and distinguish a research conclusion from a system-generated relationship fact. Record uncertainty and reviewer dissent as governed metadata rather than deleting contradictory evidence. Do not invent currently supported REST endpoints or presume that a shared project membership automatically grants export rights.
Acceptance tests should run first against disposable storage, synthetic projects, and test identities. Require negative tenant and recipient tests, isolated database fixtures, documented rollback, off-host recovery evidence where relevant, and an explicit human production cutover decision. No test should mount production volumes or publish restricted source files to GitHub.
14. Limitations and current verification status
The companion code is a demonstrator, not production-ready export software. In particular, a locally editable approval.json cannot establish trusted authorization; a SHA-256 digest cannot authenticate a manifest; an internally consistent provenance graph cannot prove a claim; and successful tests with synthetic files cannot certify privacy-safe export of real records. The tested implementation does not include federated identity, signed attestations, atomic object-store snapshots, key management, secure recipient delivery, external scientific peer review, or production integration with Sustainable Catalyst services.
Verified for this article: The companion Python implementation completed 11/11 automated tests and a successful build/verify run in a Linux execution environment. Not verified: macOS execution, GitHub-hosted CI, live Workspace routes, actual role and policy checks, deployed object schemas, release approvals, data rights, and real scientific reproducibility.
15. Technical references
- World Wide Web Consortium (W3C). PROV-O: The PROV Ontology. W3C Recommendation. https://www.w3.org/TR/prov-o/.
- RO-Crate community. RO-Crate Metadata Specification 1.2. https://www.researchobject.org/ro-crate/specification/1.2/.
- Kunze, J., Littman, J., Madden, L., Scancella, J., and Adams, C. (2018). The BagIt File Packaging Format (V1.0). RFC 8493. https://www.rfc-editor.org/rfc/rfc8493.html.
- Wilkinson, M. D. et al. (2016). ‘The FAIR Guiding Principles for scientific data management and stewardship’. Scientific Data, 3, 160018. https://doi.org/10.1038/sdata.2016.18.
- GitHub. Artifact attestations. https://docs.github.com/en/actions/concepts/security/artifact-attestations.
- GitHub. Managing releases in a repository. https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository.
- GitHub. Repository roles for an organization. GitHub repository roles documentation.
- GitHub. Push protection. https://docs.github.com/en/code-security/concepts/secret-security/push-protection.
- Python Software Foundation. hashlib — Secure hashes and message digests. https://docs.python.org/3/library/hashlib.html.
- NIST. Security and Privacy Controls for Information Systems and Organizations, SP 800-53 Rev. 5, including access enforcement and audit controls. NIST SP 800-53 publication.
Editorial note: The WordPress article title should remain in the title field; do not insert a duplicate <h1> into this HTML body. All development commands and manifest fields in this article are illustrative unless a supported deployed implementation is separately cited.
