Skip to content

Full Openscience Redesign! - #240

Merged
Aayam Bansal (aayambansal) merged 1 commit into
mainfrom
aayam/kernel-science-workbench
Aug 1, 2026
Merged

Full Openscience Redesign!#240
Aayam Bansal (aayambansal) merged 1 commit into
mainfrom
aayam/kernel-science-workbench

Conversation

@aayambansal

@aayambansal Aayam Bansal (aayambansal) commented Jul 30, 2026

Copy link
Copy Markdown
Member

Builds the OpenScience science workbench in incremental, tested milestones. This PR remains a draft and must not merge to main yet.

Workbench UI

  • Split-view workspace: conversation center, contextual right pane that exists only when something is open. Session tabs (reorderable, persisted) on the left; open files render as reorderable, closable tabs in the right pane, capped with honest eviction and restored across reloads.
  • Compact Claude-Science-inspired chrome; the display serif and decorative glow/orbit/sparkle flourishes are retired; collapsed user messages show ~5 lines.
  • Composer: plan|act toggle (plan is a mode, not a specialist), inference-source label (managed / BYOK / ChatGPT — only when provable, no guessing), effort chip when non-default, auto-accept folded into the model popover.
  • A persistent plan panel above the composer shows the live step checklist for the whole run with one-click plan approval.
  • The command palette is a real project search: plain-text matches over session titles, conversation text, and artifact files, with message-anchor navigation. No semantic claims.

Permissions and plan mode

  • Five-scope permission cards: allow once / this conversation / this project / always / deny. Standing approvals persist, are listed in settings, and are revocable; the old in-memory "always" that vanished on restart is gone.
  • Cards state exactly what is granted: read-only vs read-write folder access, exact network host.
  • Spend-class permissions (atlas, websearch) never inherit blanket wildcard allows.
  • A webfetch to a blocked domain asks instead of erroring; "always" lands in the visible Network allow-list. Allow-list copy states its true scope.
  • Plan mode stays enforced fail-closed in the backend.

Provenance, artifacts, review

  • Every execution path records the shared provenance envelope — kernels, compute jobs, artifact versions, and now every bash command (redacted, with message linkage).
  • GET /file/lineage exposes producing runs and messages for any file; the artifact inspector's Run and Messages tabs render that data for real (they were hardcoded empty), with show-in-conversation jumps.
  • Explicit save turns a file into a durable, versioned, immutable artifact (toolbar action + end-of-turn affordances on written files); durable versions survive cleanup instead of silently expiring after 7 days.
  • The Evidence surface is fully removed; provenance lives on artifacts.
  • The reviewer is a direct action: a header entry launches it on the session with its provenance tools restored via session-scoped permission rules and structured context. Findings carry a lifecycle — open, addressed, confirmed only by a later verifying pass — listed in the inspector with resolve actions. Optional auto-review after durable saves (off by default). Deterministic manuscript checks are renamed "publication preflight" everywhere user-facing.

Memory

  • Hermes-style bounded core memory: per-scope character budget with a capacity gauge, duplicate rejection, and a consolidation wall; a memory tool for the primary agents (add / replace / remove / search); SQLite FTS5 full-text search over notes and past session text, in the tool and the settings panel; agent-written notes are badged. Stored JSON and the settings API stay backward compatible.

Compute

  • Kernel cards show live CPU and resident memory sampled per refresh, plus target; anything unreportable reads "Unavailable", never 0.
  • Job dispatch requires reviewing the exact command first; scheduler wrappers are described truthfully, never fabricated.
  • Model endpoints are fully removed (routes included); Atlas Compute appears only as a deliberate coming-soon slot.

Truth pass

  • Display-only surfaces removed (registry-actions permission grid, fake managed-provisioning copy, dead legacy composer/center-tab/drag-drop code, shadowed CSS generations).
  • Relative markdown images resolve everywhere through the raw-file endpoint; .html files preview inside a fully sandboxed iframe; DOMPurify is never bypassed.
  • Scratch workspaces of deleted sessions are swept after a quiet day.

