fix(save): keep the matching lists portable domain knowledge - #83
Merged
Merged
Conversation
The lists added in #79 travel inside the bundle, and the guidance in #80 told the model to fill them with "commands, hosts, people". Hostnames and people mean nothing on anyone else's machine, and asking for people contradicts the save command's own rule against writing unnecessary personal information. A matching list is the easiest place for a context to quietly stop being shareable: an absolute path looks like a usefully rare term while it is written, and is worthless or revealing the moment the bundle is handed over. The hosts had also drifted apart — three asked for hosts and people, two asked for neither — so the same work saved from different hosts produced different bundles. One wording everywhere now, asking for names that belong to the subject: services, components, repositories, ticket ids and prefixes, error strings, product and system names. Each document states that the lists travel and must stay free of absolute paths, home directories, usernames, personal names and email addresses. If the work genuinely is about a particular environment, the profile is where that belongs and is untouched. What changes is that the matching index is not. And a filter, so none of this rests on prose: entries carrying a drive letter path, a UNC path, ~/, /home/, /Users/, /root/, or an email address are dropped from both lists at save time. Ordinary domain terms that merely look technical are kept, which the tests pin.
Merged
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.
A context is domain knowledge meant to be handed to a teammate intact. #80 put a hole in that, and this closes it.
What was wrong
The matching lists added in #79 travel inside the bundle. The guidance in #80 told the model to fill
routingEntitieswith "services, repos, ticket ids, error strings, commands, hosts, people".Hostnames and people are exactly the things that mean nothing on someone else's machine — and "people" contradicts the save command's own standing rule against writing unnecessary personal information. A matching list is the easiest place for a bundle to quietly stop being portable: an absolute path looks like a usefully rare term while it is being written, and is worthless or revealing the moment the context is shared.
Two smaller defects alongside it:
The fix
One wording on every host, asking for names that belong to the subject: services, components, repositories, ticket ids and prefixes, error strings, product and system names. No hosts. No people.
An explicit portability rule in each document: these lists travel with the context, so no absolute paths, home directories, usernames, personal names, or email addresses, and nothing whose meaning depends on this machine or this person.
The escape hatch stays where it belongs. If the work genuinely is about a particular environment, the profile says so — that is what the profile is for. What changes is that the matching index is not where machine detail goes.
A mechanical filter, so this does not rest on prose. Entries containing a drive letter path, a UNC path,
~/,/home/,/Users/,/root/, or an email address are dropped from both lists at save time. It applies to the lists only; the profile and knowledge folder are untouched, and being unable to search for a context by someone's home directory costs nothing worth having.Tests
Machine paths in all five shapes are dropped, email addresses are dropped, the rule applies to questions as well as entities — and, the one that keeps the filter honest, ordinary domain terms that merely look technical are kept:
src/core/routing.mjs,default_pool_size,billing-postgres:5432,INC-1001,user-service.The cross-host document sweep now also asserts every host states the portability rule and that none of them asks for hostnames or people again.
Diff coverage: 22 changed lines, 0 uncovered. Full suite 437 passing.