Repository navigation
feat!: move to ObjectStack 19.0.0-next.0 and protocol 19 - #2820
objectstack-fleet[bot] wants to merge 2 commits into
Conversation
Every @objectstack/* package moves 18.6.0 -> 19.0.0-next.0 and the app manifest and the seven package manifests declare '^19.0.0-next.0' (objectstack#37314 moved PROTOCOL_VERSION to 19.0.0; a runtime on 19 refuses '^18.6.0'). What the new platform forces: - state-machine-no-initial-states (os validate, lint, build): the twelve status machines declare initialStates listing every state, so creation stays as open as on 18.6.0; narrowing it is its own product decision. - objectstack 1e018d6: an approval lock now holds the master-detail lines too. The opportunity line, time entry and travel leg tests read the platform's RECORD_LOCKED refusal; a travel leg's booking reference is held while the request is pending (the leg object says so). - objectstack#36132: an action's selection is read in the caller's scope, so another person's expense is "not found" before the body runs. - isBodyTableRelationship now takes the group placement (placedByGroup). - Setup -> Installed Apps is retired for Setup -> Packages; the admin docs point there. STATUS.md and the what's-new pages state 19.0.0-next.0. Claude-Session: https://claude.ai/code/session_01Q4EjjPMx1Am3jLCW4Zi8G6 Co-authored-by: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…n-product skills say so ObjectStack 19's lint checks flow and node labels per locale (i18n/missing-flow), a cron with no timezone and a skill bound to a tool no MCP connection serves. - 855 step names in zh-CN, ja-JP and es-ES, one flow-steps bundle per package. - The 8 cron schedules write timezone: 'UTC', the zone they already fire in. - customer_360, live_data and revenue_forecasting set mcpPrompt: false: MCP already withholds them because they bind aggregate_data. Claude-Session: https://claude.ai/code/session_01Q4EjjPMx1Am3jLCW4Zi8G6 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:hotcrm#2 · sunhaolin · session_local397772e87c66479facaebb6d6e03687d 维护者速读
Where this comes fromThe same upgrade, main 1. Ten CI failures: three test files still read the 18 shapesCI at
With the patch below on Patch: 3 files, 15 insertions, 12 deletionsdiff --git a/test/automation-docs-coverage.test.ts b/test/automation-docs-coverage.test.ts
index 5f96b9d6..551bc721 100644
--- a/test/automation-docs-coverage.test.ts
+++ b/test/automation-docs-coverage.test.ts
@@ -148,7 +148,7 @@ const kindOf = (flow: AnyRec): string => flow.type as string;
const eventOf = (flow: AnyRec): string | undefined => startOf(flow).config?.triggerType;
/** The cron expression, for scheduled flows. */
-const cronOf = (flow: AnyRec): string | undefined => startOf(flow).config?.schedule;
+const cronOf = (flow: AnyRec): string | undefined => startOf(flow).config?.schedule?.expression;
/**
* How each page spells a cron. An unregistered cron is a deliberate failure —
diff --git a/test/contract-terminal-states.test.ts b/test/contract-terminal-states.test.ts
index e2b8363b..92c22e7e 100644
--- a/test/contract-terminal-states.test.ts
+++ b/test/contract-terminal-states.test.ts
@@ -28,8 +28,8 @@ import { hotcrmStack, signUpPerson, committedFile, type Person } from './helpers
* 3. An edit that leaves the status as stored saves on an expired or a
* terminated contract, with the status re-sent (as a full form submit
* does) or not: the rule judges a status CHANGE, so it freezes no row.
- * 4. A create is not judged (the rule declares no `initialStates`): a
- * contract imported straight into a late state still lands.
+ * 4. A create is not judged (the rule's `initialStates` name every
+ * status): a contract imported straight into a late state still lands.
*
* The one automated edge, `contract_expiration` (activated → expired, as the
* system), is pinned where the sweep is: `test/flow-scheduled.test.ts`.
@@ -97,10 +97,13 @@ const REFUSED = [
] as const;
describe('the rule is the contract lifecycle’s hold (#2192)', () => {
- it('blocks, over status, and declares no initial states', () => {
+ it('blocks, over status, and names every status an initial state', () => {
expect(rule, 'contract_status_progression is not declared on crm_contract').toBeTruthy();
- expect({ type: rule.type, field: rule.field, severity: rule.severity, initialStates: rule.initialStates })
- .toEqual({ type: 'state_machine', field: 'status', severity: 'error', initialStates: undefined });
+ expect({ type: rule.type, field: rule.field, severity: rule.severity })
+ .toEqual({ type: 'state_machine', field: 'status', severity: 'error' });
+ // The whole option list, read off the field: a status left out is one an import can no longer land in.
+ const statuses = (Contract.fields.status as Rec).options.map((o: Rec) => o.value);
+ expect([...rule.initialStates].sort()).toEqual([...statuses].sort());
});
it('refuses each probed move by its own table — the precondition for the cases below', () => {
diff --git a/test/docs-drift.test.ts b/test/docs-drift.test.ts
index 881d8494..858efe4c 100644
--- a/test/docs-drift.test.ts
+++ b/test/docs-drift.test.ts
@@ -235,31 +235,31 @@ const RULES: Rule[] = [
},
{
label: 'stalled-deal sweep schedule',
- extract: () => cap('opportunity-stagnation.flow.ts', /schedule: '([^']+)'/),
+ extract: () => cap('opportunity-stagnation.flow.ts', /expression: '([^']+)'/),
display: cronDisplay,
docs: withZh(SALES_OPPS, ADMIN_KNOBS),
},
{
label: 'quote-expiration sweep schedule',
- extract: () => cap('quote-expiration.flow.ts', /schedule: '([^']+)'/),
+ extract: () => cap('quote-expiration.flow.ts', /expression: '([^']+)'/),
display: cronDisplay,
docs: withZh(QUOTES, ADMIN_KNOBS),
},
{
label: 'case SLA sweep schedule',
- extract: () => cap('case-sla-monitor.flow.ts', /schedule: '([^']+)'/),
+ extract: () => cap('case-sla-monitor.flow.ts', /expression: '([^']+)'/),
display: cronDisplay,
docs: withZh(CASES, ADMIN_KNOBS),
},
{
label: 'contract renewal sweep schedule',
- extract: () => cap('contract-renewal.flow.ts', /schedule: '([^']+)'/),
+ extract: () => cap('contract-renewal.flow.ts', /expression: '([^']+)'/),
display: cronDisplay,
docs: withZh(ADMIN_KNOBS),
},
{
label: 'campaign auto-completion schedule',
- extract: () => cap('campaign-completion.flow.ts', /schedule: '([^']+)'/),
+ extract: () => cap('campaign-completion.flow.ts', /expression: '([^']+)'/),
display: cronDisplay,
docs: withZh(CAMPAIGN_FLOWS),
},
@@ -295,7 +295,7 @@ const RULES: Rule[] = [
},
{
label: 'contract expiration sweep schedule',
- extract: () => cap('contract-expiration.flow.ts', /schedule: '([^']+)'/),
+ extract: () => cap('contract-expiration.flow.ts', /expression: '([^']+)'/),
display: cronDisplay,
docs: withZh(ADMIN_KNOBS),
},2. Three CI failures come from the new
|
| Test | Why it fails |
|---|---|
test/docs-language-matrix.test.ts, "every package registers a pack for each of them, and for no other" |
The check is per bundle. Each new flow-steps.ts bundle carries zh-CN, ja-JP and es-ES and no en, so it reads [es-ES, ja-JP, zh-CN] against [en, es-ES, ja-JP, zh-CN]. First hit: app.objectstack.hotcrm.service. |
test/expense-module.test.ts:190, "its translations and manual name no project object or project flow" |
anti-phantom: four locale packs counts 7: the four packs plus the three locales of the new bundle. |
test/deal-threshold-parity.test.ts:408, "the two amounts appear in source only where they are authored or explained" |
src/psa/translations/flow-steps.ts spells 100000 in the three check_budget labels (lines 23, 98, 173). The test asks for the constant from src/sales/objects/_thresholds.ts, or for the file in its ALLOWED list with the reason. |
There is no patch for these three: the local tree has no such bundles.
3. Two commits behind main
main moved by #2823 and #2819 since the merge base fb8edeb. The merge is conflict-free. On the merged tree:
| Step | Result |
|---|---|
pnpm validate |
exit 0 |
pnpm typecheck |
exit 0 |
pnpm build |
exit 0 |
pnpm lint |
exit 1: 373 warnings, against 201 at 03a2647 |
pnpm test, with the patch from section 1 |
9 failed, 6547 passed, 58 skipped; 4 of 341 files failed |
The nine are the six of objectstack-ai/objectstack#37705 and the three of section 2. Nothing else is red.
The 172 extra lint warnings:
i18n/missing-flow, 0 to 18. main's two new flows,sales_order_confirmed_plan_stepandsales_order_amount_plan_step, have no entry insrc/o2c/translations/flow-steps.ts: the flow label, the start label and the end label, in three locales.security-cross-set-field-reopen, 182 to 336. feat(o2c): invoices and payments run in parallel; Unpaid and Uninvoiced replace the Receivable Balance; overdue on the payment plan (#2806) #2819 replacedreceivable_balancewith the Unpaid and Uninvoiced fields. Six new fields oncrm_accountand two oncrm_contractadd 188 warnings, and the removed field takes 34 with it. The rule and the cause are the ones already waiting on a ruling; only the count moves.
4. Docs that still describe 18
- Travel legs. The changeset and
test/expense-request-line.test.tssay a leg's booking reference is refused with409 RECORD_LOCKEDwhile the request is pending. These still say it takes a value from submission on, with no such exception:content/docs/(product)/expenses/travel-requests.mdx:71("The Booking Reference of each leg stays open.") and line 71 of its zh-Hans and zh-Hant twins; the in-app manualsrc/expense/docs/crm_expense_travel_request.md:107-109("from the moment you submit ... only the Booking Reference still takes a value") andcrm_expense_travel_request.zh.md:27and:64. - In-app Admin Manual, "Turning a module off".
src/docs/crm_admin_access.md:122-126andsrc/docs/crm_admin_access.zh.md:59still say that no menu entry opens the Packages page, name Setup → Installed Apps, and send the administrator to the URL. The publicmodules.mdxwas updated; this manual was not. - Menu path.
modules.mdx:23,sandbox-and-releases.mdx:105and the changeset say Setup → Packages. On a running19.0.0-next.0console, Packages sits in the Setup sidebar group Apps (应用 → 软件包 in the zh-CN interface). In the group-then-item form the other pages use, for example "Setup → Access Control → Queue Members", that is Setup → Apps → Packages. HotCRM is one row there, marked "6 modules", so the modules show only after the row is expanded.modules.mdx:25still tells the administrator to open the URL and then "opens the module". - Old pin.
docs/architecture/psa-module-plan.md:84(engines.protocol^18.6.0) anddocs/MAINTENANCE.md:58(example^18.6.0).docs/architecture/module-split-plan.md:692still names Setup → Installed Apps. - Schedule quote.
content/docs/(product)/sales/quotes.mdx:179quotes the source asschedule: '0 1 * * *'. The flow now readsschedule: { type: 'cron', expression: '0 1 * * *', timezone: 'UTC' }. The pages that give an hour (quotes.mdx:80"every night at 1 AM",automation.mdx:105"daily 3 AM") name no zone, while the flows now state UTC. - Skills.
content/docs/(intelligence)/ai-copilot/connect-your-agent.mdx:20lists "its skills" among what HotCRM adds for a connected agent, with no qualifier. Three of the eight skills (customer_360,live_data,revenue_forecasting) now setmcpPrompt: false.
5. Platform
The six test/flow-record-change.test.ts failures are objectstack-ai/objectstack#37705, as the description says. That issue is closed by objectstack-ai/objectstack#37742, which is merged. No published version carries the fix yet: the dist-tags of @objectstack/spec are latest: 18.6.0 and next: 19.0.0-next.0. #2822 tracks the release check.
Not covered
pnpm hygieneand the Playwright e2e suite were not run on the merged tree.- A module Disable and Enable round trip on 19 was not exercised.
Description
HotCRM moves to ObjectStack 19 (protocol 19). All 24
@objectstack/*packages go from 18.6.0 to19.0.0-next.0, and the app manifest plus the seven module manifests declareengines.protocol: '^19.0.0-next.0'(from^18.6.0). An 18.x host refuses this release withOS_PROTOCOL_INCOMPATIBLE, and a 19 host refuses HotCRM 6.6.0 and earlier, so the host and HotCRM upgrade together.Metadata-impact: maintainer — platform major-version bump
Clause-②: yes
Metadata-protocol: protocol 19
Draft for the maintainer's merge. Do not publish from this PR: a
^19HotCRM is refused by a marketplace on 18, so staging's control plane and runtime have to be on 19 beforepublish-stagingruns.Type of Change
Related Issues
Related to objectstack-ai/cloud#5053 (the cloud half of the ObjectStack 19 move).
Changes Made
package.jsonand the lockfile move to19.0.0-next.0, andobjectstack.manifest.jsonplussrc/{expense,marketing,o2c,psa,revenue,sales,service}/index.tsnow declare^19.0.0-next.0. The docs test requires the declared range to equal the installed spec version.state-machine-no-initial-states, now an error): the 12 status state machines declareinitialStates, and each one lists every state. Records, imports and integrations can still be created in any state, as on 18.6. Narrowing a list to the first state is a product decision and is not part of this upgrade.RECORD_LOCKED409. Its message is "This Opportunity is locked while an approval is in progress, and cannot be edited until that approval is complete". The tests now expect that message, and the hook test still pins HotCRM's sentence. A travel leg's booking reference can no longer be written while its request is pending.isBodyTableRelationshipnow takes{ placedByGroup }, and the project-budget test follows it.whats-newgets a "Next release: ObjectStack 19" callout, anddocs/STATUS.mdis updated..changeset/v19-objectstack-19-next.md(hotcrm: major).Testing
Run in a shared container under the verify lock:
pnpm validate: greenpnpm typecheck: greenpnpm hygiene: greenpnpm build: greenpnpm test: the full run at9e7bc7fgave 6487 passed, 58 skipped and 26 failed; 20 of the 26 were fixed in that commit, and the 8 affected files now give 182 passed, 6 failed. The 6 left are a framework regression in 19.0.0-next.0, filed as objectstack#37705, not a HotCRM bug:test/flow-record-change.test.ts(lead_assignment). The flow run finishes, then its run-history persist and audit writes fail with knex "Transaction query already complete" (the class of objectstack#22855 / #33651 / #33760). At03a2647, the 21 test files the lint fixes touch (flows, schedules, skills, i18n, package ownership) pass: 328 passed, 6 skipped.pnpm lint(--strict): red. 0 errors and 201 warnings, down from 1068, all from rules new in 19.03a2647clears the mechanical ones:i18n/missing-flow855 → 0: flow and step names in zh-CN, ja-JP and es-ES, in onetranslations/flow-steps.tsbundle per package (the platform deep-merges a package's bundles per locale)flow-schedule-timezone-missing8 → 0: each cron writestimezone: 'UTC', the zone it already fires inai-skill-tool-unresolved4 → 0:customer_360,live_dataandrevenue_forecastingsetmcpPrompt: false, since MCP already withholds them because they bindaggregate_dataWaiting on the maintainer's ruling:
security-cross-set-field-reopen182: a View All or Modify All set reopens a field another set hides or locks. On objectstack main after next.0 those bits stop voting on fields (permission-view-all-fields-beside-record-bypass), so the answer per set isviewAllFields: trueor a narrower grant.form-view-internal-not-loaded14: create and edit no longer load the internal form views. All 14 objects already declarefieldGroups.flow-create-update-pair5: the*_on_createtwins could each fold into onerecord-after-writeflow. That is a refactor across about 59 references, not a rename.Checklist
src/declare their class (Metadata-impact: maintainer — platform major-version bump)Additional Notes
Republishing after merge, per
docs/RELEASE_STRATEGY.md:pnpm changeset:version, then set the manifest versions insrc/sales/index.tsand the module index files.v*.*.*.release.ymlrefuses unconsumed changesets, andpublish-staging.ymlpublishes tocloud.objectos.app.publish-production.ymlby manual dispatch, which publishes tocloud.objectos.ai.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4EjjPMx1Am3jLCW4Zi8G6