Guardrails

  • Harness untouched: agent registry, agent prompts, system prompts, and prompt routing are byte-identical to main.
  • No push to main. Aayam-only authorship. npm test channel only.

Verification

  • Full backend suite, frontend workspace (406 tests) and shared-UI suites, monorepo typecheck (7/7), SDK/OpenAPI regeneration byte-clean, repository Prettier check — green locally and in CI on every push.

Next

  • npm test-channel publish, full browser walkthrough of every surface, fix-and-republish loop until clean.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openscience Ready Ready Preview Aug 1, 2026 7:07pm

Request Review

@aayambansal

Copy link
Copy Markdown
Member Author

Critical UI + isolation slice pushed at 42c8569.

Local verification:

  • 36 focused backend isolation/kernel tests passed
  • 16 focused model/compute UI tests passed
  • full backend: 1,464 passed, 1 skipped, 1 known standalone SPA-fallback failure
  • repository typecheck, production workspace build, Prettier, and diff checks passed
  • live browser geometry verified for both model selectors, revised palette, Kernels, and Jobs

Fresh test-publish run for this head: https://github.com/synthetic-sciences/openscience/actions/runs/30551467789

No harness/workflow, memory/Hermes, Atlas Compute, or LLM provider-routing files were changed.

@aayambansal

Copy link
Copy Markdown
Member Author

Checkpoint d1b48e9 pushed. New slices on the draft PR: compact provider-marked model picker; ChatGPT/Codex connection restored; files remain in the contextual pane; session-scoped read/write grants with traversal and symlink enforcement; fail-closed Plan-mode tool gate; lazy session-owned kernel lifecycle with real stop/crash/process identity; immutable artifact version history; and project/session-scoped UI state with compact navigation. Integrated verification at this checkpoint: 46 backend security/kernel/artifact tests passed, 292 frontend tests passed, backend and frontend typechecks passed. Memory/Hermes, Atlas Compute routing, harnesses, and workflows remain intentionally untouched. Continuing with the project-capability/folder abstraction audit and critical security review.

@aayambansal

Copy link
Copy Markdown
Member Author

Project-capability checkpoint pushed at 7903ce3. Canonical frontend URLs now use opaque project IDs with transparent legacy base64-link replacement; SDK and session-scoped caches carry project identity. Pre-Instance repo/Atlas bridge/folder routes and all local Compute Jobs HTTP routes now resolve canonical server-owned project roots, preserve legacy clients, and return structured unknown/stale/mismatch errors. Focused additions: 47 pre-route tests, 13 settings-compute route tests, 12 compute lifecycle tests, and full frontend 301 pass / 12 skip / 0 fail with typecheck and production build. The previous head passed CI Test, Typecheck, builds, workflow lint, launch smoke, CodeQL, Secret Scan, npm publication, and all four OS package smokes; its only red was the three-file format issue corrected in this checkpoint. Fresh CI/CodeQL/Secret Scan/test-publish runs are active for 7903ce3.

@aayambansal

Copy link
Copy Markdown
Member Author

Phase 0 package-isolation slice (DIST-003) is tested and ready to push.

What changed

  • OPENSCIENCE_CONFIG_DIR and OPENSCIENCE_DATA_DIR are now authoritative runtime roots. An explicit config root prevents fallback discovery of normal XDG and ~/.openscience config, and an explicit data root takes precedence over a normal data-location pointer.
  • Scanning a config directory no longer creates dependency metadata or runs bun add / bun install. An explicitly configured plugin still goes through the existing execution-config trust gate before the plugin loader can install it.
  • Early synced-config/env loading and the synsci launcher now follow the explicit roots.
  • openscience doctor reports executable, version, channel, native platform package, config root, data root, cache root, and state root.
  • The release note now isolates npm prefix/cache/userconfig plus HOME, config, data, and all XDG roots. The native smoke packer gained a current-platform mode for local packaged validation.
  • The canonical repair plan was committed separately and updated with verified evidence. No route or schema changed, so JavaScript SDK regeneration was not required.

Exact validation

  • Focused real-process isolation regression: 1 passed, 0 failed, 9 assertions.
  • Config suite: 53 passed, 0 failed, 97 assertions.
  • Installation suite: 18 passed, 0 failed, 55 assertions.
  • Full backend suite: 1,624 passed, 1 skipped, 0 failed, 4,487 assertions across 181 files.
  • Backend typecheck: passed (tsgo --noEmit).
  • Production frontend/native build: passed; Vite built 2,467 modules in 9.68s, embedded 483 web asset entries, and compiled @synsci/openscience-darwin-arm64.
  • Launcher syntax check and Prettier check for every changed implementation/test/doc file: passed.
  • Packaged npm flow: locally generated wrapper + Darwin arm64 platform tarballs installed with npm --ignore-scripts into isolated npm/config/data/XDG roots. Packaged openscience --version returned 0.0.0-aayam/kernel-science-workbench-202607310623; doctor reported the assigned roots and @synsci/openscience-darwin-arm64; normal decoy root tree and file hashes were unchanged; npm uninstall removed the packages while preserving the isolated config/data roots.

State and remaining blockers

  • DIST-003 is implemented in source and locally packaged behavior. Exact published-prerelease installation and test dist-tag verification remain open acceptance work.
  • Remaining Phase 0 work: authoritative cross-surface version metadata (DIST-001), the complete lifecycle-disabled platform contract (DIST-002), a redacted support bundle, registry prerelease verification, and first-load console verification (CONSOLE-001).
  • No npm version was published or dist-tag moved. No Atlas, compute, provider, or production service was contacted. No migration or normal persistent user data changed; only isolated temporary test roots were created.
  • Outgoing commits are 53f704e0, 855124a2, and aef55c89; all author and committer fields are exactly Aayam Bansal <aayambansal@gmail.com>, with no co-author or agent/bot attribution. They are not pushed yet.

@aayambansal

Copy link
Copy Markdown
Member Author

Push completed to aayam/kernel-science-workbench at aef55c890ec6dbd6bace32699ffccd1699393588 (range 9d5f344c..aef55c89). The pre-push hook ran workspace typechecking: 7 successful tasks, 0 failed. The unrelated .openscience/openscience.jsonc modification and openscience-starters/ directory remain uncommitted. No push was made to main, and PR #240 was not merged or closed.

@aayambansal

Copy link
Copy Markdown
Member Author

Phase 0 version-authority slice (DIST-001) is tested and ready to push.

What changed

  • The production frontend now receives the same Script.version used to compile the CLI and native package instead of displaying the stale workspace-manifest version.
  • The build emits embedded version.json metadata with version and channel. Settings and error diagnostics continue to consume platform.version, which now carries the release build value.
  • openscience doctor reads the embedded frontend metadata, prints it, and warns if its version/channel differs from the compiled CLI.
  • The native smoke packer now refuses native/UI version mismatches and produces matching local wrapper and synsci launcher tarballs for packaged validation.
  • A production-build regression was added. It failed before the fix because generated assets did not contain the explicit release version, and passes after the fix.
  • No route or API schema changed, so JavaScript SDK regeneration was not required.

Exact validation

  • Pre-fix regression: 0 passed, 1 failed as expected because VITE_OPENSCIENCE_VERSION was absent from the production assets.
  • Post-fix production-version regression: 1 passed, 0 failed.
  • Frontend unit suite with an explicit unit-file list: 404 passed, 12 skipped, 0 failed, 2,375 assertions across 80 files.
  • Release-installation suite: 20 passed, 0 failed, 61 assertions across 11 files.
  • Full backend suite: 1,626 passed, 1 skipped, 0 failed, 4,490 assertions across 182 files.
  • Workspace typecheck: 7 successful tasks, 0 failed.
  • Prettier and diff checks: passed.
  • Final production frontend/native build: 2,467 modules transformed, Vite build completed in 9.44s, 484 embedded web entries generated, and @synsci/openscience-darwin-arm64 compiled.
  • One broad bun test src script attempt also auto-discovered a Playwright E2E spec and produced the repository raw-Bun/Playwright loader error; the supported explicit unit-file run above is green and excludes E2E specs.

