Skip to content

Add atomic wiki page patching - #57

Merged
Changyong Gong (chagong) merged 1 commit into
mainfrom
chagong-issuelens-telemetry-errors
Oct 19, 2026
Merged

Changyong Gong (chagong) merged 1 commit into
mainfrom
chagong-issuelens-telemetry-errors

Conversation

@chagong

Copy link
Copy Markdown
Collaborator

Summary

  • add patch_wiki_pages for bounded exact-match updates to existing wiki pages without model-generated whole-page replacements
  • require the pinned page blob SHA, exact-once non-overlapping anchors, the configured wiki destination precondition, and the existing exact-base publication lease
  • preserve untouched UTF-8 bytes and existing one-attempt atomic publication, authorization, privacy, and size safeguards
  • wire the tool only into the team-memory writer, structured outcomes, telemetry, prompts, policy, and documentation
  • teach team-memory to prefer exact patches instead of returning needs-review solely because an existing page is large

Validation

  • 240 standalone MCP tests passed
  • 404 runnable application tests passed
  • Python compilation passed
  • git diff --check passed

The unfiltered Windows application suite remains locally blocked only by missing jq in the executable workflow tests and an unrelated Windows packaging-test harness limitation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

🟢 Approval recommended

No blocking issues remain; bounded patch validation reuses existing authorization and atomic publication safeguards.

No open issues 🎉

What changed in this PR

Adds exact-match wiki page patching so IssueLens can update existing team memory without regenerating whole pages.

Changes:

  • Validates pinned page SHAs and unique, non-overlapping replacements before atomic publication.
  • Exposes patching only to the team-memory writer, retaining existing authorization and publication safeguards.
  • Updates telemetry, tests, prompts, policy, and documentation.
File Description
tests/​test_telemetry.py Tests patch destination attribution.
tests/​test_team_memory_instructions.py Verifies writer access and reader restrictions.
tests/​test_mcp_tool_documentation.py Includes patching among documented writes.
telemetry.py Tracks patch operations as wiki writes.
skills/​team-memory/​SKILL.md Explicitly prohibits reader patching.
skills/​issuelens-config/​SKILL.md Restricts patching to authorized maintenance.
main.py Enables patching for the team-memory writer.
github_app_mcp/​tests/​test_wiki.py Tests patch preservation, conflicts, and limits.
github_app_mcp/​tests/​test_wiki_transport.py Adds a patch test helper.
github_app_mcp/​tests/​test_wiki_client.py Tests patch authentication and policy enforcement.
github_app_mcp/​tests/​test_stdio.py Updates writer discovery expectations.
github_app_mcp/​tests/​test_server.py Tests patch schema, routing, and access gates.
github_app_mcp/​src/​issuelens_github_mcp/​wiki.py Implements bounded exact replacements and atomic publication.
github_app_mcp/​src/​issuelens_github_mcp/​server.py Exposes the writer-only patch tool.
github_app_mcp/​src/​issuelens_github_mcp/​outcomes.py Classifies patching as a write operation.
github_app_mcp/​src/​issuelens_github_mcp/​github.py Shares authorization between patch and full-page writes.
github_app_mcp/​README.md Documents patch usage and limits.
examples/​team-memory.md Demonstrates patch-first maintenance.
docs/​guide.md Explains exact-patch workflows.
agents/​team-memory.md Prefers patches for suitable existing pages.
agents/​issuelens.md Recognizes authorized patch maintenance.
.github/​issuelens/​team-memory.md Updates repository maintenance policy.
.github/​copilot-instructions.md Documents the additional writer capability.

Review effort: Balanced

@chagong
Changyong Gong (chagong) merged commit 9b82a76 into main Oct 19, 2026
8 checks passed
@chagong
Changyong Gong (chagong) deleted the chagong-issuelens-telemetry-errors branch October 19, 2026 05:56
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.

2 participants