Troubleshooting
Troubleshoot application handoffs — Workspace
Diagnose and resolve application handoff failures across Workspace, Library, Research, and Lab. Covers authorization, data integrity, version conflicts, dependency errors, and safe recovery procedures.
Application: Workspace
Related applications: Library, Research, Lab, identity/policy services, publication
Article type: Developer troubleshooting and incident-recovery runbook
Reference: SC-KB-WS-HANDOFF-TROUBLESHOOT-01 (documentation label only)
Platform: Linux, macOS, Python 3.10+, Git, optional GitHub CLI
Audience: Developers, SRE/platform operations, data stewards, scientific reviewers, security owners
Estimated reading time: 25–35 minutes
Last edited: November 19, 2026
Verification state: Synthetic contract verified; production integration not verified
Diagnostic objective. Determine whether a Library, Research, Lab, or Workspace handoff failed because of object resolution, tenant or project scope, permissions, rights, revision drift, schema incompatibility, data integrity, dependency availability, or incomplete write/reconciliation. Preserve the source object ID, exact immutable revision, rights decision, ownership decision, and lineage. Never infer scientific validity or publication permission from an HTTP 200/202 or a software status.
1. Stop conditions and first-response decision
Treat any possible cross-tenant exposure, unauthorized publication, missing rights, unexplained digest mismatch, or uncertain write outcome as a stop-the-line incident. Disable only the narrow affected handoff or publication path through an approved change process; do not delete records, rotate secrets without ownership, repeatedly rerun writes, or restore production data in place.
| Observed condition | Immediate response | Who clears the block |
|---|---|---|
| Possible data leak, unexpected public response, unsafe redirect or wrong tenant | Stop affected disclosure path; retain sanitized trace IDs; follow security incident process. Do not probe another tenant. | Security/identity owner plus data steward |
| Rights revoked, expired or not resolvable; owner decision missing | Hold import, publish and retries; request authoritative policy decision. | Rights/ownership authority |
| Checksum differs, provenance parent changed or source revision is stale | Quarantine candidate bytes and derived output; compare expected canonical revision. | Source data owner plus science lead |
| Unknown commit state after timeout/5xx | Do not reissue write blindly. Determine durable job/receipt state by idempotency key. | Destination/orchestrator owner |
| Read-only UI stale but authoritative object correct | Check cache freshness and invalidation before mutation. | Application/cache owner |
| Dependency temporarily unavailable with proven no side effect | Recheck dependency health; retry only using a documented idempotent strategy. | Service owner |
2. Typical symptoms and likely causes
| Symptom | Differentiate | Safe first evidence |
|---|---|---|
| “Object not found” or unresolvable link | Nonexistent ID; wrong tenant; wrong project; unapproved visibility; removed source revision | Authorized object ID + immutable revision + correlation ID; keep existence masked externally |
| 401/403 or generic 404 | Missing/expired identity, revoked role, wrong audience, tenant or project policy | Issuer/audience and authorization decision IDs, not tokens |
| 409 Conflict or revision mismatch | Stale ETag, changed immutable revision, duplicate idempotency key with different request | Source revision, request digest, durable prior receipt ID |
| 422/400 or schema parse error | Required field absent, incompatible schema version, unexpected nested field | Redacted contract version and validator code |
| Digest or provenance mismatch | Altered bytes, source method changes, dropped lineage parents, path substitution | Trusted digest, computed digest, source/parent revisions |
| 202 Accepted but no Workspace object | Queued job stalled, failed consumer, dead letter, partial commit, status lag | Job ID, state transitions, outbox/inbox records |
| UI says “complete,” public Research shows stale output | Cache invalidation, stale materialization, incorrect revision pointer | Authoritative revision versus UI revision + cache metadata |
| Timeout/429/502/503 | Rate limit, upstream outage, network partition; success state may be unknown | Dependency metrics, Retry-After if present, durable job state |
| Import succeeds but publication is blocked | Scientific/rights/editorial gate distinct from technical import | Separate publication decision and review record |
3. Identify the environment, repository, owner and trust boundary
Before debugging live behavior, confirm the actual repository and deployed commit. A UI name is not proof of service ownership. Never copy production object payloads into a public GitHub issue or local synthetic fixture. The commands below inspect an authorized local checkout and GitHub metadata; replace shell variables with the correct values discovered by the team.
# Linux/macOS prerequisites and read-only identity checks
python3 --version
git --version
gh --version # optional GitHub CLI
gh auth status # confirm which GitHub account is active
# Repo inventory is metadata discovery, not proof of implementation owner.
gh repo list Content-Catalyst-LLC --limit 100 \
--json name,isPrivate,url --jq '.[] | [.name, .isPrivate, .url] | @tsv'
# Run inside the authorized, relevant service checkout.
pwd
git remote -v
git rev-parse HEAD
git status --short
git log -1 --format='%H %aI %s'
# Search code without scanning secret/env or dependency directories.
rg -n -i 'handoff|provenance|idempotenc|rights_decision|owner_decision|import' \
--glob '!**/.env*' --glob '!**/secrets/**' \
--glob '!**/node_modules/**' --glob '!**/.git/**' .
If rg is missing, install ripgrep via brew install ripgrep on macOS or your Linux distribution package manager. If a repository is private, use the owner-approved access path. Capture the concrete source location, commit SHA, runtime image digest, migration version, actual route and feature flag in a private incident record.
4. Preserve a minimally sufficient, nonsecret incident packet
Record one sanitized event per observed attempt: UTC timestamp, environment/stage, application boundary, correlation/job ID, opaque handoff ID, source revision label, error family, responder, selected remediation, and whether a write may have committed. The privileged team may separately store restricted tenant/object references in controlled evidence storage; the public ticket should not include them.
# Portable macOS/Linux UTC and code-state evidence (safe in an approved checkout)
date -u +%Y-%m-%dT%H:%M:%SZ
git rev-parse HEAD
git diff --check
# Inspect a sanitized, *local synthetic* triage receipt.
python3 -m json.tool artifacts/triage-receipt.json | head -n 35
# Optional, for owners of a systemd unit on a managed Linux host ONLY:
# journalctl --unit <verified-service-name> --since '2026-11-19 00:00:00 UTC' \
# --no-pager --output short-iso
# Never paste unredacted journal lines into GitHub or a public article.
Use request IDs to cross-reference source retrieval, policy decision, destination staging and final receipt. If the service does not issue trace IDs or durable job receipts, that absence is an observability defect to escalate—not a reason to infer success.
5. Diagnose in order: authorization and object resolution
- Identify actor and environment: verify authenticated service, issuer/audience, current roles, tenant, project and purpose. Do not trust actor or role claims copied from the request body.
- Resolve the source object: use authoritative lookup with the canonical source ID and exact revision. A cross-tenant request should not reveal private object existence through distinct outward errors.
- Revalidate governance: query authoritative current rights and owner decision references; confirm expiry, revocation, classification and destination/intended-use allowlist. Do not treat offline snapshots as authorization.
- Verify bytes and lineage: compare trusted source SHA-256, declared schema, method version, parent IDs and exclusions. Reject unexpected substitutions.
- Resolve destination state: check a durable receipt or job state for accepted, staged, committed, failed, compensated or unknown outcomes, not just UI status.
- Check publication separately: a successful private import neither satisfies editorial review nor grants public release rights.
Where the real API masks unauthorized objects as 404, an operator must use authorized internal telemetry to distinguish absent objects from denied access; never “test” by impersonating another tenant.
6. Confirm source revision, checksum and scientific provenance
A common false recovery is to request “latest” after a stale-revision failure. Instead, reconcile the expected content-addressed or immutable revision. Changes to dataset values, processing method versions, baselines, parent evidence or time scope may invalidate downstream figures and claims even if the object ID is unchanged.
# Cross-platform SHA-256: requires only Python 3.10+
python3 - <<'PY'
from pathlib import Path
from hashlib import sha256
p = Path('fixtures/source/soil_flux_synthetic.csv')
print(f'{sha256(p.read_bytes()).hexdigest()} {p.as_posix()}')
PY
# Linux: sha256sum fixtures/source/soil_flux_synthetic.csv
# macOS: shasum -a 256 fixtures/source/soil_flux_synthetic.csv
Compare the computed digest to a trusted canonical source, not merely another untrusted envelope field. A destination must preserve immutable source ID/revision, parent object IDs, method version, rights and ownership decision references. Differences trigger review, not silent replacement.
7. Interpret governance, authorization and tenancy failures
| Cause | Dangerous workaround to avoid | Authorized recovery |
|---|---|---|
| Missing or expired rights decision | Do not invent IDs or extend expiry locally. | Obtain a new authoritative decision and recheck current policy. |
| Ownership mismatch | Do not assign source ownership to receiver by default. | Reconcile source owner and destination access separately. |
| Revoked role, wrong tenant or project | Do not impersonate a privileged user to force success. | Review current identity, actor, tenant, project and intended-use claims. |
| Unauthorized publication | Do not interpret a private import as publication approval. | Retain private state pending rights, editorial and scientific decisions. |
| Policy service unavailable | Do not fail open with an old snapshot. | Hold mutation until policy authority can be verified. |
8. Separate source version drift from schema mismatch and stale cache
A stale revision may arise from a superseded source or delayed queue event; a schema mismatch reflects a producer/consumer contract problem; a stale UI view might simply be a caching issue. These problems require different responses. Check immutable revisions, event ordering, actual schema version, database migration compatibility, and authoritative storage before modifying any data.
- Schema version: inspect source and destination type definitions; require tested explicit adapters, migration and rollback. Reject dropped governance or provenance fields.
- Delayed event: compare event revision and destination accepted revision, and reject an older event that would overwrite a newer result.
- Stale UI cache: compare authoritative commit state and UI revision/last-refresh metadata. Do not recompute scientific results just to refresh a display.
- Incomplete research data: preserve missing values, exclusions and uncertainty. Do not invent observations to satisfy a transport schema.
9. Determine durable write state before retrying
A timeout after a mutating call can mean the destination committed and the response was lost. Treat that as outcome unknown. A 202 response acknowledges work was accepted, not necessarily completed. A retry is safe only under an audited and documented idempotency policy that binds a key to a canonical payload digest and preserves the previous durable result.
| Observed state | Retry disposition | Recovery evidence |
|---|---|---|
| Validation rejected before mutation | Correct and revalidate; preserve failed evidence. | Original envelope, validator error, source revision. |
| 202 accepted / queued | Query durable job receipt and final destination state first. | Job ID, transition history, consumed event status. |
| Timeout/502 after write | No blind second write. Reconcile key and request digest. | Original key, payload SHA, durable prior receipt. |
| Same key + same payload; current authority still permits | Return prior receipt, if contract explicitly guarantees replay. | One committed logical record. |
| Same key + changed payload | Conflict; reject reuse of the key. | Original vs candidate canonical payload digests. |
| Partially committed cross-service operation | Stop downstream actions; use documented compensations. | Per-leg events, reconciliation and audit trail. |
| Rights revoked after original operation | Do not allow retry to bypass current authorization. | Authoritative current revocation decision. |
The companion SQLite example verifies pre-commit rollback, idempotent receipt replay and conflicting-key rejection on fabricated records. It does not simulate a true multiservice distributed transaction or real Workspace writes.
10. Distinguish dependency downtime, partial responses and cache lag
A dependency’s 503, rate limit or network failure may be transient, but only nonmutating reads can generally be retried without a special contract. For writes, first query an authoritative receipt or destination job state. Follow a documented Retry-After header, bounded backoff with jitter, and maximum attempts only after safety is established. Never automatically retry permission, rights, integrity, or schema failures.
# Decision algorithm, illustrative only; not a production command:
# READ failure + confirmed transient dependency -> bounded retry with jitter
# WRITE failure + durable matching idempotency receipt -> follow owned retry contract
# WRITE failure + unknown result -> HOLD and reconcile committed state
# ACCESS, RIGHTS, DIGEST, SCHEMA or PUBLICATION denial -> DO NOT RETRY BLINDLY
A successful transport response containing only some expected objects is scientifically incomplete. Mark missing dependencies and exclusions explicitly, retain uncertainty and block downstream scientific claims/publication until reviewed.
11. Typed error design and external response redaction
Where the actual API offers a structured problem format, IETF RFC 9457 is a useful design reference. This is illustrative only; no live Workspace endpoint or status-code mapping has been confirmed.
HTTP/1.1 409 Conflict
Content-Type: application/problem+json
{
"type": "https://example.invalid/problems/revision-conflict",
"title": "Revision conflict",
"status": 409,
"detail": "The requested revision cannot be accepted.",
"instance": "urn:example:request:opaque-synthetic-id"
}
Never put source payloads, private object existence, internal paths, authorization policy documents, full stack traces, raw headers, tokens, tenant IDs or user identity into a public problem body. The synthetic HND-... codes in this package are local examples, not actual production errors.
12. Reproduce a safe failure on Linux or macOS
After extracting the developer ZIP, run this entirely local Python 3.10+ example. It has no network calls, real identities or application import. The fixture’s authorization snapshot is fabricated and is not valid for live authorization.
cd sc-workspace-handoff-troubleshooting
python3 --version
python3 -m unittest discover -s tests -v
# Validate a synthetic Library -> Workspace envelope, without destination writes
python3 scripts/validate_handoff.py \
--handoff fixtures/handoff.json \
--registry fixtures/authority_snapshot.json \
--root fixtures/source \
--out artifacts/validated.json
# Reproduce a few distinct failures
python3 scripts/triage_handoff.py --case rights-revoked
python3 scripts/triage_handoff.py --case stale-revision
python3 scripts/triage_handoff.py --case duplicate-conflict
# Run all 17 positive/negative/recovery scenarios
python3 scripts/triage_handoff.py --all \
--json-out artifacts/triage-receipt.json
python3 - <<'PY'
import json
from pathlib import Path
r = json.loads(Path('artifacts/triage-receipt.json').read_text())
print(f"Synthetic diagnostic cases: {r['passed']}/{r['total']}")
for x in r['cases']:
print(x['scenario'], x['observed_code'], x['result'])
PY
Locally observed November 19, 2026: 38/38 Python unit tests passed; 17/17 synthetic scenarios reproduced expected behavior. These results cover the packaged implementation, not any live Sustainable Catalyst authorization, idempotency, dependency or publication service.
13. Synthetic scenario matrix
| Case | Expected illustrative result | Interpretation |
|---|---|---|
healthy |
HND-000 | Local contract validation only |
missing-object |
HND-012-UNKNOWN-SOURCE | Canonical source does not resolve |
wrong-tenant |
HND-012-UNKNOWN-SOURCE | Same outward error, avoiding object enumeration |
wrong-project |
HND-051-PROJECT | Project authorization mismatch |
rights-revoked, rights-expired |
HND-041-RIGHTS | Handoff is blocked |
stale-revision |
HND-013-STALE-REVISION | Exact source revision mismatch |
schema-mismatch |
HND-010-SCHEMA | Unsupported schema version |
digest-mismatch |
HND-031-DIGEST | Integrity failure; quarantine |
actor-revoked |
HND-050-ROLE | Inactive actor blocked |
partial-payload |
HND-001-FORMAT | Missing required envelope section |
unsafe-redirect |
HND-080-UNSAFE-URL | Caller-controlled redirect rejected |
publication-denied |
HND-042-POLICY | No implicit publication permission |
missing-artifact |
HND-030-PATH | Expected bytes unavailable |
duplicate-retry |
REPLAY | Same-key request returns prior synthetic receipt |
duplicate-conflict |
HND-090-IDEMPOTENCY-CONFLICT | Changed payload with same key rejected |
rollback |
ROLLBACK | Injected failure leaves zero committed journal rows |
The test runner confirms the outward missing-object and wrong-tenant responses match and synthetic result receipts contain no private tenant, project, source, actor or policy-document fields. These properties still require independent testing against real interfaces.
14. Create a minimal, redacted revision comparison
A semantic diff is safer than pasting whole production records. This example makes a disposable comparison using only the provided synthetic JSON. It does not change any test fixture.
python3 - <<'PY'
from pathlib import Path
import json, tempfile, subprocess
source = json.loads(Path('fixtures/handoff.json').read_text())
changed = json.loads(Path('fixtures/handoff.json').read_text())
changed['source']['revision'] = 'rev-003' # synthetic drift
with tempfile.TemporaryDirectory() as tmp:
left = Path(tmp) / 'accepted.json'
right = Path(tmp) / 'candidate.json'
left.write_text(json.dumps(source, indent=2, sort_keys=True) + '\n')
right.write_text(json.dumps(changed, indent=2, sort_keys=True) + '\n')
subprocess.run(['diff', '-u', str(left), str(right)], check=False)
PY
The expected difference is source.revision. Do not “repair” a conflict by silently selecting the newest revision; first establish whether derived figures, methods and permissions still apply.
15. Inspect GitHub CI and the exact commit
In an authorized repository, use GitHub metadata to relate observed failures to a deployed commit and staging acceptance. The packaged workflow .github/workflows/verify-synthetic-handoff-troubleshooting.yml runs the 38 unit tests and 17 synthetic scenarios with read-only permissions. Its major-version action tags should be pinned to reviewed immutable commit SHAs before use under a production dependency policy.
# Replace the placeholder after confirming the real owning repository.
REPO='Content-Catalyst-LLC/<verified-repository-name>'
gh run list --repo "$REPO" --limit 10 \
--json databaseId,status,conclusion,headSha,url \
--jq '.[] | [.databaseId,.status,.conclusion,.headSha,.url] | @tsv'
# Once a run ID is chosen:
# gh run view <run-id> --repo "$REPO"
# gh run view <run-id> --repo "$REPO" --log # review private log access
git diff --check
python3 -m unittest discover -s tests -v
git status --short
A green unit suite is insufficient for real integration. Require isolated staging evidence for actual current-rights decisions, cross-tenant denial, read/write boundaries, postcommit failure injection, queue ordering, schema migration, restore/compensation and public-content redaction.
16. Prepare a sanitized GitHub issue or pull-request packet
Use the packaged docs/SANITIZED-ISSUE.md to record one reproducible case with a nonsecret trace reference, expected invariant, redacted observed code, commit and release gate. Review before any upload. Security, privacy and credential incidents should go through the designated private process, not a public issue.
sed -n '1,180p' docs/SANITIZED-ISSUE.md
# ONLY with owner approval and a verified private destination:
# gh issue create --repo 'Content-Catalyst-LLC/<verified-repository-name>' \
# --title 'Workspace handoff: stale revision on staging' \
# --body-file docs/SANITIZED-ISSUE.md
# After a code change and local review:
# git switch -c fix/workspace-handoff-revision
# git add <reviewed-files>
# git commit -m 'test: preserve source revision on handoff'
# git push -u origin fix/workspace-handoff-revision
# gh pr create --draft --title 'Validate handoff revision contract' \
# --body-file docs/SANITIZED-ISSUE.md
Review GitHub Actions artifacts and run logs as potentially sensitive evidence. Apply least-privilege workflow permissions, approved retention and explicit redaction before exposing results.
17. Recover safely: staging, rollback and controlled resumption
- Identify the last durable boundary: validation, authorization, queue acceptance, staging, commit, receipt, or publication.
- Freeze only the unsafe workflow: pause publication/consumer writes via verified owner controls while preserving other safe work.
- Preserve canonical evidence: retain source revision, digests, job IDs, owner/rights decisions and immutable audit history.
- Correct the specific cause: policy authority recovery, source-version reconciliation, compatible schema adapter, trusted artifact restore, dependency repair or cache invalidation.
- Test in isolated staging: positive/negative permissions, pre- and post-commit fault injection, idempotency, event-ordering, migrations, restore and rollback/compensation.
- Validate non-disclosure and scientific boundaries: no private response leakage or bypass of separate scientific/editorial approval.
- Resume with accountable sign-off: record exact commit/image, CI result, backup and rollback criteria, steward and service approvals.
Distributed workflows cannot be safely “rolled back” by deleting a record from one database. Where services have independent commits, use the actual documented compensation/reconciliation process and preserve evidence of every transition.
18. Acceptance and release gate checklist
- ☐ Exact repository, commit, runtime image and feature flag recorded.
- ☐ Actual source, policy, destination and publication owners identified.
- ☐ Correlation/job ID and durable write state established.
- ☐ Canonical source ID, revision, checksum, method and parent objects preserved.
- ☐ Current rights, owner decisions, actor role and tenant/project access checked.
- ☐ Duplicate replay and conflicting-payload idempotency tested.
- ☐ Schema, migration, stale cache, unavailable dependency and ordering behaviors assessed.
- ☐ Failure injection, guarded restore and rollback/compensation demonstrated.
- ☐ Public error bodies and CI artifacts redacted; private records not disclosed.
- ☐ Scientific, editorial and publication permissions remain independent.
- ☐ CI run, staging evidence, release/rollback plan and owner approvals attached.
19. Interpretation: scientific meaning is not a transport status
A repaired handoff can demonstrate that metadata, permissions and bytes were handled consistently with a contract. It does not establish that a measurement is valid, an analysis unbiased, a carbon-removal estimate additional, or a claim reviewed. Keep uncertainty, method versions, exclusions, time boundaries and independent scientific judgments visible in Workspace and Research. Public release remains a distinct institutional decision.
20. Technical references and actual deployment verification
- RFC 9457 — Problem Details for HTTP APIs — safe structured error representation.
- OWASP API1:2023 — Broken Object Level Authorization — object- and tenant-scoped access checks.
- W3C PROV Overview and PROV-O — provenance entities, activities and agents.
- GitHub Actions and GitHub CLI manual — read-only CI and pull-request procedures.
- Python unittest and hashlib — reproducible assertions and digests.
Required anchors for production verification: real repository and immutable commit SHA, source file/handler, actual API/event contract, authentic identity/policy owner, tested migrations, staging and CI receipts, runtime image digest, signed-off backup/restore procedure, non-disclosure tests, scientific/editorial review controls and authorized release/rollback approvals. Anything not inspected must stay marked “not verified.” The package includes docs/PRODUCTION-VERIFICATION.md.
