engdocs/EXTENDING.md
This file documents contracts that callers of the storage API must honor. It is not user-facing; it is for code that embeds bd or talks to the storage layer directly.
IssueFilter.Litestore.SearchIssues(ctx, query, filter) accepts an IssueFilter value.
When filter.Lite == true, the storage layer issues a narrower SELECT
that omits these heavy TEXT columns:
descriptiondesignacceptance_criterianoteswaiterspayloadCode that calls store.SearchIssues with IssueFilter.Lite == true:
Description, Design, AcceptanceCriteria,
Notes, Payload, or Waiters from any returned *types.Issue.
These fields are zero-valued after a lite scan; they did not come from
the row. Reading them yields no signal.issue.IsLitePartial if
branching behavior on hydration depth is required. The field is
internal-only (json:"-") — it never crosses the wire.To recover the full body for a specific issue after a lite listing,
call store.GetIssue(ctx, id) — GetIssue always returns the full row.
IssueFilter.Lite defaults to false. Every existing call site that
does not opt in retains today's behavior: heavy columns are fully
hydrated, and Issue.IsLitePartial is false.
internal/storage/issueops/scan.go
(IssueSelectColumns, IssueSelectColumnsLite, HeavyDropList).ScanIssueFrom (full) and ScanIssueLiteFrom (lite,
sets IsLitePartial).internal/storage/issueops/search.go — SearchIssuesInTx
selects issueProjection or issueLiteProjection on filter.Lite; both
are searchProjection[*types.Issue] literals sharing the wisp-merge and
hydration machinery in searchTableInTxT.internal/storage/issueops/scan_test.go::TestIssueSelectColumns_LitePlusHeavyEqualsFull
fails CI if a future column is added to IssueSelectColumns without
being classified into IssueSelectColumnsLite or HeavyDropList.filter.Lite is currently honored only by the issueops-backed stores
(Dolt, embedded Dolt) via the dispatch above. The proxied-server
(internal/storage/domain/db) path — issueSQLRepositoryImpl.searchTable
/ fetchIssuesByIDs — does not check filter.Lite yet: it always issues
the full issueSelectColumns SELECT and returns fully-hydrated issues
with IsLitePartial == false. This is correct-but-unoptimized (no lite
callers exist yet, so the difference is invisible today); wiring
filter.Lite through the domain/db stack is deferred to the CLI-wiring
follow-up (be-uwvs.2+), not part of this foundation.