Skip to content

Commit 8d1f7ab

Browse files
feat!: retire the saved-report stack — /api/v1/reports, client.reports, IReportService, the reports capability, sys_saved_report / sys_report_schedule, @objectstack/plugin-reports (#20125)
1 parent 16c5a33 commit 8d1f7ab

114 files changed

Lines changed: 999 additions & 10764 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/platform-objects': minor
4+
'@objectstack/rest': minor
5+
'@objectstack/client': minor
6+
'@objectstack/cli': minor
7+
'@objectstack/metadata-protocol': patch
8+
---
9+
10+
feat!: retire the saved-report stack — `sys_saved_report` / `sys_report_schedule`, `/api/v1/reports`, `client.reports`, `IReportService`, the `reports` capability and `@objectstack/plugin-reports` (#20102)
11+
12+
**BREAKING** — the saved-report stack is removed whole, with no deprecation window
13+
(maintainer ruling 2026-09-25, 「A. 退役」). It persisted a raw object query
14+
(`object_name` + `{ filter, fields, orderBy, limit, groupBy }`) with a render format
15+
and an owner, and could e-mail it on a schedule. Measured on the main branch of this
16+
repository, objectui and cloud before removal: zero callers of the routes, the SDK
17+
namespace or the service contract outside their own tests, and no app declaring the
18+
capability.
19+
20+
**NOT affected: the `report` metadata kind.** `ReportSchema`, `defineReport`,
21+
`/meta/report`, datasets and the analytics service are unchanged. The two shared the
22+
word "report" and nothing else.
23+
24+
FROM → TO, per surface:
25+
26+
- `requires: ['reports']` → **refused** by `defineStack` (`STACK_CAPABILITY_UNKNOWN`,
27+
422) with the prescription "requires: 'reports' was removed in @objectstack/spec
28+
17.5.0 … Delete the token." Fix: delete the token. `os serve` on an older artifact
29+
that still carries it warns with the same prescription and ignores it; `os validate`
30+
and `os build` over a plain-object config (no `defineStack` call, so no parse-time
31+
vocabulary check) report it as a non-fatal capability advisory carrying the same
32+
prescription, never "check for a typo". The token is
33+
gone from `PLATFORM_CAPABILITY_TOKENS` and `PLATFORM_CAPABILITY_PROVIDERS`; the new
34+
`RETIRED_PLATFORM_CAPABILITY_GUIDANCE` (`@objectstack/spec/kernel`) carries the
35+
prescription.
36+
- `IReportService`, `SavedReport`, `ReportSchedule`, `ReportQuery`, `ReportFormat`,
37+
`ReportRunResult`, `SaveReportInput`, `ScheduleReportInput`
38+
(`@objectstack/spec/contracts`) → removed, no replacement export. Fix: delete the
39+
import.
40+
- `SysSavedReport`, `SysReportSchedule` (`@objectstack/platform-objects/audit`) and
41+
the names `sys_saved_report` / `sys_report_schedule` in
42+
`PLATFORM_PROVIDED_OBJECT_NAMES` → removed. A stack referencing either name is now
43+
flagged as a probable typo instead of resolving.
44+
- `GET|POST /api/v1/reports`, `GET|DELETE /api/v1/reports/:id`,
45+
`POST /api/v1/reports/:id/run`, `POST /api/v1/reports/:id/schedule`,
46+
`GET /api/v1/reports/:id/schedules`, `DELETE /api/v1/reports/schedules/:scheduleId`
47+
→ unmounted: each answers the standard unmatched-route `404`, byte-identical to a
48+
path that never existed. Their nine error codes (`REPORTS_LIST_FAILED`,
49+
`REPORT_DELETE_FAILED`, `REPORT_GET_FAILED`, `REPORT_NOT_FOUND`,
50+
`REPORT_RUN_FAILED`, `REPORT_SAVE_FAILED`, `REPORT_SCHEDULE_FAILED`,
51+
`SCHEDULES_LIST_FAILED`, `SCHEDULE_DELETE_FAILED`) leave `ERROR_CODE_LEDGER` with
52+
their only emitter.
53+
- `client.reports.*` (`list`, `save`, `get`, `delete`, `run`, `schedule`,
54+
`listSchedules`, `unschedule`) → removed. Fix: delete the call. A report is `report`
55+
metadata, read through `meta.*` and queried through `analytics.*`; a saved ad-hoc
56+
object query is a ListView on that object.
57+
- `RestServer`'s constructor keeps the position of the retired saved-report provider,
58+
typed `undefined`, so no later positional argument re-binds. Pass `undefined` there;
59+
passing a provider is a compile error.
60+
- `@objectstack/plugin-reports` → no longer built or published from this repository,
61+
and `@objectstack/cli` no longer depends on it or mounts it. Fix: remove the
62+
dependency. There is no successor package and no scheduled-delivery replacement.
63+
64+
**Existing databases.** `sys_saved_report` / `sys_report_schedule` tables in a deployed
65+
database are left in place, untouched — no backfill, no reaper, no drop — under the
66+
repository's convention for a retired platform object: the platform never drops a
67+
table that metadata stops declaring, and `os migrate plan` lists such a table in its
68+
informational unmanaged-tables section so an operator can decide.
69+
70+
`@objectstack/metadata-protocol` (patch): the `INVALID_SORT` hint for a sort node
71+
spelled `{ field, direction }` no longer names the retired saved-report contract as
72+
the source of that vocabulary; it names the better-auth adapter's `sortBy`, which
73+
still uses it. Code and status are unchanged.
74+
75+
Breaking ships as `minor` per the launch-window convention
76+
(`scripts/check-changeset-no-major.mjs`).
77+
78+
**Clause-②: yes (narrowing)** — a published capability token, a service contract and
79+
its types, two platform objects, eight routes, nine registered error codes and an SDK
80+
namespace are removed; nothing previously refused is now accepted.
81+
82+
<!-- adr-0087: registered saved-report-stack-retired -->

‎.changeset/config.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"@objectstack/organizations",
4545
"@objectstack/mcp",
4646
"@objectstack/plugin-pinyin-search",
47-
"@objectstack/plugin-reports",
4847
"@objectstack/plugin-security",
4948
"@objectstack/plugin-sharing",
5049
"@objectstack/service-sms",

‎README.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ control plane.
313313
| [`@objectstack/plugin-audit`](packages/plugins/plugin-audit) | Audit log object and audit trail |
314314
| [`@objectstack/plugin-email`](packages/plugins/plugin-email) | Pluggable outbound email transport |
315315
| [`@objectstack/plugin-webhooks`](packages/plugins/plugin-webhooks) | Durable, cluster-aware outbound webhook delivery |
316-
| [`@objectstack/plugin-reports`](packages/plugins/plugin-reports) | Saved reports and scheduled email digests |
317316
| [`@objectstack/plugin-pinyin-search`](packages/plugins/plugin-pinyin-search) | Pinyin recall for CJK search |
318317
| [`@objectstack/plugin-dev`](packages/plugins/plugin-dev) | Zero-config local development assembly |
319318
| [`@objectstack/knowledge-memory`](packages/plugins/knowledge-memory) | In-memory knowledge adapter (dev / test) |

‎content/docs/api/client-sdk.mdx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ The `@objectstack/client` SDK aims to implement the ObjectStack API protocol spe
168168
| **automation** | ✅ | 18 | Flow CRUD, trigger/execute, runs, screen-flow resume, descriptor/status registries |
169169
| **actions** | ✅ | 2 | Server-registered action handlers (`engine.registerAction`) |
170170
| **approvals** | ✅ | 12 | Approval requests (ADR-0019): inbox, decisions, recall, revise/resubmit (ADR-0044), thread interactions, audit trail |
171-
| **reports** | ✅ | 8 | Saved reports: definitions, execution, recurring email schedules (501 without `@objectstack/plugin-reports`) |
172171
| **shares** | ✅ | 8 | Per-record sharing grants (list/grant/revoke) + tenant-wide sharing rules (`shares.rules.*`, M10.17) |
173172
| **search** | ✅ | 1 | Global cross-object search (M10.5) |
174173
| **email** | ✅ | 1 | Transactional send via IEmailService (M11.B1) |

‎content/docs/capabilities/analytics.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Analytics & Dashboards
3-
description: ~20 chart families, period-over-period comparison, runtime filters, TV display pages, four report shapes, and scheduled email digests
3+
description: ~20 chart families, period-over-period comparison, runtime filters, TV display pages, and four report shapes
44
---
55

66

@@ -25,7 +25,7 @@ Dashboard extras that matter in practice:
2525

2626
## Reports
2727

28-
Four shapes — **tabular** (detail rows), **summary** (grouped totals), **matrix** (regions × quarters), and **joined** (several dataset panels) — with runtime filters and export. **Scheduled email digests** deliver a report daily or weekly: the Monday-morning sales report writes itself.
28+
Four shapes — **tabular** (detail rows), **summary** (grouped totals), **matrix** (regions × quarters), and **joined** (several dataset panels) — with runtime filters and export.
2929

3030
> **In HotCRM**: four dashboards (executive, sales, service, CRM overview) and six reports (lead, opportunity, account, case, churn), fed by six shared datasets covering accounts, contacts, leads, opportunities, products, and cases. The executive dashboard carries quarter and owner filters plus the funnel and trend widgets described above.
3131

‎content/docs/capabilities/index.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you are a developer, the [Build sections](/docs/data-modeling) cover the same
1717
<Card href="/docs/capabilities/automation" title="Automation" description="Five trigger styles and visual flows: reminders, hand-offs, escalations, and scheduled work that runs itself" />
1818
<Card href="/docs/capabilities/approvals" title="Approvals" description="Seven approver styles, four decision modes including group sign-off, locking, SLA escalation, send-back" />
1919
<Card href="/docs/capabilities/permissions" title="Permissions — Who Sees What" description="Four layers from object capability to per-field visibility, five data-depth scopes, audit, and an explain API" />
20-
<Card href="/docs/capabilities/analytics" title="Analytics & Dashboards" description="~20 chart families, period-over-period, runtime filters, TV display pages, reports and email digests" />
20+
<Card href="/docs/capabilities/analytics" title="Analytics & Dashboards" description="~20 chart families, period-over-period, runtime filters, TV display pages and reports" />
2121
<Card href="/docs/capabilities/ai" title="AI Under Governance" description="Ask questions and get charts; AI acts under the same permissions and audit as people; bring your own agent over MCP" />
2222
<Card href="/docs/capabilities/integrations" title="Integrations & Everyday Work" description="Import/export, generated APIs, webhooks, connectors, federated databases, marketplace templates, languages" />
2323
<Card href="/docs/capabilities/request-template" title="How to Request Features" description="A one-page template that turns business needs into configuration — hand it to your team or an AI agent" />

0 commit comments

Comments
 (0)