Skip to content

Harvest plan for a clean build ​

You find a job scheduler with most of the behavior you need. Before copying it, show which behavior survives the move into a smaller research library.

A film cutter separates a landscape strip into frames ready for a blue sleeve.

LinkedIn opens a draft you can review before posting.

Use a single behavior as the unit of transfer. “Create one durable job when a request is delivered twice” gives a reviewer something to reproduce. “Move the scheduler” bundles dependencies, policies and assumptions that may belong only to the original product.

Goal: preserve tested behaviors from Ordo while creating a small, comprehensible research system. This is a plan for subsequent implementation, not a claim that the application already builds.

Extraction order ​

SliceDonorNew boundaryKeep out
1. ContractsCurrent executor/projection types; historical event typescontracts/ schemas and Rust domain typesUI framework objects, business persona text, arbitrary JSON authority
2. Durable kernelH-01 kernel.rs; H-02 events.rslab-store and lab-workflowsProcess-local event files; global public replay; unfenced completion
3. Evidence reviewH-03 graph candidate and promotion conceptslab-knowledge commands inside store transactionsHash-derived canonical identities; automatic endpoint approval; one confidence number for everything
4. ProcessingOwner-reviewed executor stepslab-worker capability implementationsPrivate research inputs, absolute user paths, generic public shell execution
5. ConversationC-01 gateway; W-01 stream consumer behaviorlab-api, model adapters and Svelte UIClient-supplied permissions, silent fallback, transport-coupled domain state
6. OperationsHosting studio/release patternsImmutable release and isolated QABlind server reinstall, shared production secrets, builds on the live host

See source audit for exact code and roadmap for dependencies.

A bounded extraction procedure ​

For each candidate, record the source commit, blob, path, symbol, license and intended behavior. Read the function's callers, schema migrations and tests before extracting it. The audit above is a starting map, not a complete transitive dependency analysis.

Create a donor characterization test around the behavior that matters. Then reproduce that behavior against a small target interface and add the missing negative tests. Keep the donor test result separate from the target result. A failing donor test is evidence to investigate, not an instruction to weaken the test.

Transfer one behavior per issue/PR. Preserve attribution and notices where source is copied. When the boundary needs a fresh implementation, document which donor behavior it preserves and which assumptions it deliberately changes. Do not call this a legal clean-room process; it is an evidence-based engineering rebuild informed by existing code.

Proposed Rust dependency direction ​

text
lab-domain       IDs, states, qualifiers, policy decisions; no HTTP or SQLite
lab-contracts    versioned wire schemas and validation
lab-store        SQLite transactions, artifacts, migrations and export
lab-workflows    DAG planning and state transitions through store commands
lab-knowledge    identity, claims, review and retrieval planning
lab-api          authorization, HTTP/SSE and conversation orchestration
lab-worker       capability execution; no direct canonical-table access

These are proposed modules, not a requirement to create seven deployable services. Start with a Cargo workspace; share domain libraries rather than copy them between binaries. The hosted profile separates the stateless API from the stateful backing store. Local authoring may embed the store explicitly. The twelve-factor page defines the difference.

Example: move the historical job kernel ​

create_job_from_template_with_idempotency currently depends on capability registration, template variables, compiled plans, diagnostics and events. Extract those as explicit inputs and narrow collaborators, not by copying the entire daemon.

The target command should receive an authenticated actor scope, a versioned plan, normalized inputs and a request key. Its store transaction must reject changed inputs for an existing key, insert job/tasks/dependencies, and append the creation events together. External inference and filesystem decoding happen outside that transaction.

Use this specimen for the first duplicate-job test. The proposed location identifies where a future implementation should collect its test receipt.

Specimen fieldValue
Pinned donorH-01, kernel.rs at 39138562f1, symbol create_job_from_template_with_idempotency
Target commandCreate a job for library L with plan P, normalized input A and request key K.
Replay the same requestUnder the same actor and library scope, K + P + A returns the original job ID, with no second set of tasks or creation events.
Replay with changed inputK + P + B produces an explicit conflict. The original job, tasks and events remain intact.
Test location and execution receiptProposed integration test in lab-store/tests/job_idempotency.rs. Pending for both the donor characterization and target integration runs.

The target result-acceptance command receives a lease receipt containing job/task, worker, epoch and expiry, plus the input digest and output manifest. It validates artifact bytes and scope before a conditional acceptance update. Lease checks must occur in the same transaction as acceptance; checking a lease in memory and writing later creates a race.

Example: replace candidate IDs without losing provenance ​

Retain the old candidate ID and origin as import provenance. Assign stable canonical entity IDs independently. Mention-to-entity decisions are versioned records. A change in source wording, evidence count or extraction model creates a new proposal or derivation, not automatically a new entity.

For edges, distinguish a qualified proposition from each source's assertion about it. A repeated source import may be deduplicated; independent testimony must remain independent. Aliases are scoped many-to-many lookup records, not global uniqueness keys.

Admission checklist for every transferred module ​

Ask another maintainer to trace one input from the old source to the new test. They should be able to find the pinned revision, identify the changed assumptions and reproduce the new result without access to the original author’s private environment.

CheckRequired evidence
Rights and exposureSource pin, applicable notices, approved public/private disposition
Dependency controlMinimal crate/API dependencies; declared external tools and model manifests
Behavioral compatibilityCharacterization fixtures plus documented intentional differences
Fault handlingCancellation, bounded inputs, corruption, retries and recovery tests
PersistenceOne transaction owner; no hidden writes in presentation or worker code
DocumentationRequirement, donor symbol, target module, issue and actual test receipt linked

No task closes because an AI says the implementation looks correct. It closes when the scoped acceptance evidence is present. Application PRs need their own review; this documentation PR does not authorize importing the whole Ordo product.

IS373 · Documentation and contract labs available · Research runtime planned