Skip to content

fix(jupyter): prepare writable notebook directories before start - #4968

Closed
tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-jupyter-workspace-permissions-20260914
Closed

tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-jupyter-workspace-permissions-20260914

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Ready for independent review (2026-09-15). Candidate e2385251248b15a5fa82600715e15f95c4f39d0a has a successful GitHub check rollup and no base-branch conflict at this review snapshot. This supersedes earlier draft-status wording only. All validation gaps, migration requirements, live gates and independent human review requirements below remain in force; this is not a merge-ready approval.

Declare Jupyter's shipped container UID so the existing host-agent start lifecycle prepares both persistent notebook directories for the process that writes them.

Why this matters

On a root-operated Linux/WSL install, ODS creates data/jupyter/workspace and data/jupyter/notebooks as root. The image runs as UID 1000, so the server can start while saving a notebook returns HTTP 403. The missing manifest UID prevents ODS's existing ownership preparation from running. This change preserves the image's non-root user and repairs the two directory owners before Compose starts.

Overlap check

Searched open/closed PRs for Jupyter, notebook, storage/ownership and authentication terms, plus changed manifest paths. #1049 covers command argument splitting, #529/#567/#716 token provisioning, #659 health tooling, and #1030 supplies the generic host-agent preparation used here. None declares the Jupyter image UID. No host-agent production logic changes are needed.

Regression and validation

  • pytest tests/test_jupyter_storage.py: two cases fail on baseline and pass after the manifest change. They execute the production start lifecycle using the actual shipped manifest and Compose fragment; fresh/existing directories must be prepared before Compose, with existing notebook bytes preserved.
  • Focused host-agent preparation/ownership suites: 12 pass.
  • Full Dashboard API suite: 2851 passed, 1 skipped, 2 warnings.
  • Exact shipped tag jupyter/scipy-notebook:python-3.11, resolved digest sha256:fca4bcc9cbd49d9a15e0e4df6c666adf17776c950da9fa94a4f0a045d5c4ad33: image metadata confirms USER 1000. Real authenticated Jupyter Contents API returns 403 on a baseline root-owned mount; after the production preparation helper runs with the corrected manifest, both mounts accept notebook PUTs (201) and GETs (200). Both notebooks remain readable after container recreation. Fixture containers/directories cleaned.
  • Scoped pre-commit and git diff --check: pass.
  • make gate: reproduces the baseline root/WSL no-sudo fixture failure; not claimed green.

Compatibility and limits

Linux rootful/WSL directory preparation is the affected path. This does not recursively chown existing notebook files, grant sudo inside Jupyter, or change notebook data. README explains re-enabling from Extensions, direct Compose preparation, imported-file permissions and custom/rootless UID mappings. Native Windows/macOS, full browser interaction and the complete ODS install/reinstall lifecycle were not exercised. Rollback can remove the metadata without moving stored notebooks; review any custom UID override before doing so.

Final candidate e2385251248b15a5fa82600715e15f95c4f39d0a: 32 successful CI checks, 4 conditionally skipped; no pending or failed checks.

Exact-SHA repeat 11-sha-live passed in 118.72 seconds on Linux amd64 at this candidate using the recorded image digest. The baseline notebook write returns 403; ODS ownership preparation permits writes to both notebook mounts, and both notebooks retain metadata after recreation. Fixture cleaned.

Batch integration receipt

This is one of 30 independently branched public-beta PRs. The published synthetic integration head is 61f4c6fccc81bea697f4941683fefb5089ba77f4, built from baseline d49ad4bbc760be319de7f4c9b9a93b1f18fe3922 in this reproducible order:

#4946 → #4948 → #4951 → #4954 → #4972 → #4960 → #4961 → #4957 → #4964 → #4967 → #4968 → #4971 → #4975 → #4976 → #4984 → #4982 → #4990 → #4988 → #4989 → #4997 → #5003 → #5006 → #5007 → #5009 → #5012 → #5011 → #5013 → #5014 → #5020 → #5021

Reconciliation preserved all 146 files owned by a single PR byte-for-byte against their exact candidate heads. The eight shared paths preserve both CLI STT/TTS commands and help, every added Makefile test, both environment schema additions and all Extensions UI behavior. LanguageTool and Kroki both remain headless API entries. Canonical regeneration yields 76 catalog entries and 47 library manifests; all README rows are retained. Shared-file changes need these additive resolutions when merged independently.

Combined validation: 2,852 API tests passed / 1 skipped; 1,082 UI tests passed; 47 manifests passed; all 12 added Makefile commands passed; 12 catalog boundary tests passed / 12 opt-in runtime tests skipped in this combined run. Individual exact-image results remain documented above. UI lint/build, scoped secret hooks, diff checks, four platform smoke tests and installer simulation passed. Compose plans for NVIDIA/AMD/Apple each contain 20 services and no duplicate published bindings across the core plus 12 new recipes; this is static plan evidence, not simultaneous startup or GPU inference.

The first unrestricted UI run timed out in two tests under concurrent load; the complete rerun used --maxWorkers=2 with unchanged assertions and timeouts and passed. ESLint reports zero errors and 603 warnings, including the existing JSX usage-detection pattern. Full local make gate still fails the no-sudo Docker baseline covered by #3158. BATS records 416 passed / 5 failed on this root/WSL host (platform detection, root preflight and a 15 GiB versus 20 GiB free-space expectation). Neither full local gate nor BATS is described as green.

This integration receipt supplements each PR's own regression and does not waive its independent review, live hardware/browser/upgrade gates or rollback requirements. The PRs remain drafts; none was merged upstream.

This was referenced Sep 14, 2026
@tang-vu
tang-vu marked this pull request as ready for review September 15, 2026 01:32
@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

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