Files
SplitBit-Emulator/NOTES.md
T
Anachronaut 634650cab9 The path limits are settled: leave them, and say what they are
Measured rather than adjusted. The longest path on a full install is 21
characters against a native cap of about 117, so neither that nor
SplitDisk's 512 binds anything, and both can be raised if that ever
changes. Looking for the evidence turned up the limit that did bind - the
prompt's 127 bytes, fixed in the commit before this one.
2026-08-25 23:35:40 -04:00

31 lines
1.5 KiB
Markdown

# Delete me after these things are fixed
Temporary notes from the SBFS v2 and CosmOS review, in priority order.
## Bound the number of directory entries
The parent field is 16 bits and stores `descriptor index + 1`, with zero reserved for the
root. Descriptor index 65535 therefore cannot be represented as a parent because adding
one wraps to zero. SplitDisk currently accepts directory sizes large enough to exceed the
representable parent domain.
Define and validate a maximum directory-block/entry count such that every directory entry
can be named as a parent. Apply the check while formatting and mounting/reading malformed
images in both implementations.
## Design strengths worth preserving
- Parent-as-index-plus-one makes every version one entry a valid root child without
conversion.
- Directories consume one descriptor and no data blocks, leaving the descriptor array as
the complete allocation map.
- Files remain contiguous and the block allocator remains ignorant of hierarchy.
- Path resolution below the service boundary gave existing applications directories
without changing their interfaces.
- The current directory is a two-byte identity rather than a stored string, and the shell
restores it after applications run.
- The independent host/native implementations and byte-identical disk agreement tests are
unusually strong validation of the written format.
- `osFileStart`/`osFileWrite`/`osFileFetch`/`osFileDone` provide the bounded-memory output
abstraction needed by assemblers, compilers, linkers, and future sequential pipelines.