Repository navigation
Conversation
There was a problem hiding this comment.
Approve with nits (1 P2, 2 P3)
Scope: base main, merge base b64e183c. 1 commit, 8 files reviewed. Loaded the coderbook, ponytail-review and karpathy-guidelines skills. This review ran in a separate session.
Findings
P2
The response next_cursor pattern still allows only digits (contracts/openapi/node-services-internal/openapi.yaml:1741)
- Problem: The PR relaxes only the
cursorquery parameter (line 656).MemoryEntryPage.next_cursorin the same contract still sayspattern: ^[0-9]{1,9}$.browseMeetingsnow returns a base64url JSON cursor such aseyJpIjoi...(meeting-browser.ts:243), so the contract contradicts what the server actually sends. - Why nothing fails today: No layer checks responses against the schema at runtime. TeamHub's
memoryclientdecodesJSON200as-is (apps/teamhub/internal/memoryclient/client.go:186-191), and the generated types don't carry the pattern. Any client, mock server or contract test that does check responses would reject every meeting page that has a next page. - Fix: Point
next_cursoratcomponents/common.yaml#/components/schemas/Cursor, which is the opaque 1-1024 character cursor the publicMemoryEntryPagealready uses (contracts/openapi/components/memory-browser.yaml:85). Or relax it to the same pattern as the request. Then regenerate.
P3
includeContent is now dead (apps/node-services/src/memory/meeting-browser.ts:100)
- Problem:
browseMeetingswas the only caller that passedfalse. It now passes a literaltrue(line 212), and the tests use the default. - Fix: Delete the parameter, the ternary at line 140 and the
trueargument.
The excerpt turns every hyphen into a space (apps/node-services/src/memory/meeting-browser.ts:79)
- Problem:
.replace(/[*_>#-]/gu, " ")also rewrites hyphens inside words. "follow-up" becomes "follow up" and "Q3-plan" becomes "Q3 plan". A user who types the word as it appears in the summary gets no match, because the Web search uses a plain substringincludes(meetings-panel.tsx:137`). - Fix: Strip only list markers at the start of a line (
/^\s*[-*+]\s+/gmu) and keep hyphens inside words. - Also: The excerpt is the first 240 characters of the body, not the "opening sentence" that the PR body, README and test name describe. That's fine, but the wording could match the code.
Verified as fine
- Sort order and cursor agree. Both the in-memory sort (
meeting-browser.ts:148-152) and the cursor comparison (meeting-browser.ts:64-68) usestarted_atdesc, thenid.localeCompare, so the cursor and the slice agree even where Postgres collation would order ids differently (ready-meetings.ts:39). Two rows with the same millisecond fall back to the id tie-break on both sides. - Removal and insertion between pages. A removed cursor row still resolves to the next row after it, and a newly inserted newer row lands before the cursor. The new tests in
meeting-browser.test.tscover both cases. - Legacy cursors. A legacy numeric cursor can't be mistaken for the new format: base64url-encoded JSON always starts with
eyJ. Invalid cursors throwTypeError, andserver.ts:85/203maps that to 400. - Other memory kinds still validate. Relaxing the shared list-request regex (
server.ts:717) does not loosen daily and weekly paging, becauseparseCursorstill demands digits (memory-browser.ts:180-185). - No extra I/O for the excerpt. The Wiki pages were already loaded for the selected rows (
meeting-browser.ts:168-180), so building the excerpt is pure computation. The entry request still returnssummary: ""and the full content, capped at 200k characters. - The new
summaryreaches no other UI. On the Web,entry.summaryappears only in the Meetings search haystack (meetings-calendar.ts:65,meetings-panel.tsx:137).wiki-graph-daily-panel.tsx:356renders only daily and weekly entries. TeamHub passes the field through unchanged. - Contracts and docs.
contracts/generateddoesn't encode the pattern, so regeneration produces no diff. The memory README is updated. No CJK in added lines or in the commit message.
Process notes
- One commit, with no merge or fixup commits. The merge state is BLOCKED while CI and approval are pending.
CI
- Passing:
changes,repository-gate,check (contracts),check (teamhub-cli),web tests (2/2). - Still running at review time:
web tests (1/2),web-static. - I did not run any tests locally.
Automated review by Claude Code
Automated review of 1fe9041 by Claude Code.
|
Nice improvement—a few small fixes before merging (let's land #433 first and rebase): Relax MemoryEntryPage.next_cursor in contracts/openapi/node-services-internal/openapi.yaml to match the opaque cursor. |
1fe9041 to
57bf0eb
Compare
|
Thanks — all three are fixed in the new head, rebased onto
On ordering: #433 is still open, so I have not merged or force-rebased on it. Once it lands I'll rebase this PR; the only overlap is the request |
There was a problem hiding this comment.
Approve with nits (1 P3)
Scope: follow-up on 1fe9041. Base main, merge base 1c35212b; 1 commit, 10 files reviewed (generated contracts checked against the OpenAPI source). The PR was rebased since the previous review, so 1fe9041..HEAD includes unrelated main changes; I re-reviewed the full merge-base diff instead. Helper skills: coderbook, ponytail-review and karpathy-guidelines were not loaded; the review followed the linger-pr-review checklist directly. Ran in a separate session.
Previous findings
- Resolved: response
next_cursorlimited to digits.MemoryEntryPage.next_cursornow refscommon.yaml#/components/schemas/Cursor(contracts/openapi/node-services-internal/openapi.yaml:1740), and the Go and TS contracts were regenerated. - Resolved: dead
includeContentparameter. It is removed fromreadMeetingSummaryand its call site (apps/node-services/src/memory/meeting-browser.ts:141,:208). - Resolved: the excerpt replaced every hyphen. Only leading list markers are stripped now (
meeting-browser.ts:82), and the new testkeeps a hyphen inside a summary word for searchcovers it.
Findings
P3
apps/node-services/src/memory/meeting-browser.ts:84:body.length > 240 ? \${body.slice(0, 240)}…`returns 241 characters. BothMemoryEntry.summaryschemas declaremaxLength: 240(contracts/openapi/node-services-internal/openapi.yaml,contracts/openapi/components/memory-browser.yaml:61`). Any summary longer than 240 characters therefore produces a list entry that breaks the contract. Nothing validates responses at runtime today, so nothing fails yet, but a future response validator or a strict client would reject the page. Fix: slice to 239 before adding the ellipsis, and add an assertion in the existing excerpt test.
Verified as fine
- Cursor ordering.
ready-meetings.ts:39orders bystarted_at DESC, id.browseMeetingsre-sorts in memory with the same comparator thatmeetingCursorStartuses (meeting-browser.ts:150-155,:64-68), so the page and the cursor agree even iflocaleCompareand the DB collation order differ. A removed cursor row still resumes strictly after its key, so a page neither skips nor repeats a row. - Legacy and hostile cursors. Numeric cursors still page by offset (
:47-48). An encoded cursor always starts witheyJ, so it never collides with the digit form. Bad base64 or JSON, a wrong shape and an invalid date all throwTypeError, including JSONnull(destructuring it throws).server.ts:85and:203map that to 400. - End-to-end cursor path. TeamHub passes the cursor through unchanged (
apps/teamhub/internal/app/handlers_personal_wiki.go:78-81,internal/memoryclient/client.go:175). The public parameter is already the opaqueCursor(max 1024), which matches the relaxed internal pattern (server.ts:717). - No new I/O on the list path.
readMeetingSummarywas already called for every selected row (meeting-browser.ts:206-213). Only the excerpt is new, and the full content stays on the entry request (:221-223). - Web.
summaryflows throughmeetingsByDate(apps/web/src/features/memory/meetings-calendar.ts:65) into the client-side search string (meetings-panel.tsx:137). The panel test covers it. - The README was updated. No CJK in added lines or the commit message.
Process notes
- None. Single commit, no merge commits; the commit author is linked to
Lumea-art.
CI
All reported checks pass. check-node-services has no CI lane (scripts/check-plan.mjs:148), so I ran vitest run tests/memory/meeting-browser.test.ts tests/memory/server-http.test.ts locally: 24/24 passed. Merge state is BLOCKED (pending review), not behind.
Automated review by Claude Code
Automated review of 57bf0eb by Claude Code.
57bf0eb to
87e8443
Compare
|
Fixed the 240-character cap in |
There was a problem hiding this comment.
Approve (0 findings)
Follow-up on 57bf0eb. Merge base 1c35212b, 1 commit, 10 files reviewed.
Resolved: summary excerpt was 241 characters, over MemoryEntry.summary maxLength 240 (apps/node-services/src/memory/meeting-browser.ts:84 now slices 239 + …; covered by "caps a summary at the contract's 240 characters" in tests/memory/meeting-browser.test.ts:358).
Verified as fine
- Cursor and page use the same order: rows are re-sorted by
started_atdesc,idasc (meeting-browser.ts:149-153) andmeetingCursorStartfinds the first row strictly after the key, so a deleted or newly inserted row neither repeats nor skips a page (meeting-browser.ts:40-70). - The opaque cursor passes every hop: TeamHub's public route uses
common.yamlCursor(1–1024 chars,teamhub-api.openapi.yaml:2392) and forwards it unchanged (apps/teamhub/internal/memoryclient/client.go:175); Node accepts^[A-Za-z0-9_-]{1,1024}$(server.ts:717), which base64url output satisfies. Other kinds still reject non-numeric cursors (memory-browser.ts:180).
Process notes
mainhas moved to6a511c15; the branch needs a rebase before it can merge.
CI: changes passed; the other checks were still pending at review time. I didn't run tests locally because this worktree has no dependencies installed.
Automated review by Claude Code
Automated review of 87e8443 by Claude Code.
Meetings paged by array offset, so a meeting finalized, hidden, or removed between two requests shifted every later page: the reader repeated one meeting or skipped one. The cursor now carries the last meeting's started_at and id, and a numeric cursor from an older server is still answered as an offset. List entries also carry the first 240 characters of the published summary, so the Meetings search matches what was discussed and not only the name, date, time and recording file name. The full summary stays on the entry request. The internal response cursor is now the shared opaque Cursor, and summary excerpts keep hyphens inside words.
87e8443 to
ba9b664
Compare
There was a problem hiding this comment.
Approve (0 findings)
Follow-up on 87e8443: merge base 6a511c15, 1 commit, 10 files. git range-diff shows the patch is identical to the previous head; this push only rebased it. I still re-checked the assumptions across the whole PR.
Verified as fine
- The cursor and the page share one order.
browseMeetingssorts bystarted_at DESC, idwithlocaleCompare, andmeetingCursorStartuses the same comparison. A removed or newly inserted row therefore cannot shift or repeat a page, and a numeric cursor from an older server is still answered as an offset (apps/node-services/src/memory/meeting-browser.ts:41-68,:149-168). - The new cursor passes every hop. TeamHub copies
cursorandnext_cursorthrough without checking their format (apps/teamhub/internal/app/handlers_personal_wiki.go:79-88,:146-148). The public parameter is the sharedCursorschema (1–1024 chars,contracts/openapi/components/common.yaml:40). The internal contract andserver.ts:717now accept base64url. - The excerpt reaches the Web search. TeamHub forwards
entry.Summary(handlers_personal_wiki.go:161), and the panel addsitem.summaryto the search haystack (apps/web/src/features/memory/meetings-panel.tsx:137). The excerpt comes from the wiki page the list already loads, so it adds no extra read.
CI: all checks pass (check (computer-go) jobs are skipped because the PR doesn't touch them). I ran no tests myself.
Automated review by Claude Code
Automated review of ba9b664 by Claude Code.
What and why
browseMeetingspaged by array offset. A meeting finalized, hidden, or removed between two requests shifted every later page: the reader repeated one meeting, and when a meeting with a lower position disappeared it skipped one. The Web loads every page and de-duplicates by id, so a repeat disappeared quietly while a skip lost a meeting from the list.This pages by the key the list already sorts on:
started_at DESC, id. The cursor stores the last meeting's start and id, so a page starts after a row rather than after a count. A numeric cursor from an older server is still answered as an offset, and an unknown cursor is rejected.The Meetings search box matched the meeting name, date, time and recording file name. List entries now also carry the first 240 characters of the published summary, and the search matches it, so a meeting is findable by what was discussed. The full summary stays on the entry request.
Review fixes (rebased onto 1c35212)
MemoryEntryPage.next_cursornow refscomponents/common.yaml#/components/schemas/Cursorinstead of the digit-only pattern; regenerated the Go and TypeScript contracts.includeContentparameter fromreadMeetingSummaryand its call site.summaryExcerptstrips only leading list markers (/^\s*[-*+]\s+/gmu) and keeps hyphens inside words. Added a test withFollow-up on Q3-planso the Web substring search still finds hyphenated terms.How it was verified
meeting-browser.test.ts(18): removal and insertion between pages, legacy numeric cursor, invalid cursor, summary excerpt, hyphenated terms.server-http.test.ts(6): paging through/internal/v1/memory/entries.pnpm --filter @linger/node-services typecheck;pnpm contracts:generateandcontracts:verify; eslint/prettier on the changed files.Boundary
summarynow holds the excerpt instead of an empty string.Context
No open issue was available for this: every matching report already has a PR or waits on an external component. It follows the same pagination problem the memory catalog fixed for daily and weekly reports in #433.