Packaged flow reproduced

  • Built and packed local version 2.0.2-test.local.202607311445.
  • Installed both locally generated npm tarballs with lifecycle scripts disabled and with isolated HOME, npm prefix/cache/userconfig, OpenScience config/data, and XDG roots. Public registry access was forced to 127.0.0.1:9, so package resolution could not use the external npm registry.
  • The installed npm records, openscience --version, synsci --version, doctor, /global/health, and served /version.json all reported 2.0.2-test.local.202607311445.
  • Doctor reported Frontend version: 2.0.2-test.local.202607311445 (test) and @synsci/openscience-darwin-arm64.
  • Uninstall removed both npm packages and preserved the isolated config/data roots.

State and remaining blockers

  • DIST-001 is implemented for current runtime surfaces and local package acceptance. A dedicated redacted support-bundle export and exact registry-published prerelease verification remain open.
  • DIST-002 cross-platform lifecycle-disabled native-package behavior, test dist-tag resolution, and CONSOLE-001 first-load verification remain before Phase 0 is complete.
  • No npm version was published and no dist-tag was moved. No normal persistent user data or migration state changed. GitHub was contacted only for branch fetch and this PR update; no Atlas, compute, provider, or production service was contacted.
  • Outgoing commits are 9f0b3c7c8b17129eb71e11ff863ef284f39dbd5c and 4bee503255ea3bc29c9f24785c3df5a0c9ed9332; both author and committer identities are exactly Aayam Bansal <aayambansal@gmail.com>, with no co-author or agent/bot attribution. They are not pushed yet.
  • The unrelated .openscience/openscience.jsonc modification and openscience-starters/ directory remain uncommitted.

@aayambansal

Copy link
Copy Markdown
Member Author

Push completed to aayam/kernel-science-workbench at 4bee503255ea3bc29c9f24785c3df5a0c9ed9332 (range aef55c89..4bee5032). The pre-push hook ran workspace typechecking: 7 successful tasks, 0 failed. No push was made to main; PR #240 remains open and unmerged; no npm package or dist-tag changed. The unrelated .openscience/openscience.jsonc modification and openscience-starters/ directory remain uncommitted.

@aayambansal

Copy link
Copy Markdown
Member Author

Pre-push repair update — DIST-002 native npm lifecycle independence

Outgoing commits:

  • 4405d9ee — wrapper/native install implementation and regressions
  • dde98ec3 — canonical-plan verification record

What changed:

  • Native package resolution is authoritative at wrapper launch and no longer depends on lifecycle hooks.
  • postinstall is advisory (|| exit 0).
  • The wrapper no longer deletes ~/.openscience manifests, locks, modules, or attributes.
  • Missing native packages no longer fall through to unrelated Homebrew, /usr/local, or legacy-home installations; the error names the expected scoped package.
  • A canonical 11-target table now drives the build and a real npm tarball selection matrix for macOS arm64/x64, Linux x64 glibc/musl, Linux arm64 glibc/musl, and Windows x64.

Exact verification:

  • Focused wrapper/manifest/matrix regressions: 10 passed, 0 failed.
  • Release installation suite: 23 passed, 0 failed, 80 assertions across 12 files.
  • Full backend suite: 1,629 passed, 1 skipped, 0 failed, 4,509 assertions across 183 files (74.18 s).
  • Workspace typecheck: 7/7 packages passed.
  • Production web/native build: 2,467 modules, 484 embedded web entries, Darwin arm64 compile passed; exact local version 2.0.2-test.local.202607311451.
  • Fresh isolated local-tarball installs passed with lifecycle scripts disabled, npm default policy, and explicit allowlisting. Wrapper package, native package, CLI, launcher, health, and embedded web metadata agreed on the version; normal-home sentinels survived; uninstall preserved assigned config/data roots.
  • Registry was forced to 127.0.0.1:9 during local package validation; no external package or token was used.
  • Two preliminary manual checks were discarded rather than counted: one accidentally narrowed PATH below npm/node, and one used npm ls against local absolute file dependencies, which npm reports as invalid despite a runnable install. The three corrected fresh-install runs above are the acceptance evidence.

