Skip to content

feat(demo): public-catalog cleanup + morning-briefing + subprocess-demo#54

Open
Chosen9115 wants to merge 2 commits into
mainfrom
feat/demo-content-sync
Open

feat(demo): public-catalog cleanup + morning-briefing + subprocess-demo#54
Chosen9115 wants to merge 2 commits into
mainfrom
feat/demo-content-sync

Conversation

@Chosen9115

Copy link
Copy Markdown
Owner

Summary

Three threads land together — pulled into one PR because they share a single deploy and the cleanup makes the new examples land cleanly.

1. Catalog cleanup — the public demo stops leaking internal tools

The live demo at demo.opensop.ai was registering 12 processes including 3 Coba-internal appsignal-* agents and 3 v02-smoke-* engine fixtures. Root cause: db/seeds.rb called Opensop::Registry.load_all with no argument, which defaults to processes/**/*.sop.yaml — a recursive glob that picks up everything under processes/example-worker/ and the processes/ root.

Fix: when DEMO_MODE=true, skip the broad glob and go directly to Demo::SeedLoader.call which only loads processes/examples/. Ports the demo infra (Demo::SeedLoader, Demo::ResetJob, Opensop::DemoMode) from feat/demo-app where it had been living undeployed-to-main.

2. New canonical example: morning-briefing.sop.yaml

The README names morning-briefing as the canonical example 14+ times but the demo currently 404s on /sop/morning-briefing/schema. This PR adds the process + three stub fetch scripts. Validates cleanly through Opensop::DefinitionParser: every step has name:; the llm synthesize step has expected_output_schema:; the condition: on synthesize mechanically gates the LLM behind all three deterministic fetches.

3. New step-type coverage: subprocess-demo.sop.yaml

The README documents 10 step types; the demo previously exercised 9. Adds a minimal subprocess-using example invoking lead-qualification as its child. Honest tag in the description: "the runtime currently parses subprocess steps but pauses without spawning the child."

Tagline update

config/locales/opensop.en.ymlopensop.app.tagline: "Define your processes. Get your API." → "The open standard for executable processes." Matches the new README hero. SPEC.md §8 had the same old phrasing — updated in lockstep.

Expected demo catalog after merge + deploy

8 processes (was 12; the 6 leaked ones drop):

agent-pr-review
customer-onboarding
expense-approval
lead-qualification
release-deploy
support-ticket-triage
morning-briefing        ← NEW
subprocess-demo         ← NEW

Test plan

  • morning-briefing.sop.yaml parses through Opensop::DefinitionParser (validated by the agent that wrote it)
  • subprocess-demo.sop.yaml parses (validated similarly; field is process: for child name)
  • All YAML version keys are opensop: "0.1" per SPEC.md
  • Deploy to demo + verify /sop/ returns 8 processes (Kuri to verify on deploy)
  • Visit homepage, confirm new tagline shows

Followup noted but not fixed

Demo::ResetJob clears Sop::Instance records but not Sop::Process. Stale registrations from prior mis-seedings can survive the nightly reset. Worth a separate PR — add Sop::Process.delete_all (or scoped to non-expected names) before reseeding.

Related PRs

🤖 Generated with Claude Code

Carlos and others added 2 commits May 29, 2026 09:18
Three threads land together:

1. CATALOG CLEANUP. The public demo at demo.opensop.ai was registering
   12 processes (including 3 Coba-internal `appsignal-*` agents and
   3 `v02-smoke-*` engine fixtures) because `db/seeds.rb` called
   `Opensop::Registry.load_all` with no argument — defaults to
   `processes/**/*.sop.yaml` and picks up everything under
   `processes/example-worker/` and `processes/` root. When DEMO_MODE
   is on, we now skip the broad glob entirely and go straight to
   `Demo::SeedLoader.call` which loads only `processes/examples/`.
   Ports the demo infra (`Demo::SeedLoader`, `Demo::ResetJob`,
   `Opensop::DemoMode`) from feat/demo-app where it lived
   undeployed-to-main.

2. NEW canonical example: `morning-briefing.sop.yaml`. The README
   names morning-briefing as the canonical example 14+ times — but
   the demo currently 404s on /sop/morning-briefing/schema. Adds the
   process + three stub fetch scripts. Validates cleanly through
   `Opensop::DefinitionParser` (every step has `name:`; the `llm`
   synthesize step has `expected_output_schema:`).

3. NEW step-type coverage: `subprocess-demo.sop.yaml`. The README
   documents 10 step types; the demo previously exercised 9.
   Adds a minimal subprocess example that invokes lead-qualification
   as its child process. Honestly tagged: "the runtime currently
   parses subprocess steps but pauses without spawning the child."

Plus the homepage tagline update — `config/locales/opensop.en.yml`
goes from "Define your processes. Get your API." to "The open
standard for executable processes." (matches the new README hero).
SPEC.md §8 had the same old phrasing — updated in lockstep.

Post-deploy catalog expected (8 processes — 6 originals + 2 new):
  agent-pr-review, customer-onboarding, expense-approval,
  lead-qualification, release-deploy, support-ticket-triage,
  morning-briefing, subprocess-demo

Followup noted but not fixed: `Demo::ResetJob` clears instances but
not processes, so stale registrations from prior mis-seedings can
survive the nightly reset. Worth a separate PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Followup from PR #54's audit: Demo::ResetJob was clearing instances,
steps, events, and callbacks — but leaving Sop::Process rows intact.
Demo::SeedLoader upserts by name rather than replacing, so once stale
process registrations existed (from the broad processes/**/*.sop.yaml
glob that previously leaked appsignal-* and v02-smoke-* into the
catalog), they survived every nightly reset.

Adds a single Sop::Process.delete_all inside the existing transaction,
positioned after the instance/step/event/callback delete (which is the
dependency order the existing logic established) and before
SeedLoader.call (which now sees a clean slate and reseeds only the
expected examples/ catalog).

Log line updated to include the purged-processes count.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant