Repository navigation
Refuse a hand delete of a settled quote's or a closed deal's line item, once the platform declares the cascade-delete hook signal (#2078 ruling C, step 2) #2088
Description
Blocked-by: objectstack-ai/objectstack#23221
This card carries step 2 of #2078's ruling (the HotCRM guard). #2078 keeps step 3 (A's doc sentence, dispatched as the interim state) and closes when step 3 lands. Step 1 is objectstack-ai/objectstack#23221.
Filing gate ③: a task the maintainer set. #2078 was ruled letter C on 2026-10-13, the maintainer's word verbatim 「hotcrm 三个决裁都同意」 (ruling comment 6142043303). Step 2, quoted: "The HotCRM guard: a HotCRM card, pm:blocked with Blocked-by: that objectstack card. Once the signal ships, it refuses only a hand delete of a settled quote's or a closed deal's line. Deleting the quote, the deal or the account keeps working, per #720's ruling."
Filed by the repo:hotcrm seat (session_01BCDqr1DqnQjEh5jA9gGkUG). ⛔ Not a claim.
Reader: the repo:hotcrm seat's unlock scan. It dispatches this card when objectstack-ai/objectstack#23221's key is in a release that HotCRM's @objectstack/* pin installs. "Merged" is not the criterion.
Dedupe: every hotcrm issue, all states, listed through GET /repos/objectstack-ai/hotcrm/issues?state=all page by page to the first short page (796 issues, PRs excluded), then matched case-insensitively on titles: hand delete → 2 (this card and #2078); cascade → 3 (this card, #2078, and #727, closed, a different defect: the parent lookups lacked deleteBehavior: 'cascade'). The rest of the family is #2060 item 1 (PR #2076, insert/update on a settled quote) and #2077 (closed deals). None is this guard. This line was corrected after filing: the first version claimed this scan before it was run.
What it does (after the platform signal ships)
- The
beforeDeletehooks ofcrm_quote_line_itemandcrm_opportunity_line_itemrefuse a user's delete of a line whose parent is settled. "Settled" means: an accepted or expired quote, as PR fix(revenue): an accepted or expired quote's line items are frozen with it (#2060 item 1) #2076 froze it; a closed deal, as A closed deal still takes line items: a rep adds a line to a closed-won opportunity, the deal amount keeps its closed figure, and the lines stop summing to it (family of #2060 item 1) #2077 freezes it. The hook yields when the platform's declared cascade signal is set. - Deleting the quote, the deal or the account still works: their cascade carries the signal (冻结/锁定守卫会拒绝引擎的引用清理:被冻结的记录让它引用的人和客户永远删不掉 #720, Option A).
- ⛔ No sniffing of undeclared engine keys (The engine's reference-cleanup marker IS reachable from a hook on 17.0.0 GA — #720's "no marker reaches a hook" note is falsified, and three copies of a shape predicate rest on it #1165). ⛔ No HotCRM workaround before the signal (AGENTS.md §2).
Acceptance
- A hand delete of one line on an accepted quote, and on a closed-won deal, is refused with the freeze message.
- Deleting an accepted quote with lines, a closed deal with lines, and an account that holds either, all succeed.
- The guard reads only the declared key. The measured shape is the Browser pass #2058 — HotCRM-side defects (18 items: accepted quote still takes lines, half-converted leads, agents losing their cases, unreachable Sales Home, …) — list card, split per item at dispatch #2060 report's ablation 2b, which refused both legs; this card's tests pin both.
quotes.mdx/opportunities.mdx(3 locales): the interim sentence from [Decision] Removing a line item from an accepted quote or a closed deal: keep allowing it and say so (A), or refuse a hand delete once the platform tells a hook "this delete is a parent's cascade" (C)? #2078 step 3 is replaced by the frozen-lines statement.
Generated by Claude Code
Activity
objectstack-fleet commentedon Oct 14, 2026
State reading by the
repo:hotcrmseat (session_01P8mZuzuyZAHSrgQKmv6ASv), 2026-10-14T14:04Z. ⛔ Not a claim.Unlock scan after hotcrm moved to
@objectstack/*18.0.0-next.1 (#2105 → PR #2106,main=f4ac253f). The blocker objectstack-ai/objectstack#23221 is closed (2026-10-14T12:00Z), and its fix584e7373(HookContext.referentialCascadeDelete) is on objectstackmain, but no published version carries it yet:@objectstack/spec,objectql,runtime@18.0.0-next.1tarballs,grep -rl referentialCascadeDeletegrep -rl referentialFieldCleardist-tagsnext=18.0.0-next.1,latest=17.7.0So this card stays
pm:blocked.Blocked-by: objectstack-ai/objectstack#23221holds, now read as "a published@objectstack/*version that carries584e7373". The next upgrade card that lands such a version unlocks this one.