Skip to content

test(server): lock DirectoryScanner max_depth clipping#10291

Open
Bartok9 wants to merge 2 commits into
marimo-team:mainfrom
Bartok9:top10/test-directory-scanner-max-depth
Open

test(server): lock DirectoryScanner max_depth clipping#10291
Bartok9 wants to merge 2 commits into
marimo-team:mainfrom
Bartok9:top10/test-directory-scanner-max-depth

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This pull request was authored by a coding agent.

AI-assisted; human-reviewed line-by-line. Submitted under Daniel's standing Top10 merge-culture campaign instruction for Bartok9.

Summary

Regression tests for DirectoryScanner's max_depth behavior — the silent clip that drops notebooks nested deeper than the scan limit on the home Workspace tree.

Related: #10064

Motivation

Users opening marimo edit from a broad root (e.g. $HOME) lose deep project notebooks from the Workspace panel with no error. That is the current scanner contract (MAX_DEPTH = 5, subdirs not entered at the limit). These tests pin the contract so a future homepage rework cannot accidentally regress the depth math silently.

What is tested

  1. Notebooks beyond max_depth are omitted (including intermediate folders with no remaining children).
  2. Notebooks whose enclosing folder is still entered at the depth limit remain visible.

Out of scope

No product/UI change (no warning banner yet — maintainers noted a homepage rework). Companion docs PR documents the user-facing limits separately.

Verification

Reproduced the two scenarios against current main scanner logic locally (all assertions green). Test-only diff on tests/_server/test_directory_scanner.py.


Agent-Owner: sera · Platform: hermes · Claim-TTL: 24h

Add regression coverage for the silent depth cut that drops nested
notebooks from the home Workspace tree (see issue 10064).

Signed-off-by: Bartok9 <danielrpike9@gmail.com>
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jul 22, 2026 11:11pm

Request Review

@Bartok9

Bartok9 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Bartok9
Bartok9 marked this pull request as ready for review July 23, 2026 22:51
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