test: cover machine callers, input rules and route validation e2e - #59
Merged
TheGreatAxios merged 2 commits 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. Each pass compared the deleted files case by case against tests/.
Verdict: ready for review.
- The third pass found three small gaps: search visibility within a tenant, purge on an unknown document returning 404, and the file placement of the synthesized-row test. All three are fixed in this branch and the suite passes, but there was no fourth review pass after those fixes.
- A mutation that reads the URL tenant fails the tenant-scoping test.
- The one waiver is listed in the description.
Merged
TheGreatAxios
force-pushed
the
cl-9118-memory-delete-fake-backed-routestestts
branch
2 times, most recently
from
September 26, 2026 00:00
8d61be2 to
fb1a11f
Compare
TheGreatAxios
force-pushed
the
cl-9118-memory-delete-fake-backed-routestestts
branch
2 times, most recently
from
September 26, 2026 00:53
c21b4b8 to
a89638d
Compare
TheGreatAxios
force-pushed
the
cl-9118-memory-delete-fake-backed-routestestts
branch
from
September 26, 2026 01:32
a89638d to
63c5d5b
Compare
TheGreatAxios
force-pushed
the
cl-9118-memory-delete-fake-backed-routestestts
branch
from
September 26, 2026 01:36
63c5d5b to
b739359
Compare
TheGreatAxios
added this pull request to stack #61
September 26, 2026 01:57
New end-to-end suites exercise the callerResolver trust boundary (401 on an unidentified caller, 500 on a throwing or malformed resolver, grants still required, reads scoped to the resolved tenant, retention limited to the resolved creator, and synthesized context rows read only for their ids), the in-process input rules (limit bounds, content or file, text extraction, share tags, kind filters, evidence, capability reporting, rerank budget validation), and the remaining route checks (legacy grants, 401 without a session, body and limit validation, private list visibility, forget versus purge, unknown and whitespace ids, retention-class).
Their cases now run against real Postgres in the end-to-end suite. The capture tests import the module directly now that nothing replaces it with mock.module. Also deleted: the log formatter, table-name, grant-requirement constant, resident-distiller wiring and memory-plane error-type tests, which asserted nothing a host can observe.
TheGreatAxios
force-pushed
the
cl-9118-memory-delete-fake-backed-routestestts
branch
from
September 27, 2026 00:32
b739359 to
57d896c
Compare
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 #58; merge that first.
src/memory.test.ts(mock-heavy) andsrc/routes/routes.test.ts(fake-backed) into the real-Postgres end-to-end suite, then deletes both files:tests/caller-resolver.test.ts: an unidentified caller gets 401; a throwing, empty or whitespace resolver gets 500 with nothing written; grants are still required; reads use only the resolved tenant; retention actions are limited to the resolved creator.tests/context-rows.test.ts: authorization reads only.id/.tenantIdfrom synthesized context rows.tests/plane.test.ts: limit bounds, the content/file rule, text extraction, share tags, kind filters and evidence, capability reporting, re-adding identical content, and rerank budget validation.tests/grants.test.ts: legacy grants, 401 without a session, body and limit validation, list and search visibility, forget versus purge, unknown and whitespace ids, retention-class, andkinds/entity_idspassthrough.mock.module.if (!meta) continue;insrc/memory.ts) is not covered; reproducing it needs a concurrent delete between two internal queries.Verification
TEST_DATABASE_URL=… bun run test: 356 pass against local Postgres 17 with pgvector.bun run typecheckpasses.Closes CL-9117
Closes CL-9118