Skip to content

fix(fs): suppress data-first capability dirs on file-first workspaces#51

Merged
mfreed merged 1 commit into
mainfrom
fix/no-data-first-caps-on-file-first
May 29, 2026
Merged

fix(fs): suppress data-first capability dirs on file-first workspaces#51
mfreed merged 1 commit into
mainfrom
fix/no-data-first-caps-on-file-first

Conversation

@mfreed
Copy link
Copy Markdown
Member

@mfreed mfreed commented May 29, 2026

File-first workspaces present markdown/plaintext files. Exposing .by/, .filter/, .order/, .export/, .columns/, .first/, .last/, .sample/, .indexes/, .modify/, .delete/, .import/ at workspace root or in subdirs leaks the backing table's row/column abstraction (including internal columns like parent_id, filetype, encoding) into a surface that should look like a directory of files. This was an emergent side effect of the data-first pipeline machinery being reused for synth views; no spec or ADR endorses workspace-level data-first access.

Suppress at the parser layer. (*Operations).parsePath is the single chokepoint every production entry point (Stat, ReadDir, Read, Write, Readlink, Mkdir, etc.) goes through. After resolveSchema, the new rejectDataFirstCapOnSynthWorkspace helper detects blocked path shapes, confirms via the existing synth-view cache that the target is in fact a synth view (regular data-first tables in the user schema are unaffected), and returns ErrInvalidPath with a hint pointing at .tables// for callers who need the data-first surface.

File-first control surfaces (.info/, .history/, .log/, .savepoint/, .undo/, .format/) remain accessible. .log/ and .savepoint/ redirect the FSContext schema to tigerfs, so the gate (which only fires on the user schema) correctly leaves .log/.by/type/ etc. working.

Existing .tables//.by/ etc. access continues to work unchanged: that route uses Schema=tigerfs from parse time, which the gate fast-bypasses.

No DB changes, no migration. One helper + one call site + a doc comment on pure ParsePath pointing future contributors at the parser- aware wrapper for policy enforcement.

File-first workspaces present markdown/plaintext files. Exposing .by/,
.filter/, .order/, .export/, .columns/, .first/, .last/, .sample/,
.indexes/, .modify/, .delete/, .import/ at workspace root or in
subdirs leaks the backing table's row/column abstraction (including
internal columns like parent_id, filetype, encoding) into a surface
that should look like a directory of files. This was an emergent side
effect of the data-first pipeline machinery being reused for synth
views; no spec or ADR endorses workspace-level data-first access.

Suppress at the parser layer. (*Operations).parsePath is the single
chokepoint every production entry point (Stat, ReadDir, Read, Write,
Readlink, Mkdir, etc.) goes through. After resolveSchema, the new
rejectDataFirstCapOnSynthWorkspace helper detects blocked path shapes,
confirms via the existing synth-view cache that the target is in fact
a synth view (regular data-first tables in the user schema are
unaffected), and returns ErrInvalidPath with a hint pointing at
.tables/<workspace>/ for callers who need the data-first surface.

File-first control surfaces (.info/, .history/, .log/, .savepoint/,
.undo/, .format/) remain accessible. .log/ and .savepoint/ redirect
the FSContext schema to tigerfs, so the gate (which only fires on the
user schema) correctly leaves .log/.by/type/ etc. working.

Existing .tables/<workspace>/.by/ etc. access continues to work
unchanged: that route uses Schema=tigerfs from parse time, which the
gate fast-bypasses.

No DB changes, no migration. One helper + one call site + a doc
comment on pure ParsePath pointing future contributors at the parser-
aware wrapper for policy enforcement.
@mfreed mfreed merged commit 9d9086b into main May 29, 2026
3 checks passed
@mfreed mfreed deleted the fix/no-data-first-caps-on-file-first branch May 31, 2026 04:40
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