Expand description
Developer metadata (issue #1795, ADR-0081 §4).
set-developer-metadata/delete-developer-metadata (via
spreadsheets.batchUpdate) and search-developer-metadata (via the
distinct developerMetadata:search endpoint).
set-developer-metadata/delete-developer-metadata are gated by
DriveOperation::SheetsStructure, shaped like format.rs:
target_gate::resolve for the target and gate, then a
spreadsheets.get (needed to resolve a --sheet title to its numeric
id, and to render a location back to a sheet title for display), then
a developerMetadata:search call — this module’s read_discarded_cells
equivalent — that both decides what to do (create vs. update; what a
delete would remove) and backs the mandatory preview from the very same
read, then a --dry-run early return, then the mutation, then one
drivemutation record.
search-developer-metadata is read-only and consults no gate —
search is a thin wrapper with no target_gate::resolve call, no
lease, matching read.rs’s own ungated shape.
Restricted to DOCUMENT visibility everywhere, in two layers. Every
filter this module builds includes visibility: DOCUMENT_VISIBILITY, so
the server itself never returns or is asked to touch a PROJECT
entry — the primary mitigation. [assert_document_visibility] is the
defense-in-depth second layer, applied to every entry this module ever
reads, on every path (Set, Delete, search). There is no
--visibility flag on any of the three CLI commands, so no user input
can reach anything but DOCUMENT_VISIBILITY.
delete-developer-metadata never assumes exactly one match.
DeleteDeveloperMetadataRequest.data_filter is singular but can match
(and delete) several entries in one call — Sheets bulk-operates by
filter, not by id — so the preview lists every entry a real run would
remove, and a real run removes all of them in the one request.
Structs§
- Developer
Metadata Entry - One developer-metadata entry as reported in a preview or a completed result — the key, value and location the ADR-0081 §4 preview names.
- Developer
Metadata Options - Per-call options.
- Developer
Metadata Outcome - The full outcome of one attempt.
- Search
Location Filter - The raw
--sheet/--dimension/--start/--endflagssearchresolves into an optional location filter.
Enums§
- Developer
Metadata Result - What happened (or, under
--dry-run, would happen). - Developer
Metadata Verb - Which mutation to perform.
Functions§
- describe
- Renders an outcome as human-readable text.
- describe_
lines - Renders an outcome as its individual lines, none of which contains a
newline — see
structure.rs::describe_linesfor why this shape exists. - developer_
metadata - Runs one
set-developer-metadata/delete-developer-metadatamutation, logging every attempt that isn’t a dry run. Never returnsErr, matchingformat.rs::format. - search
- Searches for developer-metadata entries matching
keyand/orfilter.