Useful forum and one optimization round — 2026-10-22

The expanded forum passes native and actual wasm64 checks with 10,000 users, 64 categories, 10,000 topics, 100,000 posts and 300,000 exact likes. On the same expanded business work, the selected SDK/application stack reduces full population instructions by 2.550%, ordinary replies by 8.137%, likes by 14.494%, recorded views by 16.903%, and rolling category queries by 26.041%. Popular-post queries cost 2.013% more. All 596 broader primary collection cases and 26 lifecycle stages pass; strict diagnostic attribution remains incomplete in the core fixture.

Expanded business contract

Eight new bounded Wire endpoints add a seven-UTC-day activity window, daily readers/contributors, post trends, category activity, per-day content-size percentiles, exact visible-content duplicate previews and moderator activity hints. The existing forum, analytics dashboard, archives and maintenance tests remain. The expanded app uses 14 Minima families; the previous app used 13, and Safety adds BlockedCountingBloom.

Pulse accepts internal events from successful forum operations. It keeps at most seven day slots and four sketch blocks per active day, returns explicit zero rows for gaps, and excludes expired days before cleanup. Queries do not rotate or free slots. The next accepted observation retires expired slots. Bounds are seven days, 32 trend results, 16 categories and 16 quantile probabilities. The application exposes no public ingestion or clock setter; the host advances the ordinary PocketIC clock. Trending measures accepted activity, including moderation and unlike events, and may return currently hidden post IDs. It is not a visibility-filtered or personalized recommendation list. Audience and percentile outputs are per day; daily distinct audiences cannot be summed into weekly distinct users. Nominal CMS bounds apply per supplied key, not to a simultaneous exact ranking.

Duplicate previews inspect at most 50 candidates for a 1–4,096-byte body. A complete visible fingerprint index supplies candidates, and the forum facade verifies exact UTF8 bodies before returning a match. Edits and hide/unhide update that index. Bloom/CMS output is advisory; it does not reject posting or authorize moderation. Ordinary registered users receive exact matches without private lifetime repetition counts; moderator endpoints enforce moderator access. Native tests force hash collisions and counting-filter false positives through the real facade. The counting-filter benefit relative to direct exact-index lookup was not isolated; no filter-only speedup is established.

Paired measurement

Both final forum artifacts were built canonically from the same app worktree path, with the same pinned compiler, release profile, non-debug flags, features, public Wire interface, seeds and host files. Both small and large fixtures passed. Each ordinary scenario has a preceding warmup and 16 fresh samples. Two separately labelled first-transition scenarios have one sample and no warmup. These are 38 primary cost rows plus three separate one-execution profiling rows. Query callers or arguments vary to avoid cache hits.

Instructions include entry/decoding, system calls, replies, preparation, cleanup and page charges; heap fees shown here are already included in totals. Grouped workflows include every constituent call. Host times include oracle work and are not guest-only or network latency claims. The large primary rows contain 1,026 calls; three profiling captures are additional. The small fixture contains 866 primary calls. Both use 578 primary samples.

Complete setup Before After Cost delta
Instructions across all 841 committed seed calls 42,615,339,944 41,528,826,138 -2.5496%
Included heap page fees 11,018,320,000 11,058,960,000 +0.3688%

Every seed call was measured once in bounded traces; these setup totals are not extrapolated from a representative batch. Only one full large population per finalist was run. The expanded unoptimized baseline is the denominator; older analytics-only results are diagnostic context.

Complete large primary costs

All small/large rows, exact fractions and included fees are in forum.csv. Negative deltas are cheaper. Calls are total calls over the stated samples.

Scenario Samples Calls Before instructions/sample After instructions/sample Cost delta
noop 16 16 163,190 163,190 +0.000%
post-read 16 16 685,650.1875 685,650.1875 +0.000%
topic-page 16 16 1,308,314.75 1,293,314.75 -1.147%
category-topics 16 16 1,249,171.3125 1,254,171.3125 +0.400%
watched-dashboard 16 16 1,152,296.9375 1,152,296.9375 +0.000%
record-view 16 16 3,311,957.4375 2,752,140.875 -16.903%
reply 16 16 6,879,542.6875 6,319,744.25 -8.137%
edit-post 16 16 6,659,378.5625 6,194,530.875 -6.980%
like-addition 16 16 3,310,424.875 2,830,607.875 -14.494%
reader-advance 16 16 3,233,574 2,753,758.125 -14.839%
discussion-interaction 16 64 15,234,721.875 13,709,400 -10.012%
content-audit 16 16 117,620,323.875 117,640,323.875 +0.017%
topic-reconciliation 16 16 34,859,087.125 34,369,263.75 -1.405%
author-rollup 16 16 68,889,050.25 68,484,224.3125 -0.588%
analytics-overview 16 16 1,261,652 1,261,652 +0.000%
popular-posts 16 16 580,091.1875 591,766.1875 +2.013%
revision-distribution 16 16 614,845 614,845 +0.000%
cohort-overlap 16 16 857,167 857,167 +0.000%
dimension-conjunctions 16 16 302,572.5 304,831.5 +0.747%
analytics-dashboard 16 16 3,013,750.9375 2,951,029.4375 -2.081%
refresh-analytics-report 16 16 3,502,228.4375 3,439,258.9375 -1.798%
post-hint-exact-verification 16 16 245,892.6875 245,892.6875 +0.000%
archive-membership-and-retrieval 16 16 434,783.125 434,783.125 +0.000%
archive-range-rejection 16 16 669,730.5 669,730.5 +0.000%
archive-audit-256 16 16 46,961,235.625 46,961,235.625 +0.000%
duplicate-preflight-existing 16 16 1,306,119.125 1,306,119.125 +0.000%
duplicate-preflight-unseen 16 16 625,574.0625 625,574.0625 +0.000%
moderator-author-activity 16 16 565,413 565,413 +0.000%
moderator-duplicate-advisory 16 16 1,276,714.5625 1,276,714.5625 +0.000%
duplicate-preview-reply-moderation 16 64 13,274,740.375 12,135,092.75 -8.585%
transition-first-view-new-day 1 1 4,066,685 3,666,891 -9.831%
rolling-daily-activity 16 16 945,284.5 945,284.5 +0.000%
rolling-trending-posts 16 16 1,348,492.25 1,344,683.25 -0.282%
rolling-category-activity 16 16 690,475.875 510,665.9375 -26.041%
rolling-size-percentiles 16 16 598,687.5 598,687.5 +0.000%
transition-first-post-after-idle-expiry 1 1 7,284,763 6,724,994 -7.684%

The discussion interaction is a topic read, recorded view, like change and reply. Duplicate moderation is preview → accepted reply → hide → preview. Exact audit/reconciliation/rollup rows are bounded slices, with the same slice sizes before and after.

Two local archive pipelines are retained as separate cost diagnostics. Rateless reconciliation here is a bounded local toy with exact decoded-difference checks; it does not measure real cross-canister replication. Archive refresh includes drop, seal/build, bounded import and retirement.

Local archive diagnostic Samples Calls Before instructions/sample After instructions/sample Cost delta
archive-rateless-reconciliation 16 288 671,030,384 671,669,874 +0.095%
archive-refresh-and-bounded-import 16 96 63,745,031 64,384,783 +1.004%

All six costlier large primary rows are retained: category topics +5,000 instructions (+0.400%), content audit +20,000 (+0.017%), popular posts +11,675 (+2.013%), dimension conjunctions +2,259 (+0.747%), local Rateless pipeline +639,490 (+0.095%), and archive refresh/import +639,752 (+1.004%). The final two each add 640,000 included heap fees. The selected stack has 16 cheaper, 16 tied and six costlier large rows; there is no summed throughput claim across unlike workflows. The Small fixture has six costlier primary instruction rows: watched dashboard +4.334%, popular posts +1.809%, dimension conjunctions +0.773%, archive range rejection +9.329%, local Rateless reconciliation +0.915%, and archive refresh/import +2.846%; all other Small primary instruction rows tie or improve.

Fees, geometry and capacity

