You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Memory: MemoryTypes.ts hand-copies the relation vocabulary and has fallen behind KnowledgeSchema.ts, so any proposal with a derived-from link is rejected whole #2827
What happens.sanitizeTypedItemForPersistence in LIFEOS/TOOLS/MemorySystem.ts checks each link's type against ALL_RELATED_TYPES (:779) and returns invalid for the whole item on the first unknown type. So a proposal the knowledge schema would accept is thrown away by the memory loop:
The whole idea is lost, not just the link. Today the reviewer prompt also lists only 8 types, so it rarely proposes derived-from, which hides the bug; the next member added to RELATION_VOCAB will hit it the same way, and adding it to the prompt alone would make the loss common.
Suggested fix. Derive every copy from RELATION_VOCAB instead of copying it:
In MemoryTypes.ts, import RELATION_VOCAB and RelationType from ./KnowledgeSchema and re-export them as ALL_RELATED_TYPES and RelatedLinkType, so existing imports keep working.
In MemoryReviewer.ts, build the prompt's list and count from ALL_RELATED_TYPES (${ALL_RELATED_TYPES.length}, ${ALL_RELATED_TYPES.join(", ")}).
Object.freezeRELATION_VOCAB where it is defined: as const is type-level only, and once MemoryTypes aliases the array, a single bad cast could otherwise widen the schema validator itself.
A small test that fails when any of these files carries a hand-typed member list, so the class of drift turns a suite red rather than this one instance.
CompleteGuide.md is model-facing prose, so it cannot import; a check that its stated count and members match RELATION_VOCAB would keep it honest.
We have run this derivation locally since September 2026, and it has held across the 7 → 8 upgrade.
🤖 Harper (AI assistant) responding on behalf of Luo
A correction to suggestion 4 above, from testing it properly. The test we run locally compares the reviewer prompt's list with ALL_RELATED_TYPES. A planted control showed it catches a stale list, such as the 8-member one, but not a hand-typed list that happens to equal today's vocabulary: that passes until the next member is added. So it is a drift check, not a "no hand-typed copy" check, and I overstated it.
If you want the stronger guarantee, a behavioural check holds up better than one that inspects how the source is written. Feed sanitizeTypedItemForPersistence one link of every RELATION_VOCAB member and assert that none is rejected, after first asserting that an unknown type is rejected, so the check cannot pass vacuously. That fails the moment any copy lags, whatever the copy looks like.
For CompleteGuide.md, the check that has held up for us reads the stated "N relationship types" and the table under it, then compares both the count and the member set with RELATION_VOCAB.
Activity
Luo0oo commentedon Nov 16, 2026
Note
🤖 Harper (AI assistant) responding on behalf of Luo
A correction to suggestion 4 above, from testing it properly. The test we run locally compares the reviewer prompt's list with
ALL_RELATED_TYPES. A planted control showed it catches a stale list, such as the 8-member one, but not a hand-typed list that happens to equal today's vocabulary: that passes until the next member is added. So it is a drift check, not a "no hand-typed copy" check, and I overstated it.If you want the stronger guarantee, a behavioural check holds up better than one that inspects how the source is written. Feed
sanitizeTypedItemForPersistenceone link of everyRELATION_VOCABmember and assert that none is rejected, after first asserting that an unknown type is rejected, so the check cannot pass vacuously. That fails the moment any copy lags, whatever the copy looks like.For
CompleteGuide.md, the check that has held up for us reads the stated "N relationship types" and the table under it, then compares both the count and the member set withRELATION_VOCAB.