Skip to content

Add EditTags tool for content-free tag edits#18

Merged
dsghi merged 3 commits intomainfrom
feat/edit-tags-tool
Apr 15, 2026
Merged

Add EditTags tool for content-free tag edits#18
dsghi merged 3 commits intomainfrom
feat/edit-tags-tool

Conversation

@dsghi
Copy link
Copy Markdown
Contributor

@dsghi dsghi commented Apr 15, 2026

Summary

  • New EditTags(key, add?, remove?, project?) MCP tool lets callers add and/or remove tags on a document without re-emitting its content through UpsertDocument.
  • Diff semantics: add and remove are disjoint — a tag in both is rejected; already-present adds are no-ops; absent removes are idempotent; empty-both and no-effective-change cases short-circuit without a write.
  • Logic lives in a new TagEditService (mirrors DocumentEditService shape) with 8 unit tests against a fake store. Full suite: 137/137 passing.
  • Bumps csproj + host.json 1.7.01.9.0 (catches up the drift through the already-released 1.8.0); MCP instructions updated; CHANGELOG, README tools table + workflow section, and seed usage-guide section all updated.
  • The live ref:devbrain-usage document in project default has been upserted to match the new seed.

Test plan

  • dotnet build devbrain.slnx — clean (pre-existing NU1901 vuln warnings on System.Security.Cryptography.Xml are unrelated and still present).
  • dotnet test devbrain.slnx — 137/137 passing, including the 8 new TagEditServiceTests.
  • Post-deploy: invoke EditTags against a real document in a non-default project; verify tags/updatedAt/updatedBy change and content/contentHash are untouched.
  • Post-deploy: verify conflict rejection (same tag in add and remove) returns an error and writes nothing.
  • Post-deploy: verify empty add + empty remove returns "nothing to do" without incrementing updatedAt.

🤖 Generated with Claude Code

dsghi and others added 3 commits April 15, 2026 09:34
Introduces EditTags(key, add?, remove?, project?) so callers can adjust
document tag metadata without re-emitting the whole body through
UpsertDocument. Diff semantics: add-and-remove are disjoint (a tag in
both is rejected); already-present adds are no-ops; absent removes are
idempotent; empty-both and no-effective-change paths short-circuit
without a write.

Tool flow lives in a new TagEditService / ITagEditService / TagEditResult
trio that mirrors DocumentEditService for testability — 8 new unit tests
against a fake store cover the full matrix. Full suite: 137/137 passing.

Bumps csproj + host.json from 1.7.0 to 1.9.0 (catching up the drift
through the 1.8.0 release) and ships a CHANGELOG entry, README row and
workflow section, and seed usage-guide section.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bumps Microsoft.AspNetCore.DataProtection 10.0.0 -> 10.0.6, which
transitively floors System.Security.Cryptography.Xml to 10.0.6 and
clears the CVE-2026-33116 / CVE-2026-26171 DoS advisories published
2026-04-15 (vulnerable <= 10.0.5). No explicit sub-dep pin needed —
the whole .NET 10 servicing line moves together.

Also refreshes the Azure, IdentityModel, and test packages to current:
- Azure.Identity 1.20.0 -> 1.21.0
- Azure.Extensions.AspNetCore.DataProtection.Blobs 1.5.0 -> 1.5.1
- Azure.Extensions.AspNetCore.DataProtection.Keys 1.5.0 -> 1.6.1
- Microsoft.IdentityModel.JsonWebTokens 8.3.0 -> 8.17.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.3.0 -> 8.17.0
- xunit 2.9.2 -> 2.9.3
- Microsoft.Extensions.TimeProvider.Testing 9.3.0 -> 10.5.0

Skipped: Microsoft.ApplicationInsights.WorkerService 2->3, Test.Sdk
17->18, xunit.runner.visualstudio 3.1.5 (v3-only) — all carry breaking
changes worth handling in a dedicated bump.

Build: 0 warnings, 0 errors. Tests: 137/137 passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Microsoft.AspNetCore.DataProtection 10.0.6 has a regression on Linux:
ManagedAuthenticatedEncryptor fails same-process Protect/Unprotect
roundtrips with "The payload was invalid" (MAC validation failure).
Green on Windows, red on Ubuntu CI — UpstreamTokenProtectorTests
.Protect_Unprotect_RoundTripsEnvelopeExactly reproduces it cleanly.

Roll DataProtection back to 10.0.0 (where 1.8.0 shipped green) and
pin System.Security.Cryptography.Xml 10.0.6 directly as a top-level
PackageReference. That patches CVE-2026-33116 + CVE-2026-26171
without pulling in the regressed runtime library. Revisit when 10.0.7+
ships.

Tests: 137/137 passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dsghi dsghi merged commit c48b98c into main Apr 15, 2026
4 checks passed
@dsghi dsghi deleted the feat/edit-tags-tool branch April 15, 2026 19:53
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