Repository navigation
Conversation
`engram memorylake config` still printed
actor: (unset — defaults to this machine's hostname)
which stopped being true in v0.7.0: the actor now resolves from cfg.Actor, then
from the API key's owner via /defaults/my-actor, and only then from the
hostname. DOCS.md was updated for that; this string was missed, so the docs and
the command disagreed about the same thing.
The wording matters beyond accuracy. "Defaults to hostname" reads as "set an
actor or your sessions will not be attributed to you" — precisely the manual
step v0.7.0 removed, and precisely the wrong conclusion someone reaching for
this command is trying to settle.
It keeps describing the resolution rather than performing it: this command is a
local read of where configuration comes from, and resolving the actor for real
would put a MemoryLake round trip behind it, making it slow or failing when
offline. Live checks belong in `engram doctor`.
cmdMemorylakeConfig had no test at all, which is why the drift went unnoticed
through a release. Both branches are covered now — unset describes the real
order, and a configured actor prints verbatim with no commentary.
Closes #24
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.
问题
engram memorylake config在 actor 未设置时仍打印:这句话自 v0.7.0(#22 / PR #23)起就不成立了。真实解析是三级:
cfg.Actor→/defaults/my-actor(API key 所属用户)→ 机器名。机器名是最后兜底,不是默认值。DOCS.md里两处相关说明在 PR #23 中已更新,唯独漏了这个 CLI 字符串 —— 于是文档和命令行对同一件事各说各话。措辞本身也有实际后果:"defaults to hostname" 读起来就是"不配 actor 你的会话就不会归到自己名下",而这恰恰是 v0.7.0 已经取消的手工步骤,也恰恰是来跑这条命令的人想弄清楚的问题。
改动
修复后的输出:
仍然只是描述解析顺序,而不去真的解析。 这条命令是"配置从哪来"的本地读取;真去解析 actor 就得发一次 MemoryLake 往返,让它在离线时变慢或失败。实时探测属于
engram doctor,代码里也留了注释说明这个取舍。测试
cmdMemorylakeConfig此前完全没有测试(grep cmdMemorylakeConfig在*_test.go里零命中),这正是文案漂移能跨过一整个发布没被发现的原因。两个分支都补上了:TestCmdMemorylakeConfig_UnsetActorDescribesRealResolutionTestCmdMemorylakeConfig_SetActorIsShownVerbatim先红后绿。
go test ./...剩余 8 个失败与git stashbaseline 逐条相同(cmd/engram2 个、plugin5 个 + 1 个子用例),与本 PR 无关。Closes #24