chore: pre-v1.7.0 audit fixes#65
Merged
Merged
Conversation
…privacy) Five fixes from the pre-release audit (5 parallel review lanes + self-verification). No architectural changes; release stays GO. HIGH — CHANGELOG [Unreleased] self-contradiction: the annotations bullet said destructive "(7)" while the delete_tag_definition entry said "7 → 8". Both ship as the 1.7.0 notes. Fixed the annotations bullet to the full-release end-state (8 destructive, incl. delete_tag_definition; 49/8/31 = 88). MED — glama.json public-registry description said "86 tools" (two bumps stale). → 88. MED — list_party_entries merged-timeline pagination ceiling: the next-page check used `<= 100`, which at exactly the 100-entry merge ceiling promised a page+1 that then came back empty (a top-100-per- party merge reliably orders only the global top ~100). Changed to strict `< 100` so the feed ends honestly at the ceiling, and replaced the vague "approximate" schema caveat with the concrete ~100 ceiling + the per-person list_party_entries workaround for deeper history. Added a ceiling-boundary test (page 4 / perPage 25 → exactly 100 → no phantom nextPage). LOW — confirm-flag.ts doc comment said "gates 7 destructive tools" → 8 (adds delete_tag_definition). LOW (privacy) — replaced the bare party-id `254022621` (used only as a path-redaction example in log.ts/tests/docs, possibly a real tenant id) with an obviously-synthetic `123456789`. Clean across the rest: security (5 surfaces verified), pack hygiene (ships only dist/), 0 vulns, lockfile clean, shebang correct. 538 tests (+1 ceiling test). Bundle 168.47 KB stdio / 196.34 KB http. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
5 tasks
arapov
added a commit
that referenced
this pull request
May 29, 2026
#67) Cherry-picked the genuine bits from codex PR #66, dropping that PR's v1.6.6→v1.7.0 doc rewrites and the wire-trace-v166/v167→v170-* probe renames (iteration markers, not release versions — rejected the same way as #62/#64). Real fixes the audit's docs lane missed: - README.md tool table: Tags row now lists delete_tag_definition (was added to the catalog but not the README table). - src/capsule/cache.ts: header + invalidateByPrefix doc comments now name delete_tag_definition as a third tag-mutating tool that drops the list_tags cache (accurate — the handler does call invalidateByPrefix), and generalize "/tags" → "/<entity>/tags". Test coverage: - tests/cache.test.ts: delete_tag_definition invalidates the cached list_tags response. - tests/entries.test.ts: a merged-timeline window that CROSSES the 100-entry ceiling returns the in-ceiling tail and ends the feed (complements the #65 boundary test with the partial-window case). Plus a sharper PAGINATION CAVEAT wording (distinguishes crossing-window truncation from beyond-ceiling empty) — kept the v1.6.6 provenance. Closes #66 (cherry-picked clean). 538 → 540 tests. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes from the pre-release audit (5 parallel review lanes — security, correctness, API-surface consistency, docs/claims+privacy, release mechanics — each high-severity finding then re-verified against the code). Verdict: GO for v1.7.0; these are the small cleanups, no architectural changes.
CHANGELOG.md[Unreleased]contradicted itself — annotations bullet said destructive (7), delete_tag_definition entry said 7→8. Both ship as the 1.7.0 notes.delete_tag_definition), 49/8/31 = 88glama.jsonpublic-registry description said "86 tools" (2 bumps stale)list_party_entriesmerged-timeline pagination over-promised a phantom next page at the 100-entry merge ceiling<=→<so the feed ends honestly at the ceiling; schema doc now states the concrete ~100 ceiling + per-person workaround instead of vague "approximate"; +1 ceiling-boundary testconfirm-flag.tscomment "gates 7 destructive tools"254022621used as a redaction example (possibly a real tenant id)123456789What the audit found clean (no action)
delete_tag_definition(double confirm-gate, enum entity, positiveId tagId, no path traversal),includeLinkedPersonsfan-out (concurrency-capped, no SSRF, validated ids), landing page (static, no interpolation), annotations (no destructive tool misclassified).dist/(no wire-trace scripts / tests / NOTES leak),npm audit0 vulns, lockfile not dirty, shebang correct, all gates pass.delete_tag_definitionmatches the destructive-tool conventions; detach-vs-delete disambiguated in both tool descriptions.The pagination ceiling, precisely
A top-100-per-party merge reliably orders only the global top ~100 entries (each party is fetched at Capsule's per-party cap of 100). Previously,
requestedWindowEnd <= 100would advertise apage+1at exactly the ceiling, which then returned an empty slice — a phantom page mid-feed. Strict< 100ends the feed at the ceiling instead. Entries beyond ~100 of a specific contact are reached vialist_party_entrieson that person's id (the default single-GET path, no ceiling) — now stated explicitly on the schema rather than hand-waved as "approximate."Deferred to the release cut (NOT in this PR)
The 6-location
1.6.5 → 1.7.0version bump,[Unreleased]→[1.7.0]graduation, README/INSTALL pin examples, and the optional biome 2.4.16 patch are the cut itself (Flow A) — done when you say go.Test plan
git grepfor all banned substrings → no matches)🤖 Generated with Claude Code