feat(routes)!: replace createMemory({ app }) with createMemoryRoutes - #53
Merged
TheGreatAxios merged 1 commit intoSep 27, 2026
Conversation
TheGreatAxios
commented
Sep 25, 2026
TheGreatAxios
left a comment
Contributor
Author
There was a problem hiding this comment.
Self-review, three passes over the stacked range.
Verdict: ready for review.
- There is one
createMemory.createMemoryRoutesreturns a freshHono<TenantEnv>with relative paths, and the tests mount it the way the README shows. - No conditional spreads remain in
createMemory. The one spread left is the condition-registry key merge inresolveGrantConfig. - The barrel is the public API only, and the built
.d.tsfiles carry noMergeLocalLiveV1. - Route authorization does not change when the host builds
requireGrantfrom its own registry: share grants sit onmemory.doc:<id>, not on thememorycapability resource that the guard checks.
TheGreatAxios
force-pushed
the
cl-9061-memory-remove-duplicate-creatememory-declaration
branch
from
September 25, 2026 18:31
ac95c5d to
3ec7fcb
Compare
TheGreatAxios
force-pushed
the
cl-9061-memory-remove-duplicate-creatememory-declaration
branch
from
September 26, 2026 01:32
3ec7fcb to
aa3bc5e
Compare
createMemoryRoutes(deps) builds the routes on a fresh Hono<TenantEnv> with paths relative to the mount point; the host mounts it at /api/tenants/:tenantId/memory with its own requireGrant. The barrel's createMemory wrapper that mutated a passed app is gone, so the one createMemory is the plane factory in memory.ts, and it assembles its options as explicit literals rather than conditional spreads. The package root now exports only the public API: internal services, helpers and test fakes are gone from it, the distiller and migrations stay on their own subpaths, and the internal MergeLocalLiveV1 name no longer appears in shipped declarations.
TheGreatAxios
force-pushed
the
cl-9061-memory-remove-duplicate-creatememory-declaration
branch
from
September 26, 2026 01:36
aa3bc5e to
c108d16
Compare
TheGreatAxios
added this pull request to stack #61
September 26, 2026 01:57
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
Stacked on #52; merge that first.
createMemoryRoutes({ memory, requireGrant, callerResolver? })returns the memory routes as aHono<TenantEnv>sub-app, with paths relative to the mount point. The host mounts it withapp.route("/api/tenants/:tenantId/memory", …), the same shape as Interchange hub-apicreateGrantRoutes. Every route is guarded bydeps.requireGrant.createMemory({ app }),CreateMemoryOptionsandregisterMemoryRoutesare removed. The onecreateMemoryis the plane factory inmemory.ts, and it builds its options as explicit literals.resolveGrantConfigare gone from it. The distiller stays at@corbits/memory/distillerand migrations at@corbits/memory/migrations.MergeLocalLiveV1no longer appears in shipped declarations.Verification
bun run typecheck,bun run buildandbun test ./srcpass (456 tests).grep -r MergeLocalLiveV1 distfinds nothing.createMemoryRoutesat/api/tenants/:tenantId/memoryand pass.Closes CL-9061
Closes CL-9316
Closes CL-9314
Closes CL-9128
Closes CL-9130
Closes CL-9134