Follow-ups to #1: retention cron, inbox cache accessors, release gates, CI - #4
Merged
Merged
Conversation
…box cache cleanupFinalizedOutbound existed but nothing ever scheduled it, so finalized outbound rows accumulated forever. The component now runs it hourly from its own crons.ts; at 200 rows per status per run that keeps up with ~4,800 finalized sends per status per day, and the mutation stays public so an app can sweep sooner with its own olderThan. listCachedInboxes and getCachedInbox were public component queries with no caller. The client now exposes them, so an app can read inboxes it created from a query, and from React, without an AgentMail round-trip. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ation test - prepublishOnly and preversion now run build + test, so neither `npm publish` nor `npm version` can proceed from a broken tree; before this the publish path never ran tsc and shipped whatever dist/ held. - Add a GitHub Actions workflow (build, typecheck, test). The committed package-lock.json was out of sync and would have failed `npm ci` on the first run, so it is regenerated here. - lib.codegen.test.ts was excluded from every vitest entry point and had rotted: it never enabled fake timers, and it predates credentials moving from mutation args to process.env. Both fixed, the exclude removed, and the sweep it claimed to cover is now actually covered. - Make `npm run typecheck` pass for the example: resolve the package from source via tsconfig paths, commit its generated types, annotate the client instance to break the internal/exports inference cycle, and make draftAutoReply internal, which is how it was already referenced. - component.d.ts: every app-callable entry now carries the "internal" visibility codegen emits, instead of a mix. - smoke.ts --send passed an undeclared `config` to agentmailFetch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The lock validated under the local npm but CI's npm 10 rejected it: the optional @rolldown/binding-wasm32-wasi subtree lacked @emnapi nodes. Regenerated with npm@10 --package-lock-only; both versions accept it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Follow-ups from the investigation behind #1 / #2 / #3. Two commits; see each message for the reasoning.
What changes for users
cleanupFinalizedOutboundwas never scheduled; the component now sweeps hourly from its owncrons.ts(README: Retention).agentmail.listCachedInboxes(ctx)/getCachedInbox(ctx, inboxId)over the component's existing cache queries (README: Inbox cache).What changes for maintainers
npm versionandnpm publishare both gated on build + test — the publish path previously never ran tsc.npm ci; regenerated.lib.codegen.test.tsis back innpm test(it was excluded from every entry point and had rotted); now 13 cases including real coverage of the sweep.npm run typecheckpasses for the example app; it also surfaced two bugs in the example (internal.example.draftAutoReplyreferenced an action that was public; a type-inference cycle).component.d.tsvisibility tokens are uniform;smoke.ts --sendno longer throws.Verification
npm ci --dry-runclean; 102 tests passfinalizedAt < cutoffguard fails the new test; reverting an action to internal fails both the client test and the buildDeliberately not included
_generatedand diffs it:convex codegen --component-dirrequires a Convex deployment, which CI does not have.npm run build:codegenremains the maintainer path.🤖 Generated with Claude Code