Skip to content

fix: per-workspace mimir config, auto_inject flag, version-less @perseus header#444

Open
tcconnally wants to merge 1 commit into
mainfrom
fix/mimir-config-and-versionless-header
Open

fix: per-workspace mimir config, auto_inject flag, version-less @perseus header#444
tcconnally wants to merge 1 commit into
mainfrom
fix/mimir-config-and-versionless-header

Conversation

@tcconnally

Copy link
Copy Markdown
Collaborator

Resolves the three open issues.

Closes #441 — per-workspace pack.yaml mimir override

load_config only layers global and workspace config.yaml, so a pack manifest's mimir:block was ignored at render time.cmd_rendernow deep-mergespack.yaml mimir: settings over the loaded config (_merge_pack_mimir_config), so a workspace can override context_limit, enabled, auto_inject, etc. per render target. Covers both perseus renderand watch-driven renders (both route throughcmd_render`). Best-effort: a missing/malformed pack never breaks a render.

Closes #442mimir.auto_inject flag

New mimir.auto_inject config key (default true). When false, _mimir_context_inject skips the automatic ## Persistent Memory (Mimir) block, so memories are only included via an explicit @memory/@mimir directive. Also fixes the context_limit: 0 footgun the issue noted: int(mcfg.get("context_limit", 10) or 10) treated 0 as falsy and fell back to 10; 0 now means inject nothing.

Closes #443 — version-less @perseus header

The init/install/quickstart/profile scaffolders embedded @perseus vX.Y.Z, which goes stale after upgrade. They now write a bare @perseus header; nothing to drift, and the rendered output already carries the installed version via wrap_rendered. perseus doctor now treats a version-less header as ok (the recommended form) and reframes the stale-pin warning to suggest dropping the version.

Tests

Added regression coverage: auto_inject=false suppression, 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 v contract. Full suite green (1037 passed, 45 skipped); perseus.py rebuilt.

Fixes #441
Fixes #442
Fixes #443

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant