Skip to content

fix(sections): refuse assistant tree edits once the wiki is published - #64

Merged
Rl0007 merged 1 commit into
mainfrom
fix/lock-published-structure
Oct 6, 2026
Merged

Rl0007 merged 1 commit into
mainfrom
fix/lock-published-structure

Conversation

@Rl0007

@Rl0007 Rl0007 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
  1. After a wiki was published, the assistant could still move, split, merge, create or retag sections, so the published wiki silently went out of date.
  2. The assistant now gets the same "already published" refusal the Wiki tab gives, and makes no change. Unpublished imports work as before.

You can visit an import's Wiki tab after publishing and ask the assistant to move a section to see it.

Fixes #27

Verification
  • Added two tests in test_section_edits: published import blocks all five edits and leaves the tree untouched (red on main: "ValidationError not raised"; green with the fix), and an unpublished import still allows them.
  • Full suite on a devbox: 487 run, 476 passed, 0 failed, 11 skipped (baseline 474 + the 2 new tests).
  • Devbox e2e with the import locked: all five whitelisted APIs return 417 with "This wiki has already been published"; the assistant's tree tools return "Couldn't move section: This wiki has already been published ..." (and the same for retag, create, split, merge). Wiki tab still shows the read-only published tree. After unlocking, move and create work again.
  • No LLM involved; tools were called directly.
  • Code review: approved.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@Rl0007
Rl0007 merged commit 0bd2e44 into main Oct 6, 2026
3 checks passed
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.

Assistant can still change a published wiki's structure, so the published wiki goes stale

1 participant