beads/internal/workapi
Stephanie Jarmak 8ac3e6ea04
feat(workapi): opt-in BriefDeps projection for the issue detail view (#5547)
be-4d36f2 gave the dependents side a shallow shape after hub beads made
`bd show --json <hub>` allocate 5-13 GB marshaling full Issue records. The
dependencies side of the same builder never got it, and still returns the
complete body of every dependency.

Measured on a 16,051-issue store, one `bd show <id> --json` returned 214,456
bytes, of which 193,039 was the dependencies array; a single dependency carried
a 180,975-byte notes field. Reading one issue costs the full text of everything
it depends on.

BriefDeps reuses the shape collectDependents already settled on (id, status,
type, priority, title, dependency_type) and drops the free-form text. It is
opt-in and the default payload is unchanged, so no existing caller loses a
field it reads. That matters here: #4122 objects to default payload changes
and #5078 records what the last one cost.

The reduction runs after the Parent scan, which reads DependencyType and ID off
the full rows, and builds a new slice rather than overwriting the one the source
returned, which a caching source would keep shallow for later callers.

collectDependents now routes through the same shallowDep helper so the two
shapes are identical by construction rather than by coincidence.

Storage layer only, per CONTRIBUTING_PR_GUIDELINES.md; the cmd/bd flag that
reaches this is the follow-up PR.

Refs #5546

Co-authored-by: sjarmak <t@t.co>
2026-08-10 06:51:41 -07:00
..
storecounter Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
storequerier Converge Offset and MaxRows on all three legs, and fix the panic and the breaker hole under them (#5435) 2026-08-08 11:37:09 -07:00
storereader feat(workapi): opt-in BriefDeps projection for the issue detail view (#5547) 2026-08-10 06:51:41 -07:00
storereadycounter Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
storestats Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
storeversionreconciler Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
storeworkspaceconfig Refuse kv.* point reads on the settings role and stop printing them (#5493) 2026-08-09 11:06:51 -07:00
testdata fix(human): respond/dismiss text sources, bd list parity, and proxied-server support (#5333) 2026-08-10 05:36:11 -07:00
bootstrap.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
bootstrap_test.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
count.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
count_test.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
delete.go Add DeleteRequest.ExpectedVersion: a compare-and-delete on the named row (#5481) 2026-08-09 07:17:54 -07:00
delete_test.go Add DeleteRequest.ExpectedVersion: a compare-and-delete on the named row (#5481) 2026-08-09 07:17:54 -07:00
detail.go feat(workapi): opt-in BriefDeps projection for the issue detail view (#5547) 2026-08-10 06:51:41 -07:00
detail_test.go feat(workapi): opt-in BriefDeps projection for the issue detail view (#5547) 2026-08-10 06:51:41 -07:00
doc.go refactor(show): share issue-detail assembly and normalize not-found (bd-hc1) 2026-07-31 07:58:46 +00:00
list.go fix(human): respond/dismiss text sources, bd list parity, and proxied-server support (#5333) 2026-08-10 05:36:11 -07:00
list_ephemeral_test.go Admit the ephemeral plane from a list request, on the facade and on the wire (#5476) 2026-08-09 05:06:36 -07:00
list_golden_test.go fix(human): respond/dismiss text sources, bd list parity, and proxied-server support (#5333) 2026-08-10 05:36:11 -07:00
list_pinned_test.go fix(human): respond/dismiss text sources, bd list parity, and proxied-server support (#5333) 2026-08-10 05:36:11 -07:00
list_status_test.go refactor(list): route both bd list paths through internal/workapi and delete list_filter.go (bd-fv4) 2026-07-31 06:01:48 +00:00
metadata.go fix(workapi): refuse an invalid metadata key where the builders can name it 2026-07-31 18:37:25 +00:00
page.go Converge Offset and MaxRows on all three legs, and fix the panic and the breaker hole under them (#5435) 2026-08-08 11:37:09 -07:00
page_test.go docs(workapi): say where the shared epilogue stops, and what limit 0 does 2026-07-31 23:35:16 +00:00
query.go Merge branch 'facade/wave-3' into facade/wave-4 2026-08-06 21:39:05 +00:00
query_test.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
race_detector_off_test.go feat(issueops): put bd purge and bd prune behind the Sweeper role (bd-pn231) 2026-08-05 16:40:26 +00:00
race_detector_on_test.go feat(issueops): put bd purge and bd prune behind the Sweeper role (bd-pn231) 2026-08-05 16:40:26 +00:00
ready.go Converge Offset and MaxRows on all three legs, and fix the panic and the breaker hole under them (#5435) 2026-08-08 11:37:09 -07:00
ready_count_test.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
ready_golden_test.go feat(issueops): add the Reader role and wire both front doors through it 2026-07-31 18:37:25 +00:00
ready_test.go feat(issueops): add the Reader role and wire both front doors through it 2026-07-31 18:37:25 +00:00
release.go Add issueops.Releaser: give a claim back, optionally only a named holder's (#5482) 2026-08-09 07:48:56 -07:00
release_test.go Add issueops.Releaser: give a claim back, optionally only a named holder's (#5482) 2026-08-09 07:48:56 -07:00
sort.go Admit the ephemeral plane from a list request, on the facade and on the wire (#5476) 2026-08-09 05:06:36 -07:00
stats.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
stats_test.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
sweep.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
sweep_test.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
versionreconcile.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
versionreconcile_test.go Trim this series' comments toward the repo's own density 2026-08-06 08:06:59 +00:00
workspaceconfig.go Refuse kv.* point reads on the settings role and stop printing them (#5493) 2026-08-09 11:06:51 -07:00
workspaceconfig_test.go Refuse kv.* point reads on the settings role and stop printing them (#5493) 2026-08-09 11:06:51 -07:00