Skip to content

fix(revenue): a product with no code is titled by its name, and the read trigger never touches an untitled product (#2168) - #2171

Merged
hotlong merged 1 commit into
mainfrom
claude/product-title-codeless-products
Oct 19, 2026
Merged

hotlong merged 1 commit into
mainfrom
claude/product-title-codeless-products

Conversation

@hotlong

@hotlong hotlong commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Part of #2168 (follow-up to #2169)
Clause-②: no

What 5.1.1 showed on staging

Measured on os-05ayzz after upgrading 5.0.0 → 5.1.1, with no manual step at all:

  • The boot-time reads titled 24/81 opportunity lines and 7/22 quote lines.
  • The first list view raised that to 50/81 and 12/22.
  • AI Agent Seat (Annual) reached 21/21: the chained mirror passes work, and nothing hit the sandbox ceiling in the logs.

Four products never moved: ObjectStack Platform (15 lines), Premium Support (7), Implementation Services (5) and Cloud Hosting (Annual) (1).

  • All four were created on 2026-07-06, before the product_code autonumber, so product_code is empty.
  • display_title is product_code + " - " + name, so it evaluated to nothing.
  • product_title_mirror returns when the title is empty, so their 28 lines can never be titled, and the products' own record titles were empty too.

Worse, line_item_product_title_backfill re-saved those products on every read of their lines. Their updated_at moved at 02:30:16, 02:30:29 and 02:30:32 on one list view.

The fix

  • display_title falls back to name when product_code is empty. This is the app's own formula, for rows older than the autonumber, in the has(...) && ... != null form opportunity.object.ts already uses.
  • The read trigger reads display_title and skips a product whose title is empty, so no product is ever written on a read that cannot title anything.

Tests

  • test/line-item-product-title.test.ts, three new cases on the real engine:
    • a code-less product's display_title is its name;
    • on each line object, a line of a code-less product is named by the product name;
    • on each line object, an old untitled line of a code-less product is titled on its first API read.
  • test/product-title-mirror-pass.test.ts, one new case: the read trigger never touches a product whose title is empty. The fake store now carries display_title.

Ablations, each run and then restored:

Change Result
the old formula all 3 new engine cases fail
the 5.1.1 read trigger (no guard) the new unit case fails

Release

This ships as 5.1.2, and 5.1.2 goes to production in place of 5.1.1. 5.1.1 is on the staging marketplace only, and a version number cannot be re-published.

🤖 Generated with Claude Code

…ead trigger never touches an untitled product (#2168)

Measured on staging os-05ayzz after upgrading to 5.1.1: four products
created before the product_code autonumber (2026-07-06) hold no code,
so display_title (`product_code + " - " + name`) evaluated to nothing.
product_title_mirror had no title to stamp, their 28 lines stayed
untitled, and line_item_product_title_backfill re-saved those products
on every read of their lines (updated_at moved on each list view).

- display_title falls back to the name when product_code is empty.
- The read trigger skips a product whose display_title is empty.

Co-authored-by: Claude <noreply@anthropic.com>
@hotlong hotlong added the bug Something isn't working label Oct 19, 2026
@vercel

vercel Bot commented Oct 19, 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 Oct 19, 2026 2:35am UTC

Request Review

@hotlong
hotlong added this pull request to the merge queue Oct 19, 2026
@github-actions github-actions Bot added ci/cd CI plumbing and the verification pipeline metadata Declarative metadata — schema, security posture, UI surfaces backend Server-side behaviour — hooks, flows, actions labels Oct 19, 2026
Merged via the queue into main with commit a365318 Oct 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Server-side behaviour — hooks, flows, actions bug Something isn't working ci/cd CI plumbing and the verification pipeline metadata Declarative metadata — schema, security posture, UI surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant