Skip to content

fix(memory): honor legacy vector delete body scope - #1192

Merged
santoshkumarradha merged 2 commits into
Agent-Field:mainfrom
remote-controlled-man:codex/prflow-55f00cdf9161
Nov 13, 2026
Merged

santoshkumarradha merged 2 commits into
Agent-Field:mainfrom
remote-controlled-man:codex/prflow-55f00cdf9161

Conversation

@remote-controlled-man

@remote-controlled-man remote-controlled-man commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #1188. Legacy POST /api/v1/memory/vector/delete requests retained the body key but discarded the body scope, so an explicit actor or session deletion could target the workflow namespace when multiple context headers were present.

Retain the bound body scope before resolving and authorizing the deletion. A nonempty query scope continues to take precedence; omitted/null scope fallback and RESTful path-key deletion retain their existing behavior.

Type of change

  • Bug fix

Test plan

  • HTTP regressions: original handler fails 6 of the 13 new subcases; fixed handler passes all 13, plus existing delete tests. Covers four body scopes with all context headers present, omitted/null scope, empty/conflicting query scope, RESTful controls and authorization before deletion.
  • Updated the existing server route contract for body scope. With authorization enabled, cross-actor deletion is denied without storage access; with authorization disabled it selects the requested actor. Own-actor deletion and explicit query precedence also pass in both modes. The updated contract fails the original handler in both modes.
  • Final-head VITEST_MAX_WORKERS=2 ./scripts/test-all.sh: Go control plane and Go SDK passed; Python SDK 2,989 passed, 4 skipped, 38 deselected; TypeScript SDK 1,394 passed, 1 skipped across 99 files; Web UI 837 passed across 141 files. Upstream-defined exclusions were retained.
  • make fmt tidy: passed, with no module-file changes. Unrelated baseline formatter output was restored to keep this patch focused.

Go checks use an isolated offline Linux Go 1.25.14 environment. Python and Node checks use their native macOS environments. No live model/provider calls are used.

Test coverage

  • I ran tests for the changed surface locally.
  • New code paths are covered by regression tests.
  • The CI Coverage Summary gate passed. Its patch gate reports 3 touched lines in vector_memory.go at 100%; the control-plane surface is 88.2% and the weighted aggregate is 86.12%.

Checklist

  • I have read the contribution and development guides.
  • Commits are signed and follow conventional-commits style.
  • Related work is linked below.

The commit follows conventional-commits style; no commit-signature claim is made.

Related issues / PRs

Fixes #1188. #1189 fixes the independent TypeScript scoped-handle ID issue and explicitly records this legacy handler defect as a separate limitation.

Prepared with Codex assistance and independently reviewed.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 88.20% 87.40% ↑ +0.80 pp 🟡
sdk-go 93.30% 92.00% ↑ +1.30 pp 🟢
sdk-python 94.77% 93.73% ↑ +1.04 pp 🟢
sdk-typescript 92.44% 90.42% ↑ +2.02 pp 🟢
web-ui 84.90% 84.79% ↑ +0.11 pp 🟡
aggregate 86.12% 85.75% ↑ +0.37 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 3 100.00% ✅
sdk-go 0 — ➖ no changes
sdk-python 0 — ➖ no changes
sdk-typescript 0 — ➖ no changes
web-ui 0 — ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

@remote-controlled-man
remote-controlled-man marked this pull request as ready for review November 13, 2026 03:31
Copilot AI balanced review requested due to automatic review settings November 13, 2026 03:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@santoshkumarradha santoshkumarradha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the focused change and its regression coverage. The implementation is scoped, the CLA is signed, and the required checks are green.

@santoshkumarradha
santoshkumarradha added this pull request to the merge queue Nov 13, 2026
Merged via the queue into Agent-Field:main with commit ab60871 Nov 13, 2026
29 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.

bug: legacy vector delete ignores the JSON body scope

3 participants