Skip to content

refactor: simplify jobs to single-command scheduling - #212

Merged
vishr merged 4 commits into
mainfrom
refactor/simplify-job-schedules
Oct 5, 2026
Merged

vishr merged 4 commits into
mainfrom
refactor/simplify-job-schedules

Conversation

@vishr

@vishr vishr commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

What this changes

Simplify alpha jobs and schedules to one container command. Applications own multi-step progress and recovery. Keep timers, whole-command retries, timeouts, inputs, notifications, history, manual job approvals, and exclusive/pinned deployment coordination.

Remove the workflow schema/types, Python runtime, execution CLI commands, and feature-specific tests. Project declarations and immutable release snapshots share one strict onebox.run/v1alpha2 loader. Update generated schemas/references, examples, the capability inventory, and the scheduling guide. Much of the file count is the Application identity update across fixtures and published schemas.

The current Monk and Goal manifests declare ordinary jobs, and their applications own workflows. Neither sibling repository was modified.

See the due-diligence report and before/after plan and accepted scope decision. Related requirements: #160 and #133.

Why this is correct

  • just check, lint, vulnerability and environment-namespace checks pass: Go tests/vet, generated schema/docs checks, and the documentation build. Local workflow lint did not finish with ShellCheck enabled; workflow parsing passes with that integration disabled.
  • just e2e passes on local Colima Docker, including rolling deployment, immutable snapshots, payload digests, and HTTP continuity.
  • Regression tests enforce one Application identity and reject unsupported workflow fields before deployment staging. Existing scheduler tests cover retries, timeouts, locks, inputs, notifications, leases, approval bindings, and outcome records.
  • All 16 rendered landing-page manifest combinations validate. The proxy DNS challenge example uses the schema's dnsChallenge field.

Real-server/systemd E2E, reboot recovery, and live-host testing were not run.

Effect on the safety envelope

Jobs run a single container command. Applications own sequencing, checkpoints, output handoff, and recovery; a whole-command retry starts the command again. Deployment fencing, immutable snapshot replay, migration evidence, release leases, and mounted-release retention remain supported. Machine-output API identities remain independent. The capability inventory and scheduling guide describe the implemented scope.

No production host was changed.

Checklist

  • just check passes locally.
  • Tests cover the new behaviour, including the failure paths.
  • Generated documentation is current (just check verifies this).
  • I have accepted the CLA, or will when the bot asks on my first pull request.

vishr added 2 commits October 4, 2026 15:36
Remove the durable workflow runtime, execution commands, and step schema. Keep ordinary scheduler controls, deployment coordination, and job evidence.

Advance the authored Application contract to v1alpha2 while preserving ordinary immutable v1alpha1 release replay. Refuse legacy execution stores before mutation or retention and document the explicit cutover.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved cutover guard race, legacy-store handling gaps, and documentation corrections remain.

Review effort: Lite
Findings: 1 High severity · 2 Low severity

Open (3)
What changed in this PR

This PR removes Onebox-managed durable job workflows, simplifies jobs to single-command scheduling, and advances authored Applications to onebox.run/v1alpha2.

Changes:

  • Removes execution schemas, runtime, CLI commands, and related recovery logic.
  • Adds legacy-store guards and v1alpha1 snapshot compatibility.
  • Updates schemas, documentation, examples, fixtures, and tests.
