OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Mark a job as complete.
Goal
Record job completion.
Context
Job management.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
import {
CompleteJobInputModel,
JobModel,
ScheduleJobInputModel,
} from './job.schema';
export const CompleteJobContract = defineCommand({
meta: {
key: 'service.job.complete',
version: '1.0.0',
stability: 'stable',
owners: ['@examples.service-business-os'],
tags: ['service-business-os', 'job', 'complete'],
description: 'Mark a job as complete.',
goal: 'Record job completion.',
context: 'Job management.',
},
io: {
input: CompleteJobInputModel,
output: JobModel,
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'complete-job-happy-path',
given: ['Job is scheduled'],
when: ['User completes job'],
then: ['Job status becomes COMPLETED'],
},
],
examples: [
{
key: 'mark-complete',
input: { jobId: 'job-456', notes: 'Done successfully' },
output: { id: 'job-456', status: 'completed' },
},
],
},
});