Skip to content

[01/06] feat(core): add bounded functions exec foundations - #3

Draft
HeavenllyDemon wants to merge 2 commits into
mainfrom
feat/functions-exec-01-foundations
Draft

[01/06] feat(core): add bounded functions exec foundations#3
HeavenllyDemon wants to merge 2 commits into
mainfrom
feat/functions-exec-01-foundations

Conversation

@HeavenllyDemon

Copy link
Copy Markdown
Member

First PR in the ordered functions.exec stack. Adds private, cross-platform protocol, NDJSON framing, retention, and worker-helper foundations only. No tool registration, daemon, engine, provider, persistence, or client surface is changed.

Verification:

  • bun test test/functions-exec (18 pass)
  • strict stage-only TypeScript check
  • Bun bundle of all four modules
  • git diff --check

Full Core TypeScript still has six pre-existing approvals.test.ts diagnostics; nested Seatbelt workflow execution is blocked by the enclosing host sandbox.

@HeavenllyDemon
HeavenllyDemon force-pushed the feat/functions-exec-01-foundations branch from bf1b550 to 13c96f1 Compare August 18, 2026 13:15
@HeavenllyDemon HeavenllyDemon changed the title [01/05] feat(core): add bounded functions exec foundations [01/06] feat(core): add bounded functions exec foundations Aug 18, 2026
HeavenllyDemon added a commit that referenced this pull request Aug 20, 2026
USER LIVE-GATE FIX #4, research half: does LOK paint an infinite grid
past a spreadsheet's used range, the way Excel/Calc's own UI does?
Answered empirically against our real vendored LOK pin, not assumed —
OfficeHelperLiveTests.testGateXlsxTilesPastTheUsedRangeEmpiricalInfinite
GridProbe requests gate.xlsx tiles at the used-range edge and ~20 tiles
beyond it: both come back as a clean, gridded, non-blank canvas (PNG
dump), unchanged all the way out. paintPartTile genuinely renders empty
cells there; nothing needed faking client-side.

Implementation: OfficeTileCanvasView.effectiveExtentTwips extends the
scrollable bound by 2 extra screens per axis, for spreadsheets only
(isSpreadsheet, read once from the open document's type — presentations/
documents have real fixed page bounds and were never probed for this).
One computed property feeds BOTH the scroll clamp (clampedOriginX/Y) and
performSubscribe's churn-audit skip-check
(officeClampViewportToDocumentExtent's call site) so they cannot disagree
— the trap being guarded against: if scrolling reached further than the
skip-check's own clamp, the margin would be scrollable but its tiles
would never actually get requested (placeholders forever, just moved past
the new margin instead of past sizeTwips).

That widened skip-check interacts with fix #3's whole-document residency
sweep at a small, fully-resident spreadsheet's own edge: the fixed
subscribeMarginPoints overscan now genuinely touches real, never-
prefetched margin tiles, so a resident document's post-fill scroll near
its edge now costs exactly one further subscribe (a one-time margin
warm), not the prior zero. testResidentDocumentIsPrefetchedWholeIn...
NoFurtherRequests is amended (not weakened) into a two-phase pin proving
exactly that: one warm, then genuine silence once the touched slice is
also cached — the "no chatter for zero benefit" invariant's spirit holds,
only its letter moved.
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