The selected changes pack Omni cells without crossing 4-KiB node boundaries, group packed Omni reads, add bounded generic Count-Min estimate_many with scratch storage, and batch CMS calls in analytics/Pulse. Default Omni ownership drops from 18 whole Arena blocks to six. Native tests cover five geometries, exact bottom-B/reference behavior, arbitrary order/duplicates, corruption, bounds, ownership and overflow.

Large scenario Total instruction delta Included heap-fee delta Remaining instruction delta
record-view -559,816.5625 -80,000 -479,816.5625
reply -559,798.4375 -80,000 -479,798.4375
like-addition -479,817 0 -479,817
rolling-category-activity -179,809.9375 0 -179,809.9375
analytics-dashboard -62,721.5 0 -62,721.5
popular-posts 11,675 0 11,675

“Remaining” includes stable-memory charges, system APIs and Wasm work; it is not an isolated CPU measure. The source geometry and reduced access fees support a packing explanation for mutation savings. Group preparation/copying is a plausible contributor to the popular-post regression, with unchanged heap fees in that row. Truncated physical attribution cannot assign every remaining instruction to a source operation.

Fresh-canister capacity checkpoint Before heap bytes After heap bytes Before stable bytes After stable bytes
Installed 16,842,752 16,842,752 65,536 65,536
Populated 136,511,488 136,511,488 4,194,304 3,407,872
Before lifecycle 136,511,488 136,511,488 5,963,776 5,177,344
After lifecycle 136,511,488 136,511,488 5,963,776 5,177,344

These are IC capacity/high-water values in two independently fresh populated canisters, not live allocation or host RSS. Before lifecycle, stable capacity is 786,432 bytes lower; this is not an installed-memory shrink or old-to-new migration. Actual old-layout → packed-layout KEEP is intentionally rejected, preserves the old canister state, and is followed by a successful fresh call on the old artifact. Each layout separately passes same-code KEEP.

Accuracy, privacy and recovery

Both sides match the independent exact forum, accepted-event, rolling-window, content and duplicate oracles. The only allowed business-comparison exclusion is the explicitly asserted Omni allocation count 18 → 6; all other answer/configuration fields match. New-day allocation and first post after a 15-day idle period include their complete un-warmed transition costs. Seven/15-day tests show expired answers disappear before cleanup, idle queries leave capacity/slots unchanged, no-op retries do not observe a new clock, and accepted updates retire expired windows.

Approximate answers remain approximate. At the large rolling checkpoint, day-zero readers estimate 125.9175 for 128 exact and contributors 10,020.0467 for 10,000. A nominated hot post estimates 304 events for 115 exact; another estimates 287 for 123. Category 1 estimates 6,722 total events for 6,564 exact and 289 reader events for 117 exact. Candidates are bounded and nonexhaustive; reported evictions and CMS nominal bounds do not turn trends into exact global rankings. DDS quantiles are checked against independently sorted per-day revision sizes at their 1% configured relative accuracy. Fixed-fixture errors are not universal statistical guarantees.

The exact duplicate checkpoint accepts 52 repeated bodies, returns 50 exact visible matches and discloses truncation. Its lifetime repetition estimate is 96 for 52 exact, demonstrating why hints are advisory. Author 3 estimates 35 submissions for 15 exact and 29 revisions for nine exact. Ordinary callers cannot read these moderator hints. Actual edits, hides, malformed/maximum bounded requests and changed-target retry rejection are checked. All maximum declared new request shapes pass, without lowering shared Wire limits.

Actual Wasm traps after forum-plus-derived writes roll the complete reply/like operations back. Populated KEEP preserves exact/derived state and an incomplete archive import, then bounded calls complete the import and fresh accepted work succeeds. All 52 expanded native app tests pass before and after. The full generic collection suite passed after packing/CMS; the final grouped-Omni change then passed 12 focused tests. A final full-suite rerun is not claimed. No production migration or compatibility adapter is added.

All-family primary gate

The 596-case table contains the complete historical 590-case cohort identities plus six freshly measured batched=true CMS controls on the exact old core artifact. The flag costs two extra instructions on that control; scalar controls were not substituted. Each case has 32 fresh samples, for 19,072 primary calls per side. All raw totals/heap charges and 26 lifecycle stages were independently audited.

