docs(audits): split hotcrm's 69,419 hand-written test lines three ways, and measure what os verify should have derived - #15431
Merged
Conversation
#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
hotlong
marked this pull request as ready for review
September 5, 2026 01:51
hotlong
enabled auto-merge
September 5, 2026 01:51
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.
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 ofrather thanFixesdeliberately — the card's deliverable is themeasurement 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/at71a3452were read and classified. Nothingwas classified by filename.
The subtraction the card asks for comes out at zero.
os verifyderives twoapp-agnostic families — CRUD round-trip type fidelity (
derive.ts+verify.ts)and the RLS cross-owner invariant (
rls.ts) — and neither corresponds to anyhotcrm bucket-(1) test. hotcrm also does not depend on
@objectstack/verifyatall: it is absent from
package.json, andderiveCrudCases/runCrudVerification/
runRlsProofsreturn zero hits across the repository. The remainder is thewhole of bucket (1).
Three findings worth the reviewer's attention
hooks-runtime-service.test.ts(1,503 lines) is (2), not (3). The card'sreason — "asserts what a hook does inside the platform's own sandbox" —
describes
action-sandbox.test.ts. This file imports the hand-writtenhelpers/hook-harness, callshook.handler(ctx)with the closure intact,and boots no sandbox and no engine. It is the app's own policy.
sharing-coverage.test.ts(1,309 lines) is 90% a docs test. Five of itseight describes check that the admin docs' OWD, sharing-rules and related-list
tables match the app in every locale. The name reads as authorization.
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.mjsstripComments, blank-stripped,chars / 4). Running that script unmodified reproduces its publishedauthored total ~135,830forsrc, which is the check that the same rule isbeing applied.
test/is 466,587 tokens by that rule — 3.4x the authoredsrcsurface the "under 150k tokens" claim is measured on.
The honest reading requested by item 4 of the card:
srcplus the tests ametadata 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/objectstackderived 16runnable families for this diff; all 16 run green on the final commit
74c774f06,through
scripts/pm/os-verify-lock.sh.check:doc-formula-expressionsfirst exited 3 — its own "PREREQUISITE NOT MET,nothing was measured" because
@objectstack/formulaand@objectstack/lintwere 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/-onlyPRs carry none by precedent (
76b6dd07e,37ba31a4b,1b51c683d— allaudit-only, all zero changeset files), so the
skip-changesetlabel is applied.🤖 Generated with Claude Code
https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
Generated by Claude Code