Conversation
The URL segment, the SDK service and the generated types all say memory. The provider directory and its package said mem, so the domain carried two names and the search that checks a domain reaches every layer missed one of them. The rename is not mechanical, because gopsutil's package is also called mem and two of our files import both. Our package is renamed and gopsutil's references are left alone; the two files that import both already alias gopsutil as sysMem, so nothing is ambiguous. Identifiers, package declarations, test package names and mock imports go with it. memFs, MemBytes, MemPercent and memInfo stay: the first is the in-memory filesystem used in tests, the next two belong to the process domain, and the last holds a gopsutil value. Three stale doc comments turned up on the way. host, disk and load each said their Debian implementation "implements the Mem interface", copied from this package and never corrected. They name their own interface now. Refs #566 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c
Collaborator
Author
|
Closing unmerged. |
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.
First of the renames from #566, following the rule merged as osapi-io/specs#242. Chosen first because it is the abbreviation case, with no tool name involved.
The URL segment, the SDK service and the generated types all say
memory. The provider directory and its package saidmem, so the domain carried two names and the cross-layer search that checks a domain reaches every layer missed one of them.Not mechanical, because gopsutil is also called mem
Two files import both. They already alias gopsutil as
sysMem, so a baremem.always meant ours and nothing was ambiguous. Our package is renamed; gopsutil's references are untouched.I did get this wrong once mid-change, rewriting
mem.VirtualMemoryStattomemory.VirtualMemoryStatinsidedarwin.goanddebian.gowhere it was gopsutil's. The build caught it.What moved, and what deliberately did not
Renamed: the directory, the package declaration including
package mem_test, the import paths includingnode/mem/mocks, and the identifiersmemProviderandmemMocks.Kept:
memFsis the in-memory filesystem used across the test suite.MemBytesandMemPercentbelong to the process domain, where they are a process's resident memory.memInfois a local holding a gopsutil value. None of them is this domain.The CLI's
MEMcolumn header stays too; an abbreviation in a table of fixed-width columns is doing a different job.Three stale doc comments turned up
Copied from this package and never corrected. They name their own interface now. That is the rename earning its keep: three providers claimed to implement an interface they have nothing to do with, and nothing would have found it.
Checks
go build ./internal/... ./cmd/...clean.internal/provider/node/memoryandinternal/agent/...pass.Next
node/apttonode/package, thenscheduled/crontoscheduleandcontainer/dockertocontainer. Those two are restructures rather than renames, since the concept becomes the directory and the tool becomes an implementation file inside it, the wayntpalready holds chrony.🤖 Generated with Claude Code
https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c