Skip to content

fix(obsidian): point option 13 at the renderers mqobsidian actually ships - #179

Merged
MCamner merged 2 commits into
mainfrom
fix/obsidian-regenerate-views
Aug 8, 2026
Merged

fix(obsidian): point option 13 at the renderers mqobsidian actually ships#179
MCamner merged 2 commits into
mainfrom
fix/obsidian-regenerate-views

Conversation

@MCamner

@MCamner MCamner commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Problem

Option 13 "Regenerate memory views" looked for $MQ_OBSIDIAN_DIR/scripts/regenerate-memory-views.py. mqobsidian never shipped that file, so the option had only ever printed a placeholder — "not implemented yet / Expected owner: mq-agent orchestration".

The renderers do exist. They live next to the data they render:

  • memory/commands/build_views.pymemory/commands/views/ (6 views + recommended.json)
  • memory/workflows/build_workflow_views.pymemory/workflows/views/ (4 views)

Both sit outside mqobsidian/scripts/ deliberately — that directory is the export surface other repos consume, and these render nothing anyone else reads. CURATION.md states the same boundary for the command library.

Change

The option runs every renderer the vault ships, prints which one it is running, and returns the first nonzero status so a broken render is not reported as a success. A vault with neither renderer keeps a placeholder, which now names the producers it looked for instead of a filename that will never exist.

This does not route through mq-agent, unlike learn-writeback. Rendering is not curation: promotion, scoring and aging stay manual passes in mqobsidian, and build_views.py says in its own docstring that it is "NOT mq-agent selection/export".

Verification

New tests/mq-obsidian-regenerate-views-smoke.sh, written before the fix, 6 steps: both renderers run, a missing one is not invented, the placeholder path, a failing renderer surfaces nonzero, the option keeps its command label, and — step 6 — the function runs under zsh.

That last step earned its place immediately. The first implementation used a local named status:

mq_obsidian_regenerate_views:1: read-only variable: status

Fine in bash, fatal in zsh, and the menus run under zsh. Bash-only testing hid it; the step now fails on read-only variable in the output.

Driven for real against the vault:

$ mq_obsidian_regenerate_views
── memory/commands/build_views.py
rendered 6 views + recommended.json from 15 patterns
── memory/workflows/build_workflow_views.py
rendered 4 workflow views from 9 observations (5 distinct sequences, 1 proposal candidates)

git status in the vault afterwards: clean. The renderers are idempotent and the views were already current — which is the outcome that proves it wrote real output rather than that it did nothing.

Full tools/scripts/test-all.sh: all selftest checks passed, shell lint clean across 194 files. The existing placeholder UI smoke is updated to the new text rather than deleted; the test inventory gate required the new file to be registered in tests/manifest.tsv.

🤖 Generated with Claude Code

MCamner and others added 2 commits August 8, 2026 01:49
…hips

Option 13 looked for scripts/regenerate-memory-views.py, a file mqobsidian
never shipped, so "Regenerate memory views" had been a placeholder since it
was added. The renderers exist — they sit next to their data as
memory/commands/build_views.py and memory/workflows/build_workflow_views.py,
kept out of scripts/ because that directory is the export surface other
repos consume.

The option now runs every renderer the vault ships and returns nonzero if
one fails, so a broken render is not reported as a successful one. A vault
with neither keeps a placeholder, now naming the producers it looked for.

Rendering is not curation: promotion, scoring and aging stay manual passes
in mqobsidian, which is why this does not route through mq-agent.

The new smoke also runs the function under zsh. That caught a local named
`status`, which is fine in bash and fatal in zsh where $status is read-only
— the menus run under zsh, and testing only under bash hid it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MCamner
MCamner merged commit 08306e3 into main Aug 8, 2026
3 checks passed
@MCamner
MCamner deleted the fix/obsidian-regenerate-views branch August 8, 2026 11:24
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