Skip to content

feat: add EtherCalc workbook integration preview - #105

Draft
Winter-Soren wants to merge 7 commits into
mainfrom
feat/ethercalc-integration
Draft

Winter-Soren wants to merge 7 commits into
mainfrom
feat/ethercalc-integration

Conversation

@Winter-Soren

@Winter-Soren Winter-Soren commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Completed experiment results currently have no persistent, access-controlled spreadsheet workspace. This draft adds the first EtherCalc integration across pharma, finance, and circuit runs: source-sheet mapping, MongoDB workbook permissions, an embedded engine gateway, and explicit native-format IPFS versions.

Progress PR requested by the user. Not ready to merge or demo. Spreadsheet APIs/gateway require SPREADSHEETS_ENABLED=true; UI entry points require NEXT_PUBLIC_SPREADSHEETS_ENABLED=true. Both default off. Pharma ownership enforcement is active independently of those flags and requires the existing signed identity bridge.

Tracks #103 (left open). Documentation: QMeshPy/documentations#1. Exactly one issue covers this feature.

Included behavior

  • Owned pharma submit/list/read/live/cancel operations; native source cells retain literal strings, units and original result JSON references.
  • Deterministic owner/run/version identity, explicit member invitation/join, viewer/source write restrictions, and deliberate sharing when adding another owned run.
  • Same-origin HTTP/WebSocket gateway, per-frame permission checks, filtered upstream credentials, and authorized sibling recalculation.
  • Pinned audreyt/EtherCalc 11d8a49540634249094b2c92c3ee1a3aa3d3b4ca standalone build with a checked patch isolating internal formula lookups by workbook. No Docker or Cloudflare account is required.
  • Explicit public-IPFS consent, actual content upload/returned CID verification, native saves and source JSON, and restore into a new workbook with formula-only reference remapping.
  • Workbook UI and completed-run links; bounded range context prepared for manual copying to an existing agent conversation.

Validation

  • 66 passed: focused pharma ownership/unit/integration tests.
  • 15 passed: pure mapping, permission/path/frame, snapshot and restore regressions.
  • Scoped ESLint: passed after fixes. git diff --check and shell syntax check: passed.
  • Optional MongoDB service integration tests were attempted but blocked: localhost refused connection and the configured remote SRV hostname returned ENOTFOUND, also outside the sandbox. They are opt-in via RUN_SPREADSHEET_DB_TESTS=1; no successful DB-integration claim.
  • TypeScript check fails in frontend/src/features/ipfs/lib/cid-resolve.ts:66 on incompatible transitive Helia/multiformats types; full build is not passing/verified.
  • Upstream client/multi-client/assets built. Worker bundle stopped on Wrangler local-cache permissions; escalation was declined. No Cloudflare deploy occurred.
  • Not verified: Chrome walkthrough, independent authenticated collaboration/viewer rejection, restart persistence, actual Kubo retrieval/restore, or full project test/build suite.

Review and remaining work

A fresh review identified leaked HMACs in upstream broadcasts, rejected cross-sheet recalculation, unretryable initial imports and restore changes to literal cells. Fixes are included; pure regressions pass. Failed-import retry coverage requires the currently blocked MongoDB suite.

Before enabling beyond controlled development, finish runtime verification and harden in-flight snapshot consistency, crash recovery for stale creating records, aggregate workbook limits, and deployment topology for a separately hosted Next frontend/gateway. Domain mapping is currently primarily typed path/value source tables, not finished comparison tables. Agent integration is manual context preparation, not an embedded agent panel or approved edit flow. Pharma's pre-existing in-memory source store remains non-durable.

No credentials, local environment files, dependency-install lockfile churn, main merge, or video publication are included. See documentations/technical/ethercalc-progress.md for setup and the remaining demo checklist.

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