You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deferred content-inclusion work. The accepted logical UTF-8, retention, identity and description-availability requirements remain useful. The old mandatory Issue #879 ancestry, bytes-minute producer assumption, epic-branch targeting and execution checklist are superseded. Issue #1045 first establishes what current sources can measure truthfully. Do not implement this issue until a fresh checkpoint selects its measurement contract.
Scott approved D1-D5 in Issue #554. That parent now controls selected scope and current dev-process execution. The original proposal below is retained as historical evidence, not an assignment to resume it.
Historical proposal
Include retained TextContent logical bytes in repository usage
Owner decision on 2026-08-10 selected Option A: Epic #825 ships the Product V1 description feature without claiming retained TextContent usage accounting. This issue moved to Operations epic #554 and remains open future work.
Do not assign implementation until #879 merges the accepted Operations SQL usage-fact journal, dispatcher, worker, and
completeness foundation. This issue then owns the first production repository-storage producer: it must append the
journal before broker delivery and retain enough durable measurement source to retry a failed append. Current Grace has
the fact contract, direct Service Bus publisher helper, ingestion, dedupe, and aggregation, but no production
repository-storage producer. Do not create a second journal, a parallel TextContent ledger, or direct synchronous
Operations SQL coupling from Grace.Actors.
Objective
Extend the repository storage usage measurement owned by Grace.Operations so every retained TextContent object
contributes its uncompressed UTF-8 byte length exactly once, regardless of GZip size or whether a later Description
supersedes or clears it.
Why this matters
TextContent consumes repository storage and must participate in usage limits and billing like other repository content.
Counting compressed size would make charges depend on compression ratio rather than the logical user payload, while a
description-specific accounting path would diverge from the shared Operations ledger.
Quality contract
Profile: Product V1.
Primary invariant: each retained repository TextContent object contributes exactly its recorded uncompressed Utf8ByteLength to the repository storage bytes-minute observation, independent of compressed size, retries,
supersession, or clearing.
Dependency: re-check #554 and current main before assignment. Reuse the accepted repository storage observation and
projection contract. Do not create a parallel accounting ledger inside WorkItem or TextContent code.
Complexity stop: stop if #554 has not established a usable repository storage measurement seam, if implementation
requires a second billing fact interpretation, or if accurate inclusion requires a new durable state machine not already
accepted by #554.
Identity dimensions: owner ID, organization ID, repository ID, storage pool ID, minute bucket, and retained
TextContent identity as required by the accepted producer/projection dedupe design.
Quantity source: uncompressed TextContent.Utf8ByteLength for retained objects.
Publishing a one-time bytes-added value as though it were a bytes-minute observation.
Counting compressed object length.
Counting only the current description while earlier objects remain stored.
Double-counting matching retries or replayed usage evidence.
Coupling description success to Operations availability.
Inventing a new counter actor or per-description accounting state without owner review.
Expected tests
Positive: one retained object; multiple versions; identical text with distinct IDs; create description; set description.
Negative: retry/replay duplicate; conclusively deleted failed-write object; malformed or missing accounting source facts;
Operations unavailable does not fail description mutation.
Regression: existing repository storage observations and owner/org/repository scope remain correct; no public contract
exposes per-object details.
Boundary: compressible and incompressible payloads with equal UTF-8 lengths contribute equally; clear changes no
quantity; large accepted payload uses its exact uncompressed length.
High-risk adversarial examples
A 65,536-character highly compressible description occupies few physical bytes; logical usage still records its full
UTF-8 length.
The same description operation is retried after an uncertain result; retained bytes are not counted twice.
Two separate descriptions contain identical text; both retained objects count.
Current description is cleared; all older objects continue to count.
Record any residual lag or reconciliation risk without adding synchronous enforcement.
Validation profile
Primary profile: deployment-runtime if the accepted producer crosses Service Bus/worker storage; otherwise domain-contract with focused Operations projection proof. Select exactly one broad final local gate only when current
epic #554 guidance requires it.
Public behavior under test
Boundary: repository storage usage observation and owner-scoped Operations projection.
Behavior: retained TextContent contributes uncompressed logical bytes exactly once without affecting description
availability.
RED evidence: current code has usage ingestion plumbing but no proven TextContent inclusion source.
Path lease conflict score
3 - cross-epic accounting surface. This issue depends on #554's current contract and may overlap Operations files.
Do not start concurrently with an active #554 branch touching the same producer/projection files. Refresh and compare
write sets immediately before assignment.
Expected validation
Run focused usage-type, publisher, ingestion, projection, retry/replay, and description-availability tests selected by
the actual implementation seam.
Run formatting, docs lint, generated checks if applicable, and git diff --check.
GitHub Validate and fresh Sol High review are required for the same PR head.
Do not stack Fast/Full on another selected broad gate.
Docs impact
Update Operations usage semantics and the coordination-surface design to state that retained TextContent uses
uncompressed UTF-8 length, prior versions remain billable while retained, clearing does not reduce usage, and accounting
is deferred rather than synchronously reserved.
Definition of done
All 22 implementation steps are completed or explicitly marked N/A with issue evidence.
September 7 recovery status
Deferred content-inclusion work. The accepted logical UTF-8, retention, identity and description-availability requirements remain useful. The old mandatory Issue #879 ancestry, bytes-minute producer assumption, epic-branch targeting and execution checklist are superseded. Issue #1045 first establishes what current sources can measure truthfully. Do not implement this issue until a fresh checkpoint selects its measurement contract.
Scott approved D1-D5 in Issue #554. That parent now controls selected scope and current dev-process execution. The original proposal below is retained as historical evidence, not an assignment to resume it.
Historical proposal
Include retained TextContent logical bytes in repository usage
Parent epic: #554 - Grace.Operations usage accounting, billing proof, and cost reconciliation
Related feature epic: #825 - Implement blob-backed work-item descriptions
Deferred from Epic #825
Owner decision on 2026-08-10 selected Option A: Epic #825 ships the Product V1 description feature without claiming retained TextContent usage accounting. This issue moved to Operations epic #554 and remains open future work.
Do not assign implementation until #879 merges the accepted Operations SQL usage-fact journal, dispatcher, worker, and
completeness foundation. This issue then owns the first production repository-storage producer: it must append the
journal before broker delivery and retain enough durable measurement source to retry a failed append. Current Grace has
the fact contract, direct Service Bus publisher helper, ingestion, dedupe, and aggregation, but no production
repository-storage producer. Do not create a second journal, a parallel TextContent ledger, or direct synchronous
Operations SQL coupling from
Grace.Actors.Objective
Extend the repository storage usage measurement owned by Grace.Operations so every retained TextContent object
contributes its uncompressed UTF-8 byte length exactly once, regardless of GZip size or whether a later Description
supersedes or clears it.
Why this matters
TextContent consumes repository storage and must participate in usage limits and billing like other repository content.
Counting compressed size would make charges depend on compression ratio rather than the logical user payload, while a
description-specific accounting path would diverge from the shared Operations ledger.
Quality contract
Profile: Product V1.
Primary invariant: each retained repository TextContent object contributes exactly its recorded uncompressed
Utf8ByteLengthto the repository storage bytes-minute observation, independent of compressed size, retries,supersession, or clearing.
Dependency: re-check #554 and current
mainbefore assignment. Reuse the accepted repository storage observation andprojection contract. Do not create a parallel accounting ledger inside WorkItem or TextContent code.
Complexity stop: stop if #554 has not established a usable repository storage measurement seam, if implementation
requires a second billing fact interpretation, or if accurate inclusion requires a new durable state machine not already
accepted by #554.
Context and evidence
TextContent.Utf8ByteLengthas the uncompressed UTF-8 length and retains objectsafter uncertain actor outcomes.
src/Grace.Types/Usage.Types.fscurrently definesRepositoryStorageBytesMinuteas an immutable minute-normalizedobservation with a positive quantity.
src/Grace.Actors/OperationalFactsPublisher.Actor.fspublishes usage facts; Operations worker/tests own ingestion andhot projections.
TextContent logical bytes in the accepted repository storage measurement.
Decision closure and contract propagation
Accepted behavior
Utf8ByteLength, never GZip object length.text.
Propagation map
Owned paths
src/Grace.Types/Usage.Types.fsor usage helper changes only if the existing contract requires extensionsrc/Grace.Actors/OperationalFactsPublisher.Actor.fsonly if the accepted producer seam requires itsrc/Grace.Operations*/**projection and test paths needed to include TextContent in repository storage quantityForbidden or sensitive paths
Risk surfaces
Minimum detail gate
Invariant tuple
TextContent identity as required by the accepted producer/projection dedupe design.
TextContent.Utf8ByteLengthfor retained objects.Forbidden implementation shapes
Expected tests
Operations unavailable does not fail description mutation.
exposes per-object details.
quantity; large accepted payload uses its exact uncompressed length.
High-risk adversarial examples
UTF-8 length.
existing Epic: Grace Operations usage visibility and explainable accounting #554 mechanism.
Selected risk-surface traps
Explicit N/A waivers
Implementation steps
mainusage contracts before assignment.quantity.
TextContent.Utf8ByteLength; do not inspect or report GZip object length as logical usage.git diff --check.Validation profile
Primary profile:
deployment-runtimeif the accepted producer crosses Service Bus/worker storage; otherwisedomain-contractwith focused Operations projection proof. Select exactly one broad final local gate only when currentepic #554 guidance requires it.
Public behavior under test
availability.
Path lease conflict score
3 - cross-epic accounting surface. This issue depends on #554's current contract and may overlap Operations files.
Do not start concurrently with an active #554 branch touching the same producer/projection files. Refresh and compare
write sets immediately before assignment.
Expected validation
the actual implementation seam.
git diff --check.Docs impact
Update Operations usage semantics and the coordination-surface design to state that retained TextContent uses
uncompressed UTF-8 length, prior versions remain billable while retained, clearing does not reduce usage, and accounting
is deferred rather than synchronously reserved.
Definition of done