Skip to content

Turn on the platform's scheduled work for pnpm demo; README says how a deployment does the same - #111

Merged
zhuangjianguo merged 1 commit into
mainfrom
claude/issue-82-demo-scheduled-work
Oct 25, 2026
Merged

zhuangjianguo merged 1 commit into
mainfrom
claude/issue-82-demo-scheduled-work

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #82 — ruling C: pnpm demo turns on the platform's scheduled work; README says how a deployment does the same
Clause-②: no
Metadata-protocol: none

Ruling-ref: comment 6393739591 (batch #1 item 5, letter C). The 18.1 upgrade itself landed as PR #110 (7b736a0); this is the card's last remaining piece. Session session_017nzWFRUo2U7evMkPdVniAn, branch claude/issue-82-demo-scheduled-work, head e405e7b.

What changed

  • scripts/demo.mjs (+8): the demo boot's child environment (the env object startDemo passes to objectstack dev --compile --ui --seed-admin) now carries OS_AUTOMATION_SCHEDULED_WORK_ENABLED, set to true only when the variable is unset (process.env[VAR] ?? 'true').
    • Why that spelling: an operator who exported the variable, false included, keeps their value; the platform reads anything other than 1 / true / on / yes as off (resolveScheduledWorkEnabled in @objectstack/types 18.1.0), so an exported false, 0 or empty value stays off. Measured below.
    • The priming boot (demo off, quiet) is untouched: it inherits the operator's environment as before, so it boots on the platform default unless the operator exported the variable.
    • pnpm dev (objectstack dev --ui --compile in package.json) is not touched: it keeps the platform default, off.
  • README.md (+4): one paragraph after the pnpm dev / pnpm demo paragraph: pnpm demo turns the platform's scheduled work on; a deployment that wants the reminders in the inbox sets OS_AUTOMATION_SCHEDULED_WORK_ENABLED=true. The existing re-run paragraph ("Do that re-run before the daily jobs have run on the database", PR README: say what re-running pnpm demo does once the daily jobs have run #108) stays true and is now the normal case on a demo database, so it is unchanged.

Measurements (18.1.0, clean .objectstack/data for every boot, same port)

Boot Banner Flows: line Not-bound notice Boot diagnostics GET /api/v1/automation/_status (schedule flows) sys_job rows
pnpm demo on origin/main 7b736a0 (before) 12 flow(s) 3 bound to triggers 6 flows declare a 'schedule' trigger but are NOT bound — disabled by deployment policy …: legal_review_sla, turn_stalled, obligation_due, payment_overdue, renewal_notice, expiration_sweep 2 informational (6 more already listed above) not read on this boot not read on this boot
pnpm demo on this branch (after) 12 flow(s) 9 bound to triggers absent 2 informational: all six bound=true: legal_review_sla, turn_stalled, obligation_due, payment_overdue, renewal_notice, expiration_sweep 7, active=true: flow-schedule: legal_review_sla, turn_stalled, obligation_due, payment_overdue, renewal_notice (cron 0 6 * * *), expiration_sweep (cron 0 7 * * *), plus the platform's own approvals-sla-escalation (interval)
OS_AUTOMATION_SCHEDULED_WORK_ENABLED=false pnpm demo on this branch 12 flow(s) 3 bound to triggers present, same six names 2 informational (6 more already listed above) all six bound=false 1: approvals-sla-escalation only
pnpm dev on this branch 12 flow(s) 3 bound to triggers present, same six names 1 informational (6 more already listed above) n/a n/a
  • Normalised before/after demo logs (timestamps and durations masked, both read through the closing note) differ in three places, plus the shutdown lines the before log carries because it was read after the server was stopped: the runtime bundle's hash, the Flows: line plus the dropped not-bound notice, and the diagnostics header. Tenancy: single, 44 plugins, no System started with degraded capabilities, no plugin that failed to load, on both.
  • After run, seed result at quiescence: Seed loading completed with 404 dropped record(s) and 404 error(s) … {"inserted":820,"updated":0,"skipped":0,"errored":404,"referencesDropped":0}, the same 820 / 404 PR Upgrade the @objectstack/* dependencies from 17.4.0 to 17.7.0, walking the official upgrade checklists of 17.5, 17.6 and 17.7 #85 recorded on 17.4 and 17.7 (the persona accounts no seed may create; README and the closing note explain them).
  • os doctor: unset → ✓ Package-authored scheduled work OFF (the default) — no packaged time-triggered flow and no packaged defineJob runs on this deployment; with =true → ✓ Package-authored scheduled work ON — packaged time-triggered flows and packaged defineJob cron jobs are armed (OS_AUTOMATION_SCHEDULED_WORK_ENABLED). Exit 0 both.
  • NOT MEASURED: a sweep firing on its own clock. The jobs are armed for 0 6 * * * / 0 7 * * *; the session ran around 11:45 UTC and did not hold a server to the next fire. Armed (bound=true, sys_job row active=true) is what the switch controls; PR Upgrade the @objectstack/* dependencies from 17.4.0 to 17.7.0, walking the official upgrade checklists of 17.5, 17.6 and 17.7 #85 already measured that the sweeps write the inbox when they run (45 inbox rows from the six manual triggers on 17.7).

Gates (head e405e7b, one locked batch, each exit code written to its own file before any pipe)

pnpm validate        exit 0   ✓ Validation passed (825ms)
pnpm lint            exit 0   6 suggestion(s) (846ms)
pnpm typecheck       exit 0   tsc --noEmit (no output)
pnpm lint:i18n-gate  exit 0   COVERAGE : 0 missing keys across 2 locale(s)
                              REACH    : 12 surface classes walked

No browser pass: this diff changes a boot script's environment and a README sentence, no surface a person clicks; the evidence is the boot banner, the automation status door and the job table above.

Acceptance notes


🤖 Generated with Claude Code

https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn

Since 17.5 the platform arms no package-authored scheduled work unless the
deployment sets OS_AUTOMATION_SCHEDULED_WORK_ENABLED, so on 18.1 the six
daily sweeps behind M3's inbox reminders register on `pnpm demo` but never
arm. Ruling C on #82: the demo boot passes the variable, `pnpm dev` keeps
the platform default (off), and the README says what a deployment sets.

The demo child gets `true` only when the variable is unset; an exported
value, `false` included, is the operator's and wins.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 — ACCEPT · head e405e7b · 2026-10-25T11:54Z

check reading
shape draft → main, line 1 Fixes #82 — ruling C …; assignee zhuangjianguo
CI on the head both Validate check-runs success on e405e7b = PR head.sha
scope 2 files (+12/−0): scripts/demo.mjs (the demo boot's child env only; the priming boot and pnpm dev untouched) and one README paragraph; nothing governed
the ruling 6393739591 letter C: demo turns scheduled work on, pnpm dev keeps the platform default, README names the variable for deployments — all three present; an explicitly exported value (including false) wins
measured (dev, 18.1.0) demo before: 3 of 12 flows bound, six sweeps "disabled by deployment policy"; after: 9 bound, automation/_status six bound=true, sys_job 6 sweep rows + platform SLA; explicit false → 3 bound; pnpm dev → 3 bound, default off
governed follow-up the AGENTS.md boot-warning exemption for the six by-design notices is the maintainer's (listed in Acceptance notes)

Landing: under the maintainer's merge authorization (project thread: 「你可以自己审核的就自己合并」).


Generated by Claude Code

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.

Upgrade the @objectstack/* dependencies from 17.4.0 to 17.7.0, walking the official upgrade checklists of 17.5, 17.6 and 17.7

2 participants