Release state:

  • No npm version was published. No dist-tag was moved. latest was not read or changed.
  • The protected .openscience/openscience.jsonc and openscience-starters/ remain uncommitted.

Remaining Phase 0 blockers: exact published @test install/tag resolution, cross-host native execution (selection is covered; execution is only verified on Darwin arm64), redacted support bundle, and browser first-load console verification. Next I will install the exact test package with isolated prefix/config/data roots and browser-drive model setup, Atlas-optional flows, and UI/console/network behavior.

@aayambansal

Copy link
Copy Markdown
Member Author

Post-push confirmation: 4405d9ee..dde98ec3 is now on aayam/kernel-science-workbench. The push hook reran workspace typechecking: 7/7 packages passed. No npm package or dist-tag was changed.

@aayambansal

Copy link
Copy Markdown
Member Author

Pre-push update — DIST-004 packaged macOS folder-access warning repair

Commits ready to push:

  • 2fc12006fix(ui): make folder access warning truthful
  • 806a8c95docs(plan): record packaged folder access repair

What changed:

  • Shared CLI/server probe now classifies only EACCES and EPERM as protected-folder denials; missing/empty Desktop, unrelated errors, and non-macOS hosts fail quiet.
  • Removed automatic System Settings launch, raw filesystem errors, and the hard-coded /opt/homebrew/bin/openscience instruction.
  • Corrected the permission principal to the terminal/desktop app that launched OpenScience, with which openscience only for direct binary launches.
  • Replaced the acronym-only FDA chip and oversized modal with a compact responsive Folder access recovery panel, numbered remediation, explicit settings link, focus states, and reduced-motion behavior.
  • Updated the canonical repair plan with the public test reproduction and final packaged verification.

Exact validation:

  • Focused backend regression: 4 passed, 0 failed.
  • Full backend: 1,633 passed, 1 skipped, 0 failed across 184 files (4,517 assertions).
  • Full frontend: 396 passed, 12 skipped, 0 failed across 78 files (2,362 assertions).
  • Backend typecheck: passed (tsgo --noEmit).
  • Frontend typecheck: passed (tsgo -b).
  • Prettier check and git diff --check: passed.
  • Production frontend/native build: passed (2,468 frontend modules; 484 embedded web assets; darwin-arm64 native binary).
  • JavaScript SDK regeneration: passed; generated SDK remained unchanged.

Packaged behavior:

  • Built and installed local npm test package 2.0.2-test.local.202607311515 into fresh isolated binary/config/data/cache/state/npm-config/npm-cache/home roots.
  • openscience --version and synsci --version both reported 2.0.2-test.local.202607311515.
  • Fresh browser history with no ~/Desktop: warning stayed absent after project loading.
  • Fresh browser history with an actual unreadable ~/Desktop: Folder access appeared; the compact dialog stayed open after a denied Recheck, exposed no raw error or assumed install path, and opened no settings tab automatically.

Release status / remaining blocker:

  • No npm package was published and no dist-tag was moved.
  • Registry authentication is unavailable in this environment, so the public test tag remains 2.0.2-test.42.1; exact published-test-build validation remains open.
  • Next after this coherent slice: resume the plan’s remaining critical issues and continue the packaged browser audit of setup/models/Atlas surfaces.

@aayambansal

Copy link
Copy Markdown
Member Author

Post-push verification — DIST-004

Pushed 2fc12006 and 806a8c95 to aayam/kernel-science-workbench; remote branch tip now exactly matches 806a8c9581b5024b567d9cb93513a7fa23ab8b2d.

Push hook result: 7/7 typecheck tasks passed. Both outgoing commits retain exact author and committer Aayam Bansal <aayambansal@gmail.com> and contain no attribution trailers.

The protected unrelated .openscience/openscience.jsonc modification and openscience-starters/ directory remain unstaged and were not pushed. No npm package was published, no test tag was moved, and no production/latest action was taken.

DIST-004 is complete in source and local packaged-browser validation. Public test-package validation remains blocked only by unavailable npm registry authentication; public test remains 2.0.2-test.42.1.

Squash the PR history so GitHub can rebase the final, already-verified tree.
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.

2 participants