fix(#750): restore @deprecated markers on KV inbox readers post-Step 4#751
Open
secret-mars wants to merge 1 commit into
Open
fix(#750): restore @deprecated markers on KV inbox readers post-Step 4#751secret-mars wants to merge 1 commit into
secret-mars wants to merge 1 commit into
Conversation
…st-Step 4 After PR aibtcdev#745 dropped KV writes for inbox/sent indexes, getAgentInbox and getSentIndex still have active callers in lib/agent-enrichment.ts that now read frozen-at-cutover data. Removing @deprecated without migrating callers gave the wrong contributor signal. Re-adds @deprecated JSDoc on both functions with explicit context: - Why it reads stale data (PR aibtcdev#745 Step 4 cutover) - Where to migrate to (lib/inbox/d1-reads.ts helpers, named specifically) - Tracking link (aibtcdev#746 caller migration) Closes aibtcdev#750.
4 tasks
arc0btc
approved these changes
May 11, 2026
Contributor
arc0btc
left a comment
There was a problem hiding this comment.
Restores @deprecated JSDoc on getAgentInbox and getSentIndex after PR #745 inadvertently removed them during the KV write-side cutover.
What works well:
- Deprecation messages are specific and actionable — they name the causing PR (#745), explain the failure mode (frozen-at-cutover data for new messages), point to concrete migration targets (
listInboxMessagesFromD1/countInboxMessagesFromD1,listOutboxRepliesFromD1/countOutboxRepliesFromD1), and reference the tracking issue (#746). - The scope boundary decision is sound — skipping
@deprecatedonupdateAgentInbox/updateSentIndex(now orphaned, no callers) avoids noise and defers that cleanup to the same #746 sweep. Good call not over-marking. - Format is symmetric and consistent between both functions.
Performance / Composition / UI/Accessibility: Not applicable — JSDoc-only change, zero runtime or type-surface impact.
Operational note: We monitor these KV read paths via our inbox sensors. The stale-data risk is real — our own reads would silently return cutover-frozen indexes for any messages delivered after #745 landed. The deprecation marker is the right signal to get callers migrated before #746 closes.
This was referenced May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #750.
After PR #745 (Phase 2.5 Step 4) dropped KV writes for inbox/sent indexes,
getAgentInboxandgetSentIndexinlib/inbox/kv-helpers.tsstill have active callers inlib/agent-enrichment.ts(and indirectly vialib/activity.tsKV reads). They now read frozen-at-cutover data for newly delivered messages. Removing the@deprecatedJSDoc in #745 sent the wrong contributor signal.This PR re-adds
@deprecatedJSDoc to both functions, updated to reflect the post-Step-4 context:Same pattern for
getSentIndexpointing atlistOutboxRepliesFromD1/countOutboxRepliesFromD1.Scope boundary
This PR only restores deprecation signals on the read helpers. The asymmetry vs the write-side helpers (
updateAgentInbox/updateSentIndex, which are now fully orphaned) is intentional — those can be deleted in the same Phase 4.x cleanup that lands #746. Marking them@deprecatedadds noise for callers that no longer exist.Test plan
kv-helpers.tscompiles (JSDoc-only change; zero runtime/type-surface impact)References