Worked Examples
Validate scientifically application handoffs — Workspace
Validate scientifically application handoffs — Workspace Application: Workspace Status: Useful first draft, not a production-verified procedure. Research and governance question Evaluate whether application handoffs preserves the
Application: Sustainable Catalyst Research Hub
Article type: Troubleshooting and developer operations
Scope: Research-area catalog publication, public discovery, metadata integrity, privacy and recovery
Verification status: Synthetic local tests executed; deployed routes, identity, database and CDN behavior unverified
Estimated reading time: 20–25 minutes
Objective: Identify why a research area or associated public project is absent, incorrectly visible, stale, misclassified or inconsistent across the Research Hub, without exposing private drafts or mutating accepted publication records. The primary acceptance criterion is that only explicitly approved, currently releasable research areas and projects appear in public catalog output, with correct relationships and public-only counts.
1. Identify the affected boundary
Separate the problem into source record (area/project metadata), authorization (who may view or approve), publication lifecycle (draft, reviewed, approved, published, withdrawn), catalog projection (fields released to the public), search/indexing (what discovery returns) and delivery/cache (what a browser actually receives). A missing area in a public catalog can be correct behavior when its current revision lacks publication approval.
Record the exact area ID, project ID if applicable, organization context, revision, expected visibility, affected environment, observation time in UTC, request correlation ID and the expected outcome. Do not treat a menu item, a successful HTTP 200, or an old cached card as proof of authorization or scientific approval.
2. Symptoms and likely causes
| Symptom | Likely boundary | Safe first check |
|---|---|---|
| Approved area missing | State, revision approval, rights or stale index | Compare current revision and approval snapshot |
| Private area appears publicly | Projection or authorization defect | Stop distribution; capture sanitized evidence; initiate incident response |
| Area count differs from project cards | Unscoped counts or stale materialized view | Recalculate counts from the same eligible public set |
| Project shown under wrong area | Stale foreign key or taxonomy mapping | Check stable area_id and revision-bound relationship |
| Withdrawal still appears | CDN/search cache or delayed revocation propagation | Inspect cache age and independently test public endpoint |
| Public card exposes staff-only notes | Excess fields / object-property authorization | Compare response keys against strict public-field allowlist |
| Intermittent 5xx or partial listing | Database, search index or API dependency | Correlate trace IDs; avoid mutation/retry loops |
| 409 / stale revision | Optimistic concurrency | Reload current authoritative revision before any new approval |
3. Safety rules before investigation
- Do not run write commands against production as a diagnostic shortcut. Begin with read-only checks and approved staging fixtures.
- Do not copy unpublished abstracts, private project titles, contributor identifiers, credentials, restricted source URLs or full request headers into public tickets or GitHub issues.
- If private catalog data is publicly visible, treat it as a security/privacy incident: contain public delivery and preserve relevant audit evidence according to the approved incident plan. A cache purge alone may be insufficient.
- Never infer permission from knowledge of an ID or URL; object-level and field-level authorization must be enforced server-side.
- Retain the last approved catalog artifact and provenance fingerprint before applying any repair.
4. Publication eligibility as a testable contract
For this independent example, a record is eligible only when every condition is true: state == "published", visibility == "public", approval == "approved", approval_revision == revision, rights == "public-redistribution" and embargoed == false. A public project must also reference an eligible public area. These are example rules, not confirmed Research Hub production field names or transition semantics.
Let E(a) be area eligibility and E(p) project eligibility. The correct public project set is {p | E(p) and E(area(p))}; public counts must be computed from that exact set. Public projections use a fixed field allowlist, never a serializer that indiscriminately returns the full database record.
5. Proposed minimal data contract
{
"schema": "sc-rh-catalog-example/1",
"revision": "r7",
"areas": [{
"id": "area-climate", "slug": "climate", "title": "Climate and Carbon",
"description": "Public climate methods and evidence", "revision": "r3",
"state": "published", "visibility": "public", "approval": "approved",
"approval_revision": "r3", "rights": "public-redistribution",
"embargoed": false
}],
"projects": [{
"id": "project-erw", "area_id": "area-climate",
"slug": "erw-study", "title": "ERW Methods Demonstration",
"description": "Synthetic public methodology record", "revision": "r5",
"state": "published", "visibility": "public", "approval": "approved",
"approval_revision": "r5", "rights": "public-redistribution",
"embargoed": false
}]
}
The private source fixture also contains an unpublished area, an unpublished project, and an internal note deliberately excluded from output. Do not paste this illustrative schema into a live system without reviewing actual source contracts, authorization rules, legal rights and governance definitions.
6. Developer setup: macOS and Linux
# macOS: Python 3 should already be available or installed using approved tooling.
# Linux: use your distribution's supported Python package if needed.
python3 --version
# Extract the downloadable developer ZIP, then enter the project directory:
cd sc_rh_catalog_troubleshoot_demo
# Run the standard-library unit tests (no dependencies, tokens or network):
python3 -m unittest discover -s tests -v
# Build a known-good synthetic catalog and verify it:
python3 catalog_diagnose.py baseline --source fixtures/source.json --out out/public-catalog.json
python3 catalog_diagnose.py verify --source fixtures/source.json --catalog out/public-catalog.json
# Show the isolated fault-injection matrix:
python3 catalog_diagnose.py matrix --source fixtures/source.json
python3 -m json.tool out/public-catalog.json
All commands operate on fixture data inside the extracted directory. They do not connect to the live Research Hub, change WordPress, or publish anything.
7. Repository workflow with GitHub
# In a new, intentionally isolated repository checkout:
git status --short
git switch -c docs/rh-catalog-troubleshooting
# Keep the demo at repository root, or adjust workflow working-directory.
python3 -m unittest discover -s tests -v
git add catalog_diagnose.py tests fixtures README.md .github/workflows/catalog-diagnostics.yml
git commit -m "docs: add synthetic Research Hub catalog troubleshooting checks"
git push -u origin docs/rh-catalog-troubleshooting
# Optional if GitHub CLI is installed and authenticated:
gh pr create --draft --title "Add Research Hub catalog diagnostics" --body "Synthetic-only offline diagnostics; no production integration"
Use a reviewed repository and existing branch controls. Do not push credentials, synthetic outputs confused with real institutional results, or restricted Research Hub exports. GitHub Actions is configured for read-only repository permissions and Python tests; hosted CI has not been executed as part of this article.
8. Read-only HTTP triage (adapt only to verified routes)
# Set these only after checking your real service and authorization policy.
# EXAMPLE_BASE is deliberately not a deployed endpoint.
EXAMPLE_BASE='https://example.invalid/verified-research-catalog-path'
# Inspect response headers without disclosing an access token:
# curl -sS -D headers.txt -o response.json --max-time 15 "$EXAMPLE_BASE"
# grep -Ei '^(HTTP/|etag:|last-modified:|cache-control:|age:|x-request-id:)' headers.txt
# python3 -m json.tool response.json
Do not blindly run against an unverified production route. For authenticated requests, use the approved mechanism; do not paste bearer tokens into command history or issue comments. Inspect only nonsecret status, content type, ETag, cache age and correlation identifiers. Capture protected response bodies exclusively in an authorized restricted environment.
9. Distinguish source, projection, index and cache drift
- Read the authoritative area and project revisions in an authorized admin/staging environment.
- Check the approval revision and rights record for each public candidate.
- Recompute the public-only projection using the same policy and fixed field allowlist.
- Compare the projection’s object identifiers and counts with the search index or public API response.
- Finally compare the API response with the browser view and CDN cache metadata.
If the authoritative record is correct but the API is stale, suspect projection or indexing. If the API is correct but the browser is stale, suspect client/CDN caching. If a restricted record appears at any public boundary, halt further exposure rather than masking the card in CSS.
10. Check IDs, relationships and taxonomy integrity
Use stable IDs rather than title strings to join areas and projects. Detect duplicates, unknown area references, invalid slugs, withdrawn parents and version mismatches. For knowledge graph/catalog hybrids, prevent a public relationship edge from revealing a private node’s title or identifier where even that identifier is restricted. A missing parent should result in a safe omission or explicitly governed error, not automatic promotion into an arbitrary category.
In the example, an otherwise eligible project pointing to a private or nonexistent area is excluded. The verification step also catches output inconsistent with the source snapshot.
11. Understand integrity and checksums
The synthetic catalog stores a SHA-256 checksum of a deterministic JSON serialization with keys sorted and compact separators. This detects accidental edits between build and verify; it does not provide authenticity by itself, because anyone able to modify the data can recompute the hash. Production-grade authenticity requires a verified signing/attestation trust chain and an independently trusted revision source.
# Local fixture inspection (no writes):
python3 -m json.tool fixtures/source.json
# Recompute and independently verify the public projection:
python3 catalog_diagnose.py baseline --out out/public-catalog.json
python3 catalog_diagnose.py verify --catalog out/public-catalog.json
12. Map failure codes to operational actions
| Example diagnostic | Meaning | Action |
|---|---|---|
SCHEMA_MISMATCH |
Unexpected contract | Stop processing, inspect schema/version change |
INVALID_ID / DUPLICATE_ID |
Unsafe or nonunique identifiers | Quarantine input; repair upstream under change control |
STALE_SOURCE |
Output references another revision | Compare approved snapshot; do not auto-overwrite |
CHECKSUM_MISMATCH |
Output bytes or hash altered | Preserve evidence; rebuild only from trusted source |
CATALOG_MISMATCH |
Output differs from eligible view | Check policy, rights, filters and counts |
COUNT_MISMATCH |
Displayed counts inconsistent | Use same scoped query for cards and totals |
These codes belong to the downloadable demonstration, not to verified Sustainable Catalyst HTTP endpoints. Real services may instead return documented 403/404/409/422/5xx responses or an RFC 9457 problem object. Avoid exposing confidential detail in public error messages.
13. Negative testing and fail-closed behavior
Use synthetic cases for draft area, embargo, revoked area approval, pending area approval, restricted rights, draft project, revoked project, cross-tenant or missing area relationship, stale approval revision, unexpected metadata fields, stale output, tampering, extra project, incorrect counts, wrong schema, invalid or duplicate identifiers and missing required titles. The example deliberately checks that a verifier rejects each mutated case.
Important nuance: A project may be absent by policy (correct privacy behavior) or absent because of a system defect. Compare its expected state and approval, not merely whether it appears in a browser.
14. Safe recovery without unsafe retries
- Capture incident time, revision, correlation IDs and affected public path without sensitive payloads.
- For suspected disclosure, invoke the established incident response and containment path; do not start with a blind cache purge.
- Freeze publication changes at the affected boundary if authorized.
- Restore a known-good approved catalog snapshot in isolated staging; prove it still matches current authorization and withdrawal decisions.
- Rebuild the projection/index only from a trusted source revision under a documented change request.
- Verify public-only counts and forbidden-field checks before any redeployment or cache invalidation.
- Confirm read-after-write state, propagation to index/CDN, and independent browser/API checks after release.
Retries of non-idempotent publication actions can create duplicate events or unexpected visibility. Require documented idempotency keys or explicit state reconciliation before retrying.
15. Synthetic incident receipt template
{
"incident_ref": "SYNTHETIC-RH-AREA-001",
"environment": "isolated-test",
"observed_at_utc": "2026-11-19T00:00:00Z",
"catalog_revision": "r7",
"observed_symptom": "approved area absent in cached public view",
"diagnostic_code": "STALE_SOURCE",
"evidence_ids": ["test-fixture-001"],
"confidential_payload_included": false,
"containment": "none required for synthetic test",
"remediation_status": "not applied",
"independent_reviewer": "pending"
}
For real incidents, store identifiers and evidence in access-controlled systems with approved retention limits. The timestamp above is an illustrative value, not a record of a real incident.
16. CI and acceptance gates
Require deterministic build, public-only projection check, source-revision binding, expected counts, duplicate-ID rejection, field allowlisting, blocked private areas/projects, revocation and embargo checks, tamper rejection, documented error contracts and independent read-only staging probes. A green unit test alone is insufficient to authorize production deployment.
The package includes a GitHub Actions workflow with contents: read permission. Test evidence must identify the commit SHA, runner/Python version, fixture hash, test command, results and environment boundary; public release also requires documented owner approval and trusted rollback procedure.
17. Evidence required for a verified Research Hub procedure
Before replacing this article’s verification notice, attach: exact repository and commit; actual catalog and auth implementation locations; real field/schema contract; identity and rights decision ownership; public route names; approval lifecycle and withdrawal semantics; proof of tenant isolation; index/cache invalidation behavior; CI execution; staging test receipts; recovery demonstration; owner review; and any applicable independent scientific/editorial signoff.
Do not claim that earlier Research Hub staging milestones prove today’s production behavior without fresh deployment and configuration evidence.
18. Common mistakes and interpretation
- Publishing a project when its area is public but its own revision is unapproved.
- Computing category counts before applying visibility and rights filters.
- Trusting client-side hiding instead of server-side authorization.
- Regenerating a SHA-256 after tampering and assuming it proves authenticity.
- Conflating unavailable service results with an empty valid catalog.
- Restoring an old catalog that reintroduces withdrawn or newly embargoed records.
- Posting private request/response bodies to public GitHub issues.
- Treating an HTTP 200 as proof that catalog content is authorized or scientifically validated.
Provenance and technical integrity support accountability, but neither alone verifies the scientific validity of linked research claims.
19. Local execution evidence and limitations
In the included synthetic package, local Linux tests completed 43/43 successfully, and 20/20 fault-injection scenarios were rejected as expected. A baseline build and independent verification both returned PASS. These are reproducible results for the packaged example, not tests of deployed Sustainable Catalyst. macOS execution, GitHub-hosted CI, production API behavior, real tenant policies, embargo timing, CDN purge, database recovery and independent publication review remain unverified.
Files: catalog_diagnose.py, fixtures/source.json, tests/test_catalog.py, .github/workflows/catalog-diagnostics.yml, evidence/tests.txt, evidence/baseline.json, evidence/verify.json and evidence/matrix.json.
20. Technical references and further reading
- W3C (2024). Data Catalog Vocabulary (DCAT), Version 3. Catalog concepts and metadata interoperability; not an authorization framework.
- W3C (2013). PROV-O: The PROV Ontology. Provenance entities, activities and agents.
- OWASP (2023). API1: Broken Object Level Authorization and API3: Broken Object Property Level Authorization. Enforce record and property-level release policy on the server.
- IETF (2023). RFC 9457 — Problem Details for HTTP APIs. Typed machine-readable errors.
- IETF (2022). RFC 9110 — HTTP Semantics. Cache validation, safe methods and HTTP behavior.
- GitHub Docs. Building and testing Python. Continuous integration workflow practices.
- Python Software Foundation. unittest, hashlib and json. Reproducible local inspection and verification.
