Conversation
PR-C shipped the OVERRIDE_FORMATS matrix and the _PR_C_ACTIVE_TYPES gate but deferred the actual application call sites in generate_all_agents / generate_all_commands. Surfacing as a separate prep PR before PR-D removes the gate. No behavior change while the gate restricts resolve() to skills. - agents.py: per-vendor override resolve + atomic_write_bytes in generate_all_agents, mirroring the skills.py:213-220 pattern - commands.py: same pattern in generate_all_commands - tests pin "inactive under gate" at the fan-out level so the one-line gate flip in PR-D is a verifiable behavior diff (resolve-level pins already exist as test_resolve_skips_*_in_pr_c) Co-Authored-By: Claude <[email protected]>
Per self-review on PR #627: - Add positive assertion (canonical body marker present) in test_agents_fanout_does_not_apply_override_under_gate and test_commands_fanout_does_not_apply_override_under_gate. Closes the false-pass path where a generator failure writing garbage could be mistaken for gate-correct behavior. PR-D's invert pair becomes a clean symmetric flip (marker disappears, ``!=`` flips to ``==``). - Inline comment at the two new override application sites referencing PR-D' (carry-forward #1) so future readers do not independently rediscover the canonical→override race window and "fix" it. The note intentionally points at skills.py:213-220 as the precedent. Co-Authored-By: Claude <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
PR-C shipped the
OVERRIDE_FORMATSmatrix and the_PR_C_ACTIVE_TYPESgatebut deferred the actual override application call sites in
generate_all_agents/generate_all_commands. Without this prep, simplyremoving the gate in PR-D would activate
_override.resolve()foragents/commands but produce no observable behavior change — the resolver's
return value would never be applied to the runtime file.
This PR adds the application call sites as dead code under the PR-C
gate:
_PR_C_ACTIVE_TYPES = frozenset({"skills"})keepsresolve()returning
Nonefor agents/commands, so the new code paths are exercisedonly by the new tests. PR-D removes the gate and the application paths
become live.
Mirrors the skills fan-out pattern at
skills.py:213-220line-by-line.Changes
context/agents.py: per-vendor_override.resolve+atomic_write_bytesin
generate_all_agentsafteratomic_write_text(out_path, content)context/commands.py: same pattern ingenerate_all_commandstests/test_context_override.py:test_agents_fanout_does_not_apply_override_under_gatetest_commands_fanout_does_not_apply_override_under_gateThese pin "fan-out application is inactive while gate is on", complementing
the existing resolve-level pins (
test_resolve_skips_agents_in_pr_c,test_resolve_skips_commands_in_pr_c). PR-D inverts both pairs together.Series context
ADR-0008 wiki layer series:
mm context {update, status, install --all, migrate}mm wiki <type> {diff, edit, lint}Test plan
uv run ruff check packages/memtomem/src packages/memtomem/tests— cleanuv run ruff format --check packages/memtomem/src packages/memtomem/tests— cleanuv run pytest packages/memtomem/tests/test_context_override.py -v— 13 passed (incl. 2 new)uv run pytest packages/memtomem/tests/ -m "not ollama"— 3449 passed, no regressions🤖 Generated with Claude Code