feat(demo): public-catalog cleanup + morning-briefing + subprocess-demo#54
Open
Chosen9115 wants to merge 2 commits into
Open
feat(demo): public-catalog cleanup + morning-briefing + subprocess-demo#54Chosen9115 wants to merge 2 commits into
Chosen9115 wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.aiwas registering 12 processes including 3 Coba-internalappsignal-*agents and 3v02-smoke-*engine fixtures. Root cause:db/seeds.rbcalledOpensop::Registry.load_allwith no argument, which defaults toprocesses/**/*.sop.yaml— a recursive glob that picks up everything underprocesses/example-worker/and theprocesses/root.Fix: when
DEMO_MODE=true, skip the broad glob and go directly toDemo::SeedLoader.callwhich only loadsprocesses/examples/. Ports the demo infra (Demo::SeedLoader,Demo::ResetJob,Opensop::DemoMode) fromfeat/demo-appwhere it had been living undeployed-to-main.2. New canonical example:
morning-briefing.sop.yamlThe 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 throughOpensop::DefinitionParser: every step hasname:; thellmsynthesize step hasexpected_output_schema:; thecondition:on synthesize mechanically gates the LLM behind all three deterministic fetches.3. New step-type coverage:
subprocess-demo.sop.yamlThe README documents 10 step types; the demo previously exercised 9. Adds a minimal
subprocess-using example invokinglead-qualificationas 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.yml→opensop.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):
Test plan
morning-briefing.sop.yamlparses throughOpensop::DefinitionParser(validated by the agent that wrote it)subprocess-demo.sop.yamlparses (validated similarly; field isprocess:for child name)opensop: "0.1"per SPEC.md/sop/returns 8 processes (Kuri to verify on deploy)Followup noted but not fixed
Demo::ResetJobclearsSop::Instancerecords but notSop::Process. Stale registrations from prior mis-seedings can survive the nightly reset. Worth a separate PR — addSop::Process.delete_all(or scoped to non-expected names) before reseeding.Related PRs
🤖 Generated with Claude Code