Skip to content

docs(audits): split hotcrm's 69,419 hand-written test lines three ways, and measure what os verify should have derived - #15431

Merged
hotlong merged 1 commit into
mainfrom
claude/issue-15418-test-split-audit
Sep 5, 2026
Merged

docs(audits): split hotcrm's 69,419 hand-written test lines three ways, and measure what os verify should have derived#15431
hotlong merged 1 commit into
mainfrom
claude/issue-15418-test-split-audit

Conversation

@hotlong

@hotlong hotlong commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Part of #15418

An audit, not a code change: docs/audits/2026-09-hotcrm-handwritten-test-split.md.
No hotcrm file was touched, no test deleted or rewritten, no derivation built.

Part of rather than Fixes deliberately — the card's deliverable is the
measurement plus a record comment on the card, and the roadmap this produces
still has to be costed and dispatched. The maintainer closes it, not this merge.

The numbers

All 169 files under hotcrm test/ at 71a3452 were read and classified. Nothing
was classified by filename.

bucket lines share ~tokens
(1) platform should derive it, hand-written today 20,505 29.5% 129,752
(2) genuinely the app's own business judgement 28,242 40.7% 208,252
(3) grey zone — platform behaviour, app carries the cost 15,265 22.0% 97,972
(4) undecided 5,407 7.8% 30,610
total 69,419 100% 466,587

The subtraction the card asks for comes out at zero. os verify derives two
app-agnostic families — CRUD round-trip type fidelity (derive.ts + verify.ts)
and the RLS cross-owner invariant (rls.ts) — and neither corresponds to any
hotcrm bucket-(1) test. hotcrm also does not depend on @objectstack/verify at
all: it is absent from package.json, and deriveCrudCases / runCrudVerification
/ runRlsProofs return zero hits across the repository. The remainder is the
whole of bucket (1).

Three findings worth the reviewer's attention

  1. hooks-runtime-service.test.ts (1,503 lines) is (2), not (3). The card's
    reason — "asserts what a hook does inside the platform's own sandbox" —
    describes action-sandbox.test.ts. This file imports the hand-written
    helpers/hook-harness, calls hook.handler(ctx) with the closure intact,
    and boots no sandbox and no engine. It is the app's own policy.
  2. sharing-coverage.test.ts (1,309 lines) is 90% a docs test. Five of its
    eight describes check that the admin docs' OWD, sharing-rules and related-list
    tables match the app in every locale. The name reads as authorization.
  3. Bucket (1) is 4.5x the card's at-a-glance guess (20,505 vs 4,558), and its
    two heaviest families — docs-to-metadata consistency at 9,851 lines and
    predicate totality at 3,415 — appear nowhere in the starting set.

Measurement basis

Token figures use hotcrm's own ratchet rule
(scripts/check-source-token-ratchet.mjs stripComments, blank-stripped,
chars / 4). Running that script unmodified reproduces its published
authored total ~135,830 for src, which is the check that the same rule is
being applied. test/ is 466,587 tokens by that rule — 3.4x the authored src
surface the "under 150k tokens" claim is measured on.

The honest reading requested by item 4 of the card: src plus the tests a
metadata app cannot avoid is ~344,000 tokens (135,830 + bucket 2), and that
floor already assumes the platform absorbs every line of bucket (3). It is 2.3x
the claim and does not fit one context window.

Of the 69,419 raw lines, 22,953 are comment and 5,947 blank — 40,519 execute.

Verification

node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack derived 16
runnable families for this diff; all 16 run green on the final commit 74c774f06,
through scripts/pm/os-verify-lock.sh.

check:doc-formula-expressions first exited 3 — its own "PREREQUISITE NOT MET,
nothing was measured"
because @objectstack/formula and @objectstack/lint
were unbuilt in a fresh worktree. Both were built and it then reported its own
verdict lines rather than a skip: "self-test: 58 cases passed", "22
record-scoped formula example(s) across 427 files / 1371 TS blocks judged clean"
,
"9 @example(s) judged clean across 1159 packages/spec/src files", "14
predicate(s) ... judged clean; 6 skipped as undeterminable"
.

No changeset: this publishes nothing from any released package. docs/audits/-only
PRs carry none by precedent (76b6dd07e, 37ba31a4b, 1b51c683d — all
audit-only, all zero changeset files), so the skip-changeset label is applied.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m


Generated by Claude Code

#15418)

Measured read-only against objectstack-ai/hotcrm at 71a3452. Every one of the
169 files was read; nothing was classified by filename.

  (1) platform should derive it   20,505 lines  ~129,752 tokens  29.5%
  (2) the app's own judgement     28,242 lines  ~208,252 tokens  40.7%
  (3) platform behaviour, app pays 15,265 lines  ~97,972 tokens  22.0%
  (4) undecided                    5,407 lines   ~30,610 tokens   7.8%

The subtraction the card asks for comes out at zero: `os verify` derives CRUD
type-fidelity round-trips and the RLS cross-owner invariant, neither of which
corresponds to any hotcrm bucket-(1) test — and hotcrm does not depend on
@objectstack/verify at all. The remainder is the whole of bucket (1).

Token figures use hotcrm's own ratchet rule (check-source-token-ratchet.mjs
stripComments, blank-stripped, chars/4), which reproduces its published
authored total of ~135,830 for src.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
@github-actions github-actions Bot added the size/l label Sep 4, 2026
@hotlong hotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026 — with Claude
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 4, 2026
@hotlong
hotlong marked this pull request as ready for review September 5, 2026 01:51
@hotlong
hotlong enabled auto-merge September 5, 2026 01:51
@hotlong
hotlong added this pull request to the merge queue Sep 5, 2026
Merged via the queue into main with commit 58f30d9 Sep 5, 2026
37 checks passed
@hotlong
hotlong deleted the claude/issue-15418-test-split-audit branch September 5, 2026 02:41
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 size/l skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants