ld.← Back to selected workLet’s talk
SELECTED WORK / 01AXY / FOUNDING ENGINEERCASE STUDY

SCIENTIFIC KNOWLEDGE GRAPH

Change the graph.
Keep the trust.

A review system for scientific graph edits. Researchers propose changes together, and nothing reaches live data until it is checked, reviewed, and merged safely.

↓

THE TENSION

A live graph cannot afford silent edits.

Researchers needed to change a shared scientific graph without making unreviewed work visible—or quietly overwriting each other.

Direct writes make a bad edit live before anyone can review it. Concurrent edits are just as risky: by the time a proposal is ready, another researcher may have changed the same entity. Connected nodes and edges make mistakes harder to contain.

PROJECT

Submission workflow

MY ROLE

Founding Engineer

DISCIPLINES

Distributed systems · Data integrity · Product

THE IDEA THAT SHAPED THE SYSTEM

Treat a graph edit like a pull request.

I built a submission workflow that keeps proposed changes separate from the canonical graph. Researchers draft and review a precise set of edits, check them against current data, and only then merge the approved changes as a unit.

From first edit to trusted data.

A submission moves through review, conflict detection, and an atomic merge before downstream systems catch up. Select each step to explore.

THE SYSTEM / SIMPLIFIED

DRAFT → OPEN → REVIEW → CHECK → MERGE → SYNC

SELECT A STEP TO EXPLORE
01 / 06PRIVATE / NOT LIVE

Draft.

An author edits on the canvas. Each action is saved as its own record in a database transaction; the draft is visible only to its author.

The live graph stays untouched while the proposal takes shape.

Good decisions.
Clear reasons.

The choices that mattered most, and the problem each one addressed.

01 / DATA MODEL

One record per edit.

Saving a whole edit list made the last save win and could lose work across tabs. Individual records and transactions protect each action; development needed a replica set to support transactions.

02 / CONCURRENCY

Compare what actually changed.

A first-touch snapshot provides the baseline. Comparing it with the proposed and live values catches meaningful field-level conflicts, at the cost of storing snapshots and batching live reads.

03 / INTEGRITY

A conflict is a conflict.

The check is stricter than the merge’s underlying writes. I removed retry-and-replay behavior that treated existing or missing entities as success and could falsely report a completed merge.

04 / TRANSACTIONS

Commit together, or not at all.

All edits land in one graph transaction. Submissions are capped at 200 items to bound transaction size and reduce timeout risk; the limit can be revisited deliberately.

05 / CONCURRENCY

Lock while a merge is in flight.

Edits, deletion, and reverting are blocked while a merge is queued or running. A 15-minute expiry prevents a lost message from leaving the submission locked indefinitely.

06 / RETRIES

Leave a receipt.

A timeout can hide a successful commit. A receipt written in the same transaction lets a retry recognize that earlier success instead of applying it twice or reporting a false failure.

The details that protect trust.

The happy path is only part of the design. The system also needs clear signals when a change cannot safely move forward.

ENGINEERING DEEP DIVE

Look inside the safety checks.

Two examples show how the workflow reasons about concurrent changes and uncertain outcomes. Values and timings below are illustrative.

01 / CONFLICT DETECTION

A three-way field comparison

The baseline is captured when the author first touches an entity. At check time, the proposed value is compared with both that snapshot and the live graph.

EXAMPLE / ENTITY LABEL

BASELINECardiac tissue

What the author started from

PROPOSEDHeart tissue

The author’s intended edit

LIVEMyocardial tissue

Another edit reached the graph

↳

Conflict: both the proposed and live values differ from the baseline and from each other. The merge is blocked for review.

If the live value still matched the baseline, this field would not have that concurrent-edit conflict. Other validation and integrity checks could still block the submission.

02 / IDEMPOTENT MERGE

A retry after a lost response

A timeout does not say whether a transaction failed or its response was lost. The receipt gives a retry evidence of a committed merge.

  1. 01 / COMMIT

    Graph changes and the merge receipt are written in the same transaction.

  2. 02 / TIMEOUT

    The transaction commits, but the worker does not receive the response.

  3. 03 / RETRY

    The worker checks for the receipt before attempting the merge again.

  4. 04 / RECOGNIZE

    The receipt identifies the previous success, so its writes are not repeated.

The receipt covers the graph transaction. Search and vector updates happen asynchronously and rely on reconciliation when delivery or processing fails.

THE CONFLICT CHECK14

issue types across five groups

01ConflictBLOCKS MERGE
02IntegrityBLOCKS MERGE
03ValidationBLOCKS MERGE
04WarningADVISORY
05NoteADVISORY
SECURITY / WHAT I FOUND

I audited my own feature.

The security review found drafts visible to other users and checks that crossed organization boundaries. I fixed both, reinforcing that access rules are as important as a correct merge.

PRODUCT / WHAT I LEFT SIMPLE

A deliberate product tradeoff.

Authors can resolve a conflict on an open submission without returning to Draft. The current flow does not require them to acknowledge the new live value; I kept resolution simple until user feedback shows a need for that extra step.

The lock expires after 15 minutes. A merge that runs beyond that window needs careful handling; expiry alone is not a guarantee against overlap.

Review first.
Merge with confidence.

Researchers can work in private drafts, reviewers can see and discuss the exact changes, and approved submissions have a controlled path to the live graph. The hard work was making timeouts, retries, and concurrent edits visible in the design.

ReviewableChanges and their history are visible before merge
AtomicA failed graph transaction leaves its changes unapplied
Retry-awareA committed receipt identifies an earlier successful merge

Search and vector updates are asynchronous; reconciliation helps bring downstream systems back into sync.

TOOLS & CONCEPTS
TypeScriptNode.jsPostgreSQLArcadeDBAWS LambdaSQSSNS