docs(m154): privilege boundaries and the free-trial removal - #171
docs(m154): privilege boundaries and the free-trial removal#171indykish wants to merge 1 commit into
Conversation
Adds one Update for M154_002: the secret store and the wallet move onto their own roles, and the free trial is removed. Two breaking or behavioural facts a reader has to act on: - `GET /v1/tenants/me/billing` drops the `free_trial` object. - Metered runs are billed from the first slice. The trial never ended on its own — the column that would have ended it was never written — so stage charges had always priced to zero. History is untouched; the Aug 01 entry describing the per-account trial boundary stays as the archive of what was true then. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| ## Security | ||
|
|
||
| - **Reaching a secret or a balance requires assuming a role first.** `vault_runtime`, `billing_runtime`, and `metering_runtime` own the grants; membership is granted `WITH INHERIT FALSE, SET TRUE`, so the privileges stay dormant until a statement names one. An unelevated read is refused by PostgreSQL, not by application code. | ||
| - **Elevation ends with its transaction.** `SET LOCAL ROLE` means the server itself reverts the role at commit or rollback, so no reset can be forgotten. A connection that somehow returns to the pool still elevated is refused and destroyed rather than reused, under `UZ-INTERNAL-005`; a refused elevation reports `UZ-INTERNAL-004`. |
There was a problem hiding this comment.
Elevation error codes lack reference entries
When clients or operators encounter UZ-INTERNAL-004 or UZ-INTERNAL-005, the error-code reference intended for programmatic interpretation documents neither code, preventing consumers from identifying and correctly handling these newly registered failures.
Prompt To Fix With AI
This is a comment left during a code review.
Path: changelog.mdx
Line: 22
Comment:
**Elevation error codes lack reference entries**
When clients or operators encounter `UZ-INTERNAL-004` or `UZ-INTERNAL-005`, the error-code reference intended for programmatic interpretation documents neither code, preventing consumers from identifying and correctly handling these newly registered failures.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Closing alongside Half of what it documents ships nowhere. The privilege boundary in M154_002 was found unwired — The other half — deleting the free trial — is real and is being re-authored against A replacement changelog lands under M164 once that code is final, rather than sitting open against a branch that is closed. |
Companion docs branch for
agentsfleetM154_002 (feat/m154-privilege-boundaries). One new changelog<Update>; no existing entry is rewritten.What the entry covers
Breaking
GET /v1/tenants/me/billingno longer returns thefree_trialobject (active,ends_at_ms). Every other field, path, and status code is unchanged.Security
vault.secretsandbilling.tenant_walletmove offapi_runtimeontovault_runtime/billing_runtime/metering_runtime. Membership isWITH INHERIT FALSE, SET TRUE, so privileges stay dormant until a statement names one — an unelevated read is refused by PostgreSQL, not by application code.SET LOCAL ROLE. Registered codes:UZ-INTERNAL-004(elevation refused),UZ-INTERNAL-005(elevated connection refused at pool release).memory.memory_entriesrows for a fleet created mid-purge.Billing
Notes
make lintpasses (documentation checks + link checks + OpenAPI drift).UZ-INTERNAL-004 elevation refusedand the module that implements it.🤖 Generated with Claude Code
Greptile Summary
This PR adds the Aug 12, 2026 changelog entry covering removal of the billing free-trial response, transaction-scoped privilege elevation, safer account erasure, and first-slice metering.
free_trialremoval from the tenant billing response.Confidence Score: 4/5
The documentation needs the two newly registered elevation error codes added to the error-code reference before merging.
The changelog tells consumers that
UZ-INTERNAL-004andUZ-INTERNAL-005are emitted, but the reference intended for programmatic error handling documents neither code.Files Needing Attention: changelog.mdx and api-reference/error-codes.mdx
Important Files Changed
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "docs(m154): record the privilege boundar..." | Re-trigger Greptile
Context used: