fix: per-workspace mimir config, auto_inject flag, version-less @perseus header#444
Open
tcconnally wants to merge 1 commit into
Open
fix: per-workspace mimir config, auto_inject flag, version-less @perseus header#444tcconnally wants to merge 1 commit into
tcconnally wants to merge 1 commit into
Conversation
…erseus header Resolves three filed issues. #441: pack.yaml mimir overrides. load_config only layers global and workspace config.yaml, so a pack manifest's mimir: block was ignored. cmd_render now deep-merges pack.yaml mimir settings over the loaded config, letting a workspace override context_limit/enabled/auto_inject per render target. #442: mimir.auto_inject flag (default true). When false, _mimir_context_inject skips the automatic Persistent Memory block so memories are only added via an explicit @memory/@mimir directive. Also fixes context_limit=0 being ignored: the old `int(... or 10)` treated 0 as falsy and fell back to 10; 0 now means inject nothing. #443: stop embedding a hardcoded @Perseus version in scaffolded context.md. The init/install/quickstart/profile templates now write a version-less @Perseus header, which can't go stale on upgrade (the rendered output already carries the installed version via wrap_rendered). perseus doctor treats a version-less header as ok and reframes the stale-pin warning to suggest dropping the version. Adds regression tests for each: auto_inject suppression, context_limit=0, pack deep-merge, and the doctor version-header cases. Rebuilt perseus.py.
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.
Resolves the three open issues.
Closes #441 — per-workspace pack.yaml mimir override
load_configonly layers global and workspaceconfig.yaml, so a pack manifest'smimir:block was ignored at render time.cmd_rendernow deep-mergespack.yamlmimir:settings over the loaded config (_merge_pack_mimir_config), so a workspace can overridecontext_limit,enabled,auto_inject, etc. per render target. Covers bothperseus renderand watch-driven renders (both route throughcmd_render`). Best-effort: a missing/malformed pack never breaks a render.Closes #442 —
mimir.auto_injectflagNew
mimir.auto_injectconfig key (defaulttrue). Whenfalse,_mimir_context_injectskips the automatic## Persistent Memory (Mimir)block, so memories are only included via an explicit@memory/@mimirdirective. Also fixes thecontext_limit: 0footgun the issue noted:int(mcfg.get("context_limit", 10) or 10)treated0as falsy and fell back to10;0now means inject nothing.Closes #443 — version-less
@perseusheaderThe init/install/quickstart/profile scaffolders embedded
@perseus vX.Y.Z, which goes stale after upgrade. They now write a bare@perseusheader; nothing to drift, and the rendered output already carries the installed version viawrap_rendered.perseus doctornow treats a version-less header asok(the recommended form) and reframes the stale-pin warning to suggest dropping the version.Tests
Added regression coverage:
auto_inject=falsesuppression,context_limit=0, pack deep-merge (including nested dicts and no-op cases), and the four doctor version-header cases (bare ok / matching ok / stale-pin warn / non-header warn), plus template assertions. Updated the two quickstart tests that asserted the old@perseus vcontract. Full suite green (1037 passed, 45 skipped);perseus.pyrebuilt.Fixes #441
Fixes #442
Fixes #443