Repository navigation
Conversation
Add `createdAt` timestamp to SessionEntry, preserve it across merges, and expose four new list-sessions filters (updatedAfter, updatedBefore, createdAfter, createdBefore) for querying sessions by absolute time range. This is foundational for external persistence backends (e.g. PostgreSQL) that need incremental sync by timestamp. Includes 10 new tests covering all filter combinations and edge cases.
…d messages Add persist-postgres extension plugin that persists conversations and messages to PostgreSQL via agent lifecycle hooks (before_agent_start, agent_end) and channel hooks (message_received, message_sent). Plugin boundary: owns lp_conversations and lp_messages tables only. No user table — user identity is outside this plugin's scope. Schema auto-created on first use with proper indexes. Files: - db.ts: connection pooling, schema DDL, upsert/insert/query, row mapping - index.ts: plugin registration with lifecycle and channel hooks - integration.test.ts: 16 tests (CRUD, date-range SQL filtering, listSessionsFromStore round-trip with PG-sourced data)
…sations
The first filter (createdAfter) hardcoded $1 instead of using
$${values.length + 1}, which would break if filters are reordered.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Adds lockfile entries for the persist-postgres workspace package so CI frozen-lockfile install succeeds. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-authored-by: supmo668 <[email protected]>
Copilot
AI
changed the title
[WIP] Create PRD to address PR feedback and git action issues
docs: PRD for persist-postgres PR feedback and CI failures
Feb 14, 2026
supmo668
requested changes
Feb 14, 2026
supmo668
left a comment
There was a problem hiding this comment.
Proceed to address the feedbacks and comments from the Greptile bot, feedbacks from the PR from openclaw (origin) reviewer upon push
…ilures Co-authored-by: supmo668 <[email protected]>
Author
All 7 Greptile review issues and CI TypeScript errors have been implemented in commit Plugin fixes (index.ts):
Database fixes (db.ts):
Test fixes (integration.test.ts):
|
Copilot
AI
changed the title
docs: PRD for persist-postgres PR feedback and CI failures
fix(persist-postgres): address Greptile review feedback and CI failures
Feb 14, 2026
supmo668
force-pushed
the
feature/session-timestamp-filtering
branch
from
February 14, 2026 08:38
9558d21 to
3ffecf3
Compare
supmo668
added a commit
that referenced
this pull request
Jul 22, 2026
…he pass; non-empty = FAIL-ESCALATE (CTO openclaw#4367) shrinemobile proved the original scenario-3 input (a fresh token for the signed-out session) is UNOBTAINABLE: a real sign-out revokes the session at Clerk, so the FAPI re-mint FAILS at the mint step (empty). Feeding an empty token and scoring its 401 as a pass would be VACUOUS (rejected nothing). Corrected, and stronger: PASS = (a) the re-mint returns EMPTY (Clerk refused to mint for the revoked session — the threat closed at the SOURCE) AND (b) the pre-sign-out captured token → 401 at the validator. A NON-EMPTY re-mint is the real finding → FAIL-ESCALATE (Clerk did not revoke), never scored green. This cleanly distinguishes #3 (a fresh token cannot be obtained) from #2 (the existing token is rejected). Stage: tests Generated-With: Claude Code Co-Authored-By: openclaw <[email protected]> Co-Authored-By: Claude <[email protected]>
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.
Upstream PR openclaw/openclaw#15424 received a 2/5 confidence score from Greptile and fails CI with 7 TypeScript errors. This PR implements all 7 actionable fixes and includes a PRD documenting each issue.
Greptile review fixes
api.pluginConfig.databaseUrlfirst, falls back toprocess.env.DATABASE_URLmessage_received/message_senthooks; onlybefore_agent_start(user) andagent_end(assistant) persist as the canonical pathmessage_count— Moved increment from upsertON CONFLICTintoinsertMessage()so count only increases when a message is actually persistedgen_random_uuid()portability — Replaced with app-sidecrypto.randomUUID(), removing Postgres <13 / pgcrypto dependencydescribe.skipIf(!shouldRun)whereshouldRun = !!process.env.DATABASE_URL; removed hardcoded localhost fallbackCI TypeScript error fixes
db.ts— Typedvaluesarray as(string | number)[]; cast metadata aspostgres.JSONValueindex.ts— AddedAgentMessagetype and proper type narrowing forevent.messages(unknown[]in plugin SDK)auth-choice-options.ts— Pre-existing upstream"vllm"type error (not in scope)Verification
pnpm checkpasses (format + typecheck + lint — 0 errors, 0 warnings)DATABASE_URLPRD location
docs/refactor/persist-postgres-pr-fixes.md— includes per-issue fix proposals, acceptance criteria, and a P0–P3 priority matrix with status tracking.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.