Repository navigation
v0.11.0 phase A: the docs outside the README stop describing the pre-rename filesystem - #241
Merged
Merged
Conversation
… ways it went stale
Eight documents described the pre-rename filesystem, and four told users an operation fails that
works. docs/architecture/overview.md listed unlink, rmdir, and rename as unimplemented and said rm
returns EROFS; docs-platform/guide/ said mv fails with ENOTSUP "because there is no rename"; the
playground's benchmark script worked around rm by shelling out to `aws s3 rm`. Each was an accurate
description of v0.10.3 being read by users of a version where those operations work. Understating is
friendlier than overstating and still wrong — it sends people to build workarounds for a fixed
problem.
Two mechanical gates, because this has now gone stale twice in the same place:
- No document may state an operation count. Eight files said "roughly 10 of ~40 VFS operations",
each having copied it from the audit that measured it once; six operations landed across three
releases and not one sentence changed. That is the version-constant problem — one number, many
copies, no way for a copy to learn it is wrong — so it gets the same answer. CHANGELOG.md is
exempt with the reason in the code: a released section records what that release did, and
editing its counts to match today would falsify the record.
- The README's "Not implemented" table may not name an operation whose go-fuse interface
internal/fuse asserts. It reads the `_ fs.NodeUnlinker = (*DirectoryNode)(nil)` assertions
rather than the method set, because the assertion is what makes support real: go-fuse probes
each interface with a type assertion and substitutes a default when absent, and for Unlink and
Rmdir that default is success.
A third gate — flag any line pairing an implemented operation with a refusal errno, repo-wide — was
written, measured, and rejected: ten hits, eight of them changelog entries correctly describing past
releases. A gate whose output is 80% false gets deleted.
Both surviving gates were verified by mutation, and one of the mutants survived: a first draft's word
list had ten|twenty|thirty|forty and passed on "sixteen of forty VFS operations". The list is now
written out in full. Reading the whole internal/fuse package rather than attributes.go alone is also
load-bearing — NodeRenamer is asserted in rename.go, next to the code it describes, so a
single-file scan would have missed the operation whose documentation was most wrong.
internal/filesystem/interface.go now says what it is: a design sketch with no importers anywhere in
the tree, whose only implementation is its own test mock. It reads like a capability list —
declaring Rename, Truncate, Chmod, Chown, Link, Symlink, Readlink, four xattr methods, and Statfs —
and internal/vfs's FileType comment already records this interface advertising Symlink and Link with
nothing behind them as what went wrong in v0.10.0.
Closes #162
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #162.
#164 landed
mvand rewrote the README's supported-operations table around it. Eight other documents were still describing v0.10.3, and four of them told users an operation fails that works:docs/architecture/overview.mdunlink,rmdir,renameunimplemented; "rmreturnsEROFS"docs-platform/guide/index.mdmv: there is norename, and it returnsENOTSUP"docs-platform/guide/getting-started.mdmv→ENOTSUPandrm→EROFSdocs-platform/playground/index.mdaws s3 rmbecause "rm returns EROFS on a mount today"Understating is friendlier than overstating and still wrong: it sends people to build workarounds for a problem that is fixed. The other four restated an operation count — "roughly 10 of ~40 VFS operations" — which is the version-constant problem in a different costume.
The two gates
internal/config/docs_posix_test.go, joining the four documentation gates already in that package.No document may state an operation count. Eight files carried the number, each having copied it from the audit that measured it once. Six operations landed across three releases (
Setattr,Statfs,Fsync,Unlink,Rmdir,Rename) and not one sentence changed, because a sentence has no way to learn it is stale. Same answer as the version constant: one authority, and a test that fails when a second appears.CHANGELOG.mdis exempt, and the reason is in the code rather than in an ignore list — a released section is an immutable record of what that release changed, so the count in the v0.10.1 section stays true about v0.10.1 forever. Editing it to match today would falsify the record, which is worse than the staleness the gate prevents.The README's "Not implemented" table may not name an operation whose go-fuse interface
internal/fuseasserts. It reads the_ fs.NodeUnlinker = (*DirectoryNode)(nil)block rather than the method set, because the assertion is what makes support real: go-fuse probes each interface with a type assertion and substitutes a default when it is absent, and forUnlinkandRmdirthat default is success. A method with a drifted signature compiles fine and is silently never called; the assertion is what fails.Three interfaces are deliberately excluded, with the reason on each:
NodeSetattrer(chmod/chown work on files,ENOTSUPon directories per #165),NodeFsyncer(durable on a file, no-op on a directory), and the ones no not-implemented row could plausibly name.What was rejected
A third gate: flag any line pairing an implemented operation with a refusal errno, repo-wide. Written, measured, rejected — ten hits, of which eight are changelog entries correctly describing what a past release did and one is a deliberate note about older builds. A gate whose output is 80% false is a gate someone deletes.
Verification
Both gates verified by mutation, and one mutant survived the first pass: the word list had
ten|twenty|thirty|fortyand passed on "sixteen of forty VFS operations" — exactly the trapversion_test.go's comment describes, where a narrow pattern that passes is indistinguishable from a correct repository. The list is written out in full now, and four phrasings were re-run against it.Reading the whole
internal/fusepackage rather thanattributes.goalone is also load-bearing, proven the same way: excludingrename.gofrom the scan let aRename / move | ENOTSUProw through.NodeRenameris asserted next to the code that implements it, which is the right place for it — and it is the operation whose documentation was most wrong.Also:
internal/filesystem/interface.gonow says what it is (#162's last unmet acceptance criterion). It has no importers anywhere in the tree and its only implementation is its own test mock, while declaringRename,Truncate,Chmod,Chown,Link,Symlink,Readlink, four xattr methods, andStatfs. That is not a hypothetical risk:internal/vfs'sFileTypecomment already records this interface advertisingSymlinkandLinkwith nothing behind them as what went wrong in v0.10.0.