refactor: delete vestigial surface; demote CloseWrite to optional HalfCloser (candidate #7) - #2
Draft
sigma wants to merge 1 commit into
Draft
refactor: delete vestigial surface; demote CloseWrite to optional HalfCloser (candidate #7)#2sigma wants to merge 1 commit into
sigma wants to merge 1 commit into
Conversation
… CloseWrite to optional HalfCloser Candidate #7 from the architecture review. Applies the deletion test, bounded by the committed public surface (shepherd's pull-list union in-repo use) and verified against shepherd's actual source. - delete streambuf.InputQueue: no in-repo caller; shepherd does not import the streambuf package at all - delete the screen package: no in-repo importer; not on shepherd's pull-list - delete unix/ws Backend.Serve() no-ops: in no interface, zero callers; their 'implements transport.Transport' doc was stale (Serve is not a Transport method, and libp2p/http2 have no such method) - delete vterm.encodeResumeSeq: defined, never called (server only decodes) - inline vterm.newOutputRing into its single caller: its 'so tests can swap a smaller ring' doc was false (the wrapper took no parameter) - demote transport.Stream.CloseWrite() to a separate optional transport.HalfCloser; drop the two ErrUnsupported stubs (websocket, http2 server); backend tests type-assert to HalfCloser - fix streambuf.OutputRing.Write doc: it advertised an io.Copy escape hatch via a WriteBytes method that never existed - fix docs/src/relationship-to-shepherd.md: shepherd imports mosey directly now (not vendored), add api to the pull-list Kept (the review's 'vestigial' premise was wrong -- these are used in-repo): cert.MasterPublicKey, wallet.Address / EncodeBase58 / DecodeBase58 / ParseAddress. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Candidate #7 from the architecture review — delete the vestigial surface.
Governing rule
Applies the deletion test bounded by the committed public surface: the keep-set is shepherd's pull-list ∪ symbols used inside mosey. Anything exported, unused in-repo, and absent from that list is a deletion candidate before v0.1. Verified against shepherd's actual source (not the doc's stated intent): shepherd imports
api, attach, auth, cert, transport, transport/libp2p, vtermdirectly and references none of the deleted symbols; it imports neitherstreambufnorscreen.Changes
streambuf.InputQueue(+ test)streambufscreenpackageBackend.Serve()no-opsvterm.encodeResumeSeqvterm.newOutputRingtransport.Stream.CloseWrite()transport.HalfCloserErrUnsupported; no caller in mosey or shepherdtransport.ErrUnsupportedCloseWritestubs went — its only useOutputRing.Writedocio.Copyescape hatch via aWriteBytesmethod that never existeddocs/src/relationship-to-shepherd.mdapi; framed the list as the committed surfaceCloseWritedemotion:Streamshrinks toio.ReadWriteCloser + RemoteID. A newtransport.HalfCloser { CloseWrite() error }is implemented by unix, libp2p, and the http2 client stream; WebSocket and the http2 server stream simply don't implement it (no moreErrUnsupportedstubs). Backend tests type-assert toHalfCloser.Kept — the review's "vestigial" premise was wrong (these are used in-repo):
cert.MasterPublicKey,wallet.Address/EncodeBase58/DecodeBase58/ParseAddress.Verification
go build ./...,go vet(changed pkgs), andgo test ./...all pass.Docs (delivered separately)
This session ran via
/grill-with-docs; the glossary term (committed surface) and a committed-surface ADR documenting this rule are delivered into the in-flight domain-modeling series (uncommitted WIP:CONTEXT.md,docs/adr/), not in this PR — they depend on that WIP base. The ADR number is assigned when that series is committed (0001–0003 are already taken by concurrent candidate #1/#2/#3 work). This PR is code-only and branches cleanly frommain.🤖 Generated with Claude Code