Cohort Cases Cheaper Tied Costlier Source runner status
core 159 0 159 0 PRIMARY_PASS_DIAGNOSTIC_FAILED
sketches 156 3 30 123 PRIMARY_PASS_DIAGNOSTIC_FAILED
batches 48 0 48 0 FAIL
operations 37 0 37 0 FAILED
papers 32 2 29 1 PASS
writes 156 0 152 4 PASS
slot 8 0 8 0 PASS

Across all 596 cases: five are cheaper, 463 tie and 128 cost more. All changed rows are present in the CSV. The 128 increases comprise 114 non-CMS dispatch/read rows at +2 instructions, three CMS scalar-singleton rows at +5, six new CMS batch rows at +742 to +1,615.1875, one Omni scalar query at +0.2952%, and four complete Omni construction/verification/drop pipelines at +0.1473% to +0.5851%. Three CMS 100-key scalar rows save 193 instructions; Omni eight-query and 32-query rows save 13.8234% and 5.7396%. The generic batch API is not universally faster; the real forum category workload wins materially.

These broad controls reuse archived, source-qualified debug artifacts from their original build roots. Candidate fixtures use the matching pinned compiler, debug profile/features and non-remap flags. Effective canonical source-role mappings agree, while physical roots and raw prefix ordering differ. This is a build-layout/provenance confound for small broad-fixture deltas; the forum comparison is the stronger same-path experiment. Exact control artifact paths and hashes are retained in every cohort receipt. Initial default non-debug candidate fixtures were rejected as unmatched diagnostics and are not selected denominators.

The core module origin dictionary reaches its fixed 262,144-range admission cap. Strict validation consequently fails on stack completeness: 17 core and nine sketch captures retain this failure; the original batches/operations runners stop at the same diagnostic limit after all primary rows. The strict checker remains unchanged. A separately reviewed host continuation preserves guest call order, inputs, state, oracles and lifecycle checks, validates complete ledgers/pages and zero observer deltas, and catches only the exact active-module cap condition. Its result is PRIMARY_PASS_DIAGNOSTIC_FAILED, with the original primary PASS retained. Paper profiles pass. No complete source/stack attribution is claimed for capped captures.

The three separate forum profiler rows also have complete cost/page ledgers and zero unexplained instructions, but truncated origin/stack attribution. They are not substituted for ordinary samples. The earlier eight old-feature captures supplied a bounded diagnosis only.

Provenance and portable verification

Compiler commit: 7df81381d027710708209f36b98d11b1c88f8d2e. PocketIC SHA-256: 2e1dae35a83d8169533630c06fb0a7cb4086f71fa10fa60a5fd4137ea5f3672f; Node v24.11.1 and pic-js 0.16.1. Final before Wasm: f3fc3926990723c516ecbdf6053a475bb6fb623bef3c5dd3156b90e0e11d8a6b; after Wasm: e00c393b6f8cad084035191bffdfc575a9d7a70e364b68769ba7d64308d65a43. The docs-only canonical refresh reproduces the after hash.

The measured clean App tree at c8d601bc62ee98e5149d2cdd7fff6bd11bf74cbb and Main integration commit 10b8c02f55f3ed4ecb3b7fc46a27fb57e56b04a1 both have Git tree ce6c2081d1f6ac646d88741715475ceb8276e7f8. This binds the integration to the qualified source; no literal Main-path rebuild is claimed. All 47 pre-existing dirty Main files were preserved and excluded. Locked RRT dependency receipts show Minima is absent and all 250 local compiled input files unchanged, so no new Heavy RRT run is claimed.

From the repository root, run python3 research/experiments/2026-10-22-forum-useful/evidence/verify.py; the script resolves inputs relative to its own file. The packet index and deduplicated archive retain exact local source/host bytes, complete primary trace bytes, source hash inventories, build manifests, cost/page ledgers, rejected-attempt receipts, native logs, lifecycle evidence and independent audits. Wasm/helper/debug binaries, external source contents, full profiling captures/origin dictionaries, server executables and build caches are omitted. Source inventories are explicit projections: their original hashes are retained, but their original gzip bytes cannot be reconstructed from the packet. See experiment notes for failed attempts and unmeasured follow-ups.