agent 1.7.0 + contracts 1.23.0: a demo scenario seeds whatever the church has installed

- contracts 1.23.0: the seed-scenario job (church, scenario, optional adminEmail; 45 minutes),
  SEED_SCENARIO_JOB_MIN_AGENT 1.7.0.
- agent 1.7.0: seed-scenario -> `crosscode demo <church> --scenario <s>`; seed-demo for
  accounts and app, and --scenario passed on to every product.
- crosscode script: `crosscode demo <church> --scenario <s>` loads the scenario on every product
  the church has here (Accounts, Events, the Website, the App), skipping the rest; every
  installed release checked first; the first failure stops the rest and names what's out of
  step (loaded / skipped in the report). `crosscode demo <church> app` says the App's demo comes
  with App 1.0.0.
- Docs: HANDOVER, APP-1.0-PLAN, VERSIONS, CHANGELOG, agent What's New.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 16:25:31 +02:00
co-authored by Claude Opus 5.5
parent 7391f97cfa
commit 2e8e4c04ca
17 changed files with 408 additions and 42 deletions
+17
View File
@@ -230,6 +230,23 @@ describe("demo scenarios (1.21.0)", () => {
});
});
describe("seed-scenario jobs (1.23.0)", () => {
const args = (a: Record<string, unknown>) => agent.jobArgsSchemas["seed-scenario"].safeParse(a).success;
it("takes a church and a scenario (the products are whatever the church has installed)", () => {
expect(args({ church: "demo2", scenario: "community-family" })).toBe(true);
expect(args({ church: "demo2", scenario: "community-family", adminEmail: "jane@hope.test" })).toBe(true);
expect(args({ church: "demo2", scenario: "nowhere" })).toBe(false);
expect(args({ church: "demo2" })).toBe(false);
expect(args({ church: "demo2", scenario: "bold-youth", products: ["website"] })).toBe(false);
expect(args({ church: "demo2", scenario: "bold-youth", adminEmail: "x; rm -rf /" })).toBe(false);
expect(agent.JOB_TYPES).toContain("seed-scenario");
expect(agent.CENTRAL_JOB_TYPES).not.toContain("seed-scenario");
expect(agent.JOB_TIME_LIMIT_MINUTES["seed-scenario"]).toBeGreaterThanOrEqual(agent.JOB_TIME_LIMIT_MINUTES["seed-demo"] * 3);
expect(agent.SEED_SCENARIO_JOB_MIN_AGENT).toBe("1.7.0");
});
});
describe("env-read and env-set jobs (1.12.0)", () => {
const set = (a: Record<string, unknown>) => agent.jobArgsSchemas["env-set"].safeParse({ church: "hope", product: "events", file: "backend/.env", set: {}, unset: [], restart: true, ...a });
it("read one product", () => {