Repository navigation
docs(app-crm): point two stale approval comments at the real consumers - #14840
Merged
Merged
Conversation
Both comments named a "Discount Approval" flow that examples/app-crm does not contain (src/flows/ holds only convert-lead.flow.ts, and flows/index.ts states the one-flow scope deliberately). These examples are copy-source for AI authors, so a comment naming an absent flow teaches a false shape. - opportunity.object.ts: approval_status is now described as the mirror target for an approval node's `approvalStatusField` (ADR-0019), pointing at the showcase's approval flows as the worked example. - sales-positions.ts: FinanceApproverPosition now names its actual consumer, the `crm_sales_user` binding in bind-position-sets.ts plus the `positions` registration in objectstack.config.ts. Comment-only: no declaration, expression or export changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
os-sales
marked this pull request as ready for review
September 3, 2026 05:17
os-sales
enabled auto-merge
September 3, 2026 05:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14516
Two comments in
examples/app-crmnamed a "Discount Approval" flow that this app does not contain. These examples are copy-source for AI authors, so a comment naming an absent flow teaches a false shape. This PR rewrites both comments to name what is actually in the tree. Comment-only — no declaration, expression, or export changed.Scope
Resolution 1 of the card only, per the triage ruling on the issue.
src/flows/index.ts's stated one-flow scope. Out of scope here.FinanceApproverPositionas an unreferenced declaration) rests on a false premise and is not acted on. The position is live scaffolding with a real consumer; deleting it would breakobjectstack.config.tsand the permission-set binding. Fence proof below.Site 1 —
examples/app-crm/src/objects/opportunity.object.tsBefore:
After:
Why:
examples/app-crm/src/flows/holds onlyconvert-lead.flow.tsandindex.ts, andflows/index.tsstates the split deliberately — "Automation breadth (approvals, schedules, connectors, subflows, …) is the showcase's job". The mechanism the field serves is real and is now named: an approval node'sapprovalStatusFieldconfig key (ADR-0019;packages/plugins/plugin-approvals/src/approval-service.tsreads it intomirrorField). The worked approval flows are inexamples/app-showcase/src/automation/flows/, and theapprovalStatusField: 'approval_status'wiring is spelled out inskills/objectstack-automation/SKILL.md.Site 2 —
examples/app-crm/src/security/sales-positions.tsBefore:
/** Referenced by the Discount Approval second step. */After:
Why: there is no "Discount Approval second step" anywhere in the repo. The comment now names the position's actual consumers.
Fence —
FinanceApproverPositionis still referencedgit grep -n "FinanceApproverPosition" HEAD -- examples/app-crmon the branch head:git grep -n "finance_approver" HEAD -- examples/app-crm/src/security/bind-position-sets.ts:Import, registration and binding are all intact — nothing was removed.
Comment-only proof
Two independent measurements, both zero-difference:
git diff BASE..HEAD(BASE2d40f9146), the count of changed lines that are not comment or blank lines is 0.ts.createScanner,skipTrivia: true) at BASE and at HEAD:Verification — at branch head
94d444d87pnpm --workspace-concurrency=2 --filter '@objectstack/example-crm^...' buildVERDICT command-exit 0pnpm --filter @objectstack/example-crm run typecheck(tsc --noEmit)VERDICT command-exit 0pnpm --filter @objectstack/example-crm exec vitest run --maxWorkers=2Test Files 5 passed (5)·Tests 45 passed (45)pnpm check:nul-bytesOK (scanned 8070 text file(s) … no raw ASCII control bytes)Gate family re-derived from the real diff with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(2 paths vs merge base2d40f9146) — 15 families, all run:check-comment-mask-adoption,check-cross-package-test-inputs,check-keyed-text-bounds,check-position-name-fold-loaders,check-shard-attestation,check-system-context-census,check-undeclared-dep-imports,check:examples-live-imports,check:logger-receiver-detach,check:page-declaration-shape,check:published-files,check:test-source-alias,check:type-source-resolution.check-test-completenessexits 3 saying "There is no local log to hand it, so the local reading for this gate is NOT MEASURED. ⛔ It is not a red";check:dual-build-cjs-loadsexits 3 with "PREREQUISITE NOT MET — this gate reads built output, and some package has no dist/ … ⛔ This is NOT a pass: nothing was measured" (it needs a fullpnpm build; CI builds everything). Neither reads any file in this diff.ESLint — declared narrowing.
pnpm lint(repo-wideeslint . --no-inline-config) was narrowed to the two changed files, with the narrowing measured rather than assumed:--format jsonreports 2 files linted, 0 errors, 0 warnings, exit 0.eslint.config.mjswhich, in its own words at line 328, "never enables type-aware linting (noparserOptions.project, no typed@typescript-eslintrules) for ANY file, test or not" — so a two-file comment-only diff cannot move any untouched file's verdict. CI runs the full sweep regardless.Changeset
None, and
skip-changesetis applied: the diff is comment-only insideexamples/app-crm, which is"private": trueand publishes nothing.🤖 Generated with Claude Code
https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
Generated by Claude Code
Generated by Claude Code