Skip to content

fix(agent-views): make committed views reproducible from committed sources - #395

Merged
MCamner merged 3 commits into
mainfrom
fix/agent-views-reproducible
Oct 14, 2026
Merged

MCamner merged 3 commits into
mainfrom
fix/agent-views-reproducible

Conversation

@MCamner

@MCamner MCamner commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Summary

mqobsidian tracks memory/learn/agent/mqobsidian.md as a required front door, but the generator made it impossible to reproduce:

  • it quoted lessons from memory/learn/repos/<system>.md, which is gitignored and exists only in an operator vault;
  • it stamped generated: with the day of the rebuild, so agent-views check reported the view stale the day after every rebuild.

Changes in mq_agent/tools/agent_views.py:

  • A system opts in with agent_view: versioned in the frontmatter of its hot.md or index.md. Its view is built from hot/index only and never cites local lessons.
  • Every view takes generated: from the newest updated: among its sources, falling back to today only when no source has one.
  • Local views keep their lessons.

docs/AGENT_VIEW_CONTRACT.md gains rule 6, "Reproducible when versioned".

The mqobsidian side is in mqobsidian #139 (DEC-007). Merge this one first: its CI step installs mq-agent from main.

Verification

  • tests/test_agent_views_reproducible.py has 7 tests. 4 failed before the change; 2 guard existing local-view behaviour; 1 covers the marker in index.md.
  • Full suite: 2655 passed, 4 skipped. That run was before the index-marker test was added; the agent-views, reproducibility and context-prepare tests all pass afterwards (32 passed). ruff check: clean.
  • Real vault check: a clean copy of the mqobsidian branch and a copy carrying the operator's local memory/learn/repos/mqobsidian.md rebuild byte-identical views (cmp).
  • agent-views check --system mqobsidian reports fresh with this branch. The generator on main reports the same view stale.
  • agent-views check runs without OPENAI_API_KEY, as it must in mqobsidian CI.

🤖 Generated with Claude Code

…urces

mqobsidian commits memory/learn/agent/mqobsidian.md as a front door, but the view quoted gitignored memory/learn/repos lessons and stamped the rebuild day as generated. An operator vault and a clean clone rebuilt it differently, and agent-views check called it stale the day after every rebuild.

A system now opts in with agent_view: versioned in hot.md or index.md. Its view is built from hot/index only. Every view dates itself from the newest source updated: date, falling back to today only when no source has one. Local views keep their lessons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MCamner
MCamner merged commit 4a3ca27 into main Oct 14, 2026
8 checks passed
@MCamner
MCamner deleted the fix/agent-views-reproducible branch October 14, 2026 02:48
MCamner added a commit that referenced this pull request Oct 14, 2026
Controlled activation proof and evidence integrity. Bumps VERSION, pyproject, uv.lock, repo contract, README and Pages badges, README status and the ROADMAP header. The changelog entry gains two items that had none: Canary v2 execution correlation (#390) and reproducible agent views (#395).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant