Skip to content

sheet.fill: a formula filled down a column by the kernel JIT [skip ci] - #378

Merged
ymote merged 1 commit into
mainfrom
feat/sheet-fill-kernel
Oct 8, 2026
Merged

ymote merged 1 commit into
mainfrom
feat/sheet-fill-kernel

Conversation

@ymote

@ymote ymote commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Stacked on #377 (do NOT delete that branch on merge — retarget this to main first; the #108 lesson). Phase 2's first slice of ADR 0013.

sheet.fill {book, column, rows, formula}: the numeric subset of gridcraft's parsed AST (arithmetic, @-column refs, SIN/COS/EXP/LN/SQRT/ABS/MIN/MAX) lowers to an f64 Splash compute kernel — compiled once per formula text, cached per workbook, threaded from 65k rows — and anything outside the subset falls back to the engine's evaluator row by row, so fill always computes exactly what recalc would (accelerated in the reply tells the truth).

Measured by the probe this productionizes: 1M rows, evaluator 505 ms → f64 kernel 2.9 ms on 8 threads (173×), agreeing to 1e-9. f64 buffers bind as the compute crate's word pairs (low first) over input_u32/output_u32.

Tests: 7 (service total), including in-service kernel-vs-evaluator parity on 10k rows, the cached second fill, and the honest CONCAT fallback. setup.py --check --cargo and native_apps.py --check pass (compute crate rides the existing makepad pin + .sources patch).

🤖 Generated with Claude Code

@ymote
ymote force-pushed the feat/sheets-engine-service branch from 5847816 to 76e1d7a Compare October 8, 2026 08:41
@ymote
ymote force-pushed the feat/sheet-fill-kernel branch from fe78cd9 to f8668d9 Compare October 8, 2026 08:41
@ymote
ymote force-pushed the feat/sheets-engine-service branch from 76e1d7a to 53a354c Compare October 8, 2026 09:27
@ymote
ymote force-pushed the feat/sheet-fill-kernel branch from f8668d9 to 470ed7e Compare October 8, 2026 09:27
@ymote
ymote force-pushed the feat/sheets-engine-service branch from 53a354c to ff2d18c Compare October 8, 2026 09:31
@ymote
ymote force-pushed the feat/sheet-fill-kernel branch from 470ed7e to bf650ce Compare October 8, 2026 09:31
@ymote
ymote force-pushed the feat/sheets-engine-service branch from ff2d18c to fe6f602 Compare October 8, 2026 09:52
@ymote
ymote force-pushed the feat/sheet-fill-kernel branch from bf650ce to 47bcca4 Compare October 8, 2026 09:52
@ymote
ymote changed the base branch from feat/sheets-engine-service to main October 8, 2026 10:08
The numeric subset of gridcraft's own parsed formula AST (arithmetic,
@-intersected column refs, SIN/COS/EXP/LN/SQRT/ABS/MIN/MAX) lowers to an
f64 Splash compute kernel -- compiled once per formula text, cached on the
workbook, split across threads from 65536 rows -- and anything outside it
falls back to the engine's evaluator row by row, so fill always computes
what recalc would; `accelerated` in the reply says which path ran.

Measured by the probe this productionizes (M-series, 1M rows): the
evaluator 505 ms, the f64 kernel 2.9 ms on 8 threads (173x), agreeing to
1e-9. f64 buffers bind as the compute crate's word pairs (low word
first), packed around input_u32/output_u32.

cargo test -p octosense-sheets-service: 7 tests, including kernel-vs-
evaluator parity on 10k rows in the service itself, the cached second
fill, and the honest unaccelerated fallback (CONCAT).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ymote
ymote force-pushed the feat/sheet-fill-kernel branch from 47bcca4 to b1c7cbb Compare October 8, 2026 10:08
@ymote

ymote commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Local CI passed on b1c7cbb (tools/ci-local.sh --only apps,desktop,phone --linux-host --offload, 15m23s, Darwin arm64; the ubuntu jobs and the macOS jobs' portable steps (their macOS steps ran here) on the Linux build host, Linux x86_64).

GitHub would run for this PR: desktop.yml, phone.yml, apps.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.

Job Step Result Time
ci-local / drift The local mapping fits the workflows PASS -
desktop.yml / desktop Prepare the pinned framework sources PASS 0s
desktop.yml / desktop Compile the desktop with the shared runtime PASS 2m05s
desktop.yml / desktop Desktop tools and scripts PASS 13s
desktop.yml / desktop (linux) Prepare the pinned framework sources PASS 1s
desktop.yml / desktop (linux) One copy of every shell source PASS -
desktop.yml / desktop (linux) One Makepad, App Hub, octos and Rinx in the locked graph PASS 1s
desktop.yml / desktop (linux) The native apps' generated places match native-apps.json PASS 0s
desktop.yml / native-host-api Prepare the pinned framework sources PASS 1s
desktop.yml / native-host-api Build the native acceptance host and pinned Hub CLI PASS 1m45s
desktop.yml / native-host-api Signed app tool calls a real OS permission API PASS 3s
phone.yml / home Prepare pinned sources and the reviewed runtime patch PASS 0s
phone.yml / home Validate launcher icons and Apple asset catalogs PASS 3s
phone.yml / home Compile Home and its bundled modules PASS 1m39s
phone.yml / home (linux) Prepare pinned sources and the reviewed runtime patch PASS 0s
phone.yml / home (linux) Verify the single runtime graph PASS 1s
phone.yml / home (linux) The native apps' generated places match native-apps.json PASS 0s
phone.yml / home (linux) The pinned octos revision PASS -
phone.yml / home (linux) Build octos (unless cached) PASS -
phone.yml / home (linux) Build Home, App Hub admission and runtime policy tests PASS 3m05s
phone.yml / home (linux) Test Home, App Hub admission and runtime policy PASS 11m38s
phone.yml / home (linux) Two-lane scenario (real kernel, scripted model) PASS 26s
apps.yml / services (linux) python3 tools/setup.py PASS 0s
apps.yml / services (linux) Shared system app interface PASS 0s
apps.yml / services (linux) Kernel service PASS 16s
apps.yml / services (linux) App peers PASS 27s
apps.yml / services (linux) AI providers config PASS 4s
apps.yml / services (linux) Connected provider protocols and Linux host adapter PASS 45s
apps.yml / services (linux) L0 in-card chat (sys.chat, host side) PASS 9s
apps.yml / services (linux) System toolbox (workflow templates) PASS 1m28s
apps.yml / kernel-security (linux) python3 tools/setup.py PASS 0s
apps.yml / kernel-security (linux) The pinned octos revision PASS -
apps.yml / kernel-security (linux) Build octos (unless cached) PASS -
apps.yml / kernel-security (linux) Real-kernel tests PASS 36s
apps.yml / apps (linux) python3 tools/setup.py PASS 0s
apps.yml / apps (linux) Host services (Mail, AI providers, News) PASS 1m56s
apps.yml / apps (linux) Connected accounts and Rinx editor PASS 1m29s
apps.yml / apps (linux) Shell AI services (crates/ai-host) PASS 2m44s
apps.yml / apps (linux) AppCard runtime setup safeguards PASS 0s
apps.yml / apps (linux) AppCard clippy (own crates; shared runtime compiles) PASS 27s
apps.yml / apps (linux) AppCard transport and store PASS 7s
apps.yml / apps (linux) One Makepad, App Hub, octos and Rinx in the locked graph PASS 2s
linux-host / sandbox (linux) python3 tools/setup.py PASS 0s
linux-host / sandbox (linux) Process sandbox on Linux (Landlock, seccomp) PASS 1m38s

Notes:

  • GitHub runs Python 3.12; this run used Python 3.9.6
  • GitHub runs Python 3.12; the Linux host used Python 3.14.4

Native GitHub acceptance passed on the same head: embedded-browser.yml.

@ymote
ymote merged commit 8968461 into main Oct 8, 2026
6 of 8 checks passed
@ymote
ymote deleted the feat/sheet-fill-kernel branch October 8, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant