Skip to content

Commit 0eceaf7

Browse files
committed
fix(rest): keep tracker ids out of the ledger note's runtime string
The `note` field ships to authors and operators through generated surfaces, where an issue id resolves to nothing. The anchors move to an adjacent source comment, which only a reader who can resolve them sees. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
1 parent 607a151 commit 0eceaf7

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/rest/src/rest-route-ledger.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,17 @@ export const REST_ROUTE_LEDGER: readonly RestRouteLedgerEntry[] = [
236236
note: '[#6603] gated on `manage_metadata` (ADR-0066 D1), same mechanism as POST /meta/_migrate-stored — a session alone is no longer enough. The write-side answer to ADR-0106 D1: a masked read PUT back verbatim used to delete the fields the caller could not see. [#12702] the gate is the shared `metaWriteCapabilityVerdict`: `manage_org_presentation` is also admitted, ONLY for an `allowOrgOverride: true` type written org-scoped to the caller\'s own active organization' },
237237
{ route: 'DELETE /api/v1/meta/:type/:name', family: 'metadata', source: 'route-manager', disposition: 'sdk', client: 'meta.deleteItem',
238238
note: 'REST-only: the dispatcher /meta branch has no DELETE handling — it falls into the read path. [#7019] gated on `manage_metadata` (ADR-0066 D1), same mechanism as the PUT twins — but NOT for the ADR-0106 reason: nothing is masked or round-tripped here, this discards a customization overlay outright, and `?dropStorage=true` takes the object table with it. [#12702] same shared verdict as the PUT door: an admitted `manage_org_presentation` reset threads the caller\'s own organization, so the only row it can discard is their own org\'s overlay' },
239+
// The response schema POSTDATES this row: the row was written when the door
240+
// had no declaration, and `HistoryMetaItemResponseSchema` was authored later
241+
// by the card that declared the history protocol member. That is why this was
242+
// the one row of the metadata family left unfilled while its `audit`,
243+
// `rollback` and `diff` siblings were bound. The tracker anchors for both
244+
// halves live in git history and in this comment's own PR, deliberately not
245+
// in the `note` string below — that string reaches authors and operators
246+
// through generated surfaces, where an issue id resolves to nothing.
239247
{ route: 'GET /api/v1/meta/:type/:name/history', family: 'metadata', source: 'route-manager', disposition: 'sdk', client: 'meta.getHistory',
240248
responseSchema: 'HistoryMetaItemResponseSchema',
241-
note: 'REST-only: the dispatcher /meta branch swallows /history as a compound name and 404s. [#13523] payload answered BARE, so the named schema is the whole body. The schema postdates this row (#12005, PR #13521) — describe-only transcription of `historyMetaItem`\'s declared return; conformance: the #12005 capture suite in spec `api/protocol.test.ts`, which parses a real two-event body (an update carrying every optional member, and the delete tombstone with `hash: null` and a `null` system actor) and pins the closed `op` vocabulary against the deliberately open `ref.type`' },
249+
note: 'REST-only: the dispatcher /meta branch swallows /history as a compound name and 404s. Payload answered BARE, so the named schema is the whole body — a describe-only transcription of `historyMetaItem`\'s declared return. Conformance: the history capture suite in spec `api/protocol.test.ts`, which parses a real two-event body (an update carrying every optional member, and the delete tombstone with `hash: null` and a `null` system actor) and pins the closed `op` vocabulary against the deliberately open `ref.type`' },
242250
{ route: 'GET /api/v1/meta/:type/:name/audit', family: 'metadata', source: 'route-manager', disposition: 'sdk', client: 'meta.getAudit',
243251
responseSchema: 'AuditMetaItemResponseSchema',
244252
note: '[#12038] REST-only route; payload answered BARE, so the named schema is the whole body. The schema predates this row (#11678, exact field-for-field match of `auditMetaItem`\'s declared return); conformance: the #11678 capture suite in spec `api/protocol.test.ts`' },

0 commit comments

Comments
 (0)