Skip to content

docs(security): the erasure paragraph says a delete goes to the recycle bin and how to purge it (#2794) - #2798

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2794-erasure-recycle-bin-docs
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2794-erasure-recycle-bin-docs

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #2794

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:管理员在文档站「安全与合规」页读到的删除权一段,改为如实说明删除后记录会进回收站保留 30 天,以及如何立即清除;应用本身用户无感。
  • 为什么做:属于文档说真话这条主线,修正旧文案「删除即永久删除、没有回收站」给处理隐私删除请求的管理员带来的错误保证。
  • 出错会怎样:最坏是管理员照着文档仍以为某个说法成立;只改文档,随时可以撤回。
  • 要你做什么:无。

What changes

The right-of-erasure paragraph of content/docs/(operate)/reference/security-and-compliance.mdx and its .zh-Hans / .zh-Hant twins. It used to say a delete is a hard delete with "no recycle bin to fish them back out of". It now says:

  • since ObjectStack 18.4.0 a delete keeps a full copy in the recycle bin for 30 days by default, and the FAQ link covers who can see and restore it;
  • an administrator completes an erasure at once by purging the one entry through DELETE /api/v1/data/:object/recycle-bin/:entryId;
  • Setup → Recycle Bin has no per-record purge, only Empty recycle bin for the whole object;
  • without a purge or an empty, the copy stays until retention ends;
  • the audit-log entries and the record's activity history keep a copy of the field values, and a purge does not remove them.

The FAQ link and the anonymisation advice stay. Nothing else on the page changes. The wording agrees with the FAQ answer on #2793 head 46fd23cb (bin, 30 days, Setup → Recycle Bin, restore, empty cannot be undone). The paragraph adds only the per-entry purge door and the audit and activity copies, and neither contradicts the FAQ.

Changeset: a customer patch changeset (.changeset/2794-erasure-recycle-bin-docs.md), not skip-changeset. The docs site is read by users, and a wrong sentence in shipped docs is a Bug (docs/PRIORITIES.md, answer 4). AGENTS.md reserves skip-changeset for a PR that ships nothing to users.

Tests

Docs-only: no business fact changes, so no new test.

Local readings
head 0dfdce6bb (before merging origin/main): pnpm hygiene && pnpm test
  source hygiene clean · Test Files 338 passed (338) · Tests 6495 passed | 58 skipped (6553)
  os-verify-lock: VERDICT command-exit 0
head 7348e039e (after merging origin/main, which carries #2793): pnpm hygiene && vitest run test/docs-
  source hygiene clean · Test Files 36 passed (36) · Tests 773 passed | 9 skipped (782)
  os-verify-lock: VERDICT command-exit 0

After the merge, only the docs tests ran again locally (a declared narrowing). CI runs the full chain on the head.

Acceptance notes

  • Every statement was measured on the booted app at the pinned @objectstack/* 18.6.0 (objectstack dev, fresh SQLite DB, dev admin), on crm_contact.
  • The admin role has manageRecycleBin through modify-all, by the plugin-security permission evaluator. The page names only the administrator as the one who purges. Whether a role with modify-all on an object can also purge through REST was not measured.
  • Noted, not filed: after a purge, sys_audit_log (create and delete rows, new_value / old_value), sys_activity (metadata) and the sys_inbox_message "New contact" note still hold the person's values. The page now says the audit and activity copies stay. Whether the platform should offer erasure of those rows is a platform question.

Verification

Measured on 18.6.0 (REST, dev admin)
DELETE /api/v1/data/crm_contact/Ts97J2I-Jvv0u5g6
  -> {"success":true,"recycleBinEntryId":"RFU0PS5efCa3uwqU"}
GET /api/v1/data/crm_contact/Ts97J2I-Jvv0u5g6                      -> 404
GET /api/v1/data/crm_contact/recycle-bin
  -> entries[0] retentionDays 30, purgeAfter = deletedAt + 30 d, rows[0].values carries email
DELETE /api/v1/data/crm_contact/recycle-bin/RFU0PS5efCa3uwqU       -> 200 {"purged":true}
GET /api/v1/data/crm_contact/recycle-bin                           -> {"entries":[]}
POST /api/v1/data/crm_contact/recycle-bin/RFU0PS5efCa3uwqU/restore -> 404 RECORD_NOT_FOUND
DELETE /api/v1/data/crm_contact/recycle-bin (second probe record)  -> 200 {"removed":1}
DB scan after purge: crm_contact 0 rows, bin 0 rows; sys_audit_log 2, sys_activity 2, sys_inbox_message 1 still match
spec: RECYCLE_BIN_DEFAULT_RETENTION_DAYS = 30, env OS_RECYCLE_BIN_RETENTION_DAYS
console RecycleBinPage: per-entry action is Restore only; whole-object action "Empty recycle bin"

Read first: the English paragraph at security-and-compliance.mdx line 215. That is where the risk sits: the claim about the REST purge door and the audit copies.

Two-minute check: open /docs/reference/security-and-compliance#right-of-erasure on the docs preview. The paragraph names the recycle bin, 30 days, the purge door and Empty recycle bin.

🤖 Generated with Claude Code

https://claude.ai/code/session_017xRBcV3h25dAMNWki8e1ns

…le bin and how to purge it (#2794)

On the pinned @objectstack 18.6.0 a delete keeps a full copy in the
recycle bin for 30 days by default. The paragraph claimed a hard delete
with no bin. It now names the REST purge of one entry, notes that Setup
has only Empty recycle bin, and says the audit and activity rows keep
the values. Same in en, zh-Hans and zh-Hant.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 25, 2026
@vercel

vercel Bot commented Nov 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Nov 25, 2026 4:00pm UTC

Request Review

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:hotcrm#2 · sunhaolin · session_017xRBcV3h25dAMNWki8e1ns

席位核对 — ACCEPT · repo:hotcrm#2 · head 7348e039

  • 形态: head 7348e039e31ce75e84242c06bb46af0fdf13657d 是一个干净的合并提交(--remerge-diff 为空),base 为 228c5536。改了 4 个文件:隐私页三种语言各改一段,外加一个 hotcrm: patch 的面向客户 changeset。类别 reviewer,只改文档。
  • 评审: 独立评审(只读子代理,未参与改动)结论 ACCEPT-WITH-NITS。段落的每一条说法都对照 18.6.0 源码核过:
    • 回收站在 18.4.0 落地,18.3.0 标签上没有 recycle-bin/ 目录。
    • 默认保留 30 天(RECYCLE_BIN_DEFAULT_RETENTION_DAYS)。
    • 单条清除走 DELETE …/recycle-bin/:entryId,需要 manageRecycleBin。
    • 控制台只有每行一个 Restore 和整对象的 Empty。
    • 副本按 purge_after 到期自动删除。
    • 审计行和活动行保留字段值,清除不会碰它们。
    • 与 main 上的 FAQ 一致,FAQ 链接和匿名化建议都保留,页面其他内容未动。
  • 前提实测(dev 在启动的应用上测):
    • 删除后返回 recycleBinEntryId,列表显示 retentionDays: 30。
    • 单条清除返回 200 purged:true,之后恢复返回 404。
    • 清除后 sys_audit_log 和 sys_activity 里仍有该人的值。
  • 门禁 check-runs: 18 个检查全部完成,17 个 success。唯一失败的是 Analyze Code (javascript):查询已跑完,失败在「Uploading results」这一步,与同一时段 fix(ux): bulk Delete on expenses, accounts and opportunities says the records go to the recycle bin (#2796) #2799 的失败相同,属于 GitHub 那段 5xx 故障。本 PR 只改 .md/.mdx。中继重跑不了这个检查,见 fleet-write rerun_failed: hotcrm's link checker is .github/workflows/link-check.yml, which the relay's workflow fence (ci.yml, check-links.yml) refuses, so a seat cannot re-run a transient link-check failure on hotcrm objectstack#37280。
  • 接受的偏差(nit,不做修复轮):
    • changeset 写「只提供 Empty」,应为「唯一的移除操作是 Empty」;正文里已是准确说法。
    • 段落只说管理员能清除,没说带 modifyAllRecords 的角色在各自对象上也能。
    • zh-Hant 的界面名称沿用 FAQ 的英文写法。
  • 范围外去向: 清除后审计行和活动行仍保留被删除人的数据,这是平台层面的问题。已请维护者决定是否到 objectstack 立决策卡。
  • 落地条款: reviewer 类。CodeQL 重跑转绿、所有检查完成且无失败后,席位转 ready 并挂 auto-merge。head 再移动,本记录即失效。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:hotcrm#2 · sunhaolin · session_017xRBcV3h25dAMNWki8e1ns

Landing. This is a reviewer-class PR. The seat record 7168082300 accepted head 7348e039, and the head is unchanged.

reading value
head 7348e039e31ce75e84242c06bb46af0fdf13657d
check-runs on head all completed, none failed; Analyze Code (javascript) is success at 2026-11-26T01:13:59Z after the re-run
governed / size not governed; 18 changed lines

The seat flips it ready and arms auto-merge, and the merge queue squashes it. Fixes #2794 closes the card on merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: the right-of-erasure paragraph says a delete is a hard delete with no recycle bin; on 18.6.0 a deleted record stays 30 days in the recycle bin

2 participants