File Summary
site/​src/​pages/​llms.txt.ts Updates schema link.
site/​src/​content/​docs/​status/​capabilities.mdx Updates capability inventory.
site/​src/​content/​docs/​start/​reading-it-back.mdx Updates authoring identity.
site/​src/​content/​docs/​reference/​project-file.mdx Documents v1alpha2 and cutover.
site/​src/​content/​docs/​reference/​policies.mdx Removes retired execution commands.
site/​src/​content/​docs/​reference/​naming.mdx Updates environment example.
site/​src/​content/​docs/​reference/​fields/​workloads.mdx Removes execution fields.
site/​src/​content/​docs/​reference/​errors.mdx Removes execution errors.
site/​src/​content/​docs/​reference/​cli.mdx Removes execution CLI documentation.
site/​src/​content/​docs/​guides/​environment-variables.mdx Updates API identity.
site/​src/​components/​landing/​Derivation.astro Updates landing-page example.
site/​public/​schemas/​application/​v1alpha2/​application.schema.json Publishes v1alpha2 schema.
README.md Updates sample manifest.
internal/​release/​retention.go Adds legacy-store retention guard.
internal/​release/​legacy_job_executions.go Adds legacy-store detection.
internal/​release/​legacy_job_executions_test.go Tests legacy-store handling.
internal/​release/​durable_retention_test.go Removes durable-retention tests.
internal/​proxy/​proxy_test.go Updates fixture identity.
internal/​onebox/​workload_plan_test.go Updates fixtures.
internal/​onebox/​workload_contract_test.go Updates fixtures.
internal/​onebox/​staging_secrets_test.go Updates fixtures.
internal/​onebox/​service_test.go Updates fixtures.
internal/​onebox/​secrets_push_test.go Updates fixtures.
internal/​onebox/​operation_types.go Removes execution operation kinds.
internal/​onebox/​operation_graph_test.go Updates fixtures.
internal/​onebox/​operation_errors.go Removes execution diagnostics.
internal/​onebox/​load_service_runtime_test.go Updates fixture.
internal/​onebox/​jump_route_test.go Updates fixtures.
internal/​onebox/​execution_types.go Removes execution request fields.
internal/​onebox/​execute.go Removes execution dispatch.
internal/​onebox/​exec_test.go Updates fixture.
internal/​onebox/​bootstrap_test.go Updates fixture.
internal/​onebox/​binding.go Removes execution bindings.
internal/​engine/​verify_injection_test.go Updates fixture.
internal/​engine/​secretspush_test.go Updates fixture.
internal/​engine/​secret_generation_test.go Updates fixture.
internal/​engine/​secret_generation_rolling_test.go Updates fixture.
internal/​engine/​schedule.go Simplifies scheduled runners.
internal/​engine/​schedule_test.go Updates runner expectations.
internal/​engine/​schedule_run.go Removes execution resume handling.
internal/​engine/​schedule_host_test.go Tests legacy-store scheduling guards.
internal/​engine/​schedule_history.go Removes execution metadata.
internal/​engine/​schedule_execution.go Removes durable runner.
internal/​engine/​schedule_execution_test.go Removes durable-runner tests.
internal/​engine/​rollback_test.go Updates snapshot fixture.
internal/​engine/​resume_test.go Updates snapshot fixture.
internal/​engine/​recovery.go Adds snapshot compatibility loading.
internal/​engine/​ops.go Adds legacy-store guard for exec.
internal/​engine/​host_environment_test.go Updates fixture.
internal/​engine/​gate.go Adds legacy-store guard for jobs.
internal/​engine/​fixtures_test.go Updates fixture.
internal/​engine/​deploy_test.go Adds snapshot compatibility coverage.
internal/​engine/​backup_identity_test.go Updates fixture.
internal/​durable/​runner_test.go Removes durable runtime tests.
internal/​durable/​durable.go Removes durable package.
internal/​app/​workload_contract_test.go Updates fixtures.
internal/​app/​validate.go Removes execution validation.
internal/​app/​types.go Removes execution types.
internal/​app/​testdata/​corpus/​recast.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​README.md Updates corpus documentation.
internal/​app/​testdata/​corpus/​pursue.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​monk.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​goal.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-umami.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-plausible.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-paperless.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-n8n.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-immich.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-immich-sourced.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-gitea.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-frigate.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-authentik.yml Updates corpus identity.
internal/​app/​testdata/​corpus/​ext-authentik-managed.yml Updates corpus identity.
internal/​app/​services_test.go Updates fixtures.
internal/​app/​service_extensions_test.go Updates fixtures.
internal/​app/​secrets_graph_test.go Updates fixtures.
internal/​app/​schedule.go Removes execution schedule fields.
internal/​app/​schedule_test.go Updates fixtures.
internal/​app/​route_test.go Updates fixtures.
internal/​app/​resolve_test.go Updates fixtures.
internal/​app/​purity_test.go Updates fixtures.
internal/​app/​preflight_test.go Updates fixtures.
internal/​app/​naming_scope_test.go Updates fixtures.
internal/​app/​names_test.go Updates fixtures.
internal/​app/​load.go Adds snapshot compatibility.
internal/​app/​jump_config_test.go Updates fixture.
internal/​app/​jsonschema.go Switches schema generation to v1alpha2.
internal/​app/​jsonschema_test.go Updates schema tests.
internal/​app/​job_execution.go Removes execution validation.
internal/​app/​job_execution_test.go Removes execution tests.
internal/​app/​health_timing_test.go Updates fixtures.
internal/​app/​generate_test.go Updates fixtures.
internal/​app/​external_schema_test.go Updates fixtures.
internal/​app/​environment_model_test.go Updates fixtures.
internal/​app/​ejection_contract_test.go Updates fixture.
internal/​app/​eject_test.go Updates fixtures.
internal/​app/​defaults.go Removes execution defaults.
internal/​app/​contract_shapes_test.go Updates fixture.
internal/​app/​compose_test.go Updates fixtures.
internal/​app/​canonical_test.go Updates fixtures.
internal/​app/​backup_schema_test.go Updates fixtures.
internal/​app/​application_fixture_test.go Updates contract fixtures.
e2e/​testdata/​worker/​ob.yml Updates fixture identity.
e2e/​testdata/​worker/​broken.yml Updates fixture identity.
e2e/​testdata/​postgres/​ob.yml.tmpl Updates fixture identity.
e2e/​testdata/​app/​ob.yml Updates fixture identity.
e2e/​server_execution_test.go Removes durable execution coverage.
e2e/​network_ownership_test.go Updates fixture.
e2e/​e2e_test.go Adds snapshot compatibility coverage.
e2e/​destroy_test.go Updates fixture.
e2e/​apps/​vaultwarden.yml Updates fixture identity.
e2e/​apps/​uptime-kuma.yml Updates fixture identity.
e2e/​apps/​umami.yml Updates fixture identity.
e2e/​apps/​rocketchat.yml Updates fixture identity.
e2e/​apps/​README.md Updates fixture documentation.
e2e/​apps/​penpot.yml Updates fixture identity.
e2e/​apps/​paperless.yml Updates fixture identity.
e2e/​apps/​n8n.yml Updates fixture identity.
e2e/​apps/​immich.yml Updates fixture identity.
e2e/​apps/​gitea.yml Updates fixture identity.
e2e/​apps/​ghost.yml Updates fixture identity.
e2e/​apps/​authentik.yml Updates fixture identity.
docs/​README.md Updates schema and decision links.
docs/​product.md Documents single-command jobs.
docs/​plans/​2026-10-04-job-schedule-simplification.md Records implementation plan.
docs/​plans/​2026-09-06-durable-job-executions.md Marks durable execution retired.
docs/​decisions/​2026-10-04-job-schedule-simplification.md Records accepted scope decision.
cmd/​ob/​schema.go Updates schema command text.
cmd/​ob/​schedule.go Removes execution command registration.
cmd/​ob/​preview.go Updates API identity.
cmd/​ob/​preview_test.go Updates fixtures.
cmd/​ob/​output.go Removes execution output entries.
cmd/​ob/​output_test.go Updates output expectations.
cmd/​ob/​ops_contract_test.go Updates fixtures.
cmd/​ob/​main_test.go Covers retired commands.
cmd/​ob/​init.go Updates generated scaffold.
cmd/​ob/​init_test.go Updates scaffold expectations.
cmd/​ob/​execution.go Removes execution commands.
cmd/​ob/​execution_test.go Removes execution tests.
cmd/​ob/​commands_test.go Updates fixtures.
cmd/​ob-docgen/​main.go Generates v1alpha2 documentation and schema.
cmd/​ob-docgen/​main_test.go Updates schema path checks.
api/​testdata/​application/​valid/​minimal.yml Updates valid fixture.
api/​testdata/​application/​invalid/​snake-case.yml Updates invalid fixture.
api/​testdata/​application/​invalid/​root-shorthand.yml Updates invalid fixture.
api/​testdata/​application/​invalid/​retired-job-execution.yml Adds retired-field coverage.
api/​testdata/​application/​invalid/​previous-alpha.yml Adds old-API coverage.
api/​testdata/​application/​invalid/​extension.yml Updates invalid fixture.
api/​application/​v1alpha2/​schema.go Embeds v1alpha2 schema.
api/​application/​v1alpha2/​application.schema.json Defines v1alpha2 contract.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/engine/schedule_run.go Outdated
Comment thread site/src/components/landing/Derivation.astro Outdated
Comment thread site/src/content/docs/reference/project-file.mdx
Use one strict loader for declarations and release snapshots. Remove checkpoint-store handling. Correct the landing and DNS examples, and keep documentation focused on current job behavior.
@vishr vishr changed the title refactor!: simplify jobs to single-command scheduling refactor: simplify jobs to single-command scheduling Oct 5, 2026
@vishr
vishr requested a lite review from Copilot October 5, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The migration is broad and a documentation correction remains; final human review is warranted.

Review effort: Lite
Findings: 1 Low severity

Open (1)
Resolved since last review (3)

Comment on lines 115 to 116
and the API version is `onebox.run/v1alpha2` — only the environment namespace
changed.
Remove obsolete migration instructions and include the guide in the namespace check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants