Skip to content

feat(memory): Drizzle/Postgres ChatMemory subpath - #1827

Merged
EmersonBraun merged 11 commits into
mainfrom
EmersonBraun/ch-c-memory-pg
Oct 8, 2026
Merged

EmersonBraun merged 11 commits into
mainfrom
EmersonBraun/ch-c-memory-pg

Conversation

@EmersonBraun

Copy link
Copy Markdown
Member

Trilha 04, etapa 2 (RF-12–16).

  • Subpath opcional @agentskit/memory/postgres: ChatMemory sobre Drizzle + pg (client por request em Workers; pool em Node), schema/SQL exportados, isolamento tenant/sessão, preservação de ContentPart, política de retenção documentada.
  • drizzle-orm e pg como peers opcionais; sem mudança de configuração global do monorepo (resolução de tipos React investigada em docs/memory-react-resolution-ch-c3.md).
  • Changeset.

Evidência local: 242 testes do memory (incl. Postgres 16 real em Node e workerd), ratchets, pnpm test 77/77, quality gates 52/52, doc-bridge. Relatórios: docs/memory-postgres-validation.md, docs/memory-react-resolution-ch-c3.md.

Draft: sem release até autorização.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Lighthouse

URL Performance Accessibility Best practices SEO
http://127.0.0.1:3000/ 51 100 96 100
http://127.0.0.1:3000/docs 79 100 96 100
http://127.0.0.1:3000/docs/get-started/getting-started/quickstart 84 100 96 100
http://127.0.0.1:3000/stack 96 100 96 100
http://127.0.0.1:3000/showcase 96 100 96 100

Run by .github/workflows/lighthouse.yml.

@EmersonBraun

Copy link
Copy Markdown
Member Author

Investigação PR-CI: os advisories atuais do audit atingem versões já presentes no lockfile da main 0e1c1aa92e69f29f41241e49753ecab8ae279119: source-map-js 1.2.1, seroval 1.5.4, shell-quote 1.10.0. O último CI equivalente da main passou antes destes advisories; não existe run de Dependency Review na main, pois esse workflow é exclusivo de PRs. Portanto a classificação como herdado vem da comparação do lockfile, e não de um suposto audit reprovado na main.

A correção de segurança será um commit separado com overrides de versões corrigidas e lockfile atualizado, sem alterar severidades, allowlists, budgets ou gates. A main não será modificada por esta tarefa.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Lighthouse

URL Performance Accessibility Best practices SEO
http://127.0.0.1:3000/ 57 100 96 100
http://127.0.0.1:3000/docs 85 100 96 100
http://127.0.0.1:3000/docs/get-started/getting-started/quickstart 83 100 96 100
http://127.0.0.1:3000/stack 96 100 96 100
http://127.0.0.1:3000/showcase 95 100 96 100

Run by .github/workflows/lighthouse.yml.

@EmersonBraun

Copy link
Copy Markdown
Member Author

CI final verde em ec3311330f79601dafae7dcaede8525983ac5293: CI, audit e todos os demais checks ativos passaram; agregador CodeQL NEUTRAL. O PR permanece em rascunho.

As três versões vulneráveis são herdadas da main, conforme lockfile e evidência de main descritos no comentário anterior. O commit separado ec331133 fixa seroval 1.6.8, source-map-js 1.2.2 e shell-quote 1.11.0, com delta mínimo de lockfile; audit instalado e remoto passaram sem alterar waiver/allowlist.

O pre-push normal concluiu quality gates, lint e build; um hook anterior foi interrompido somente para atender a serialização solicitada e foi integralmente reexecutado. Nenhum gate/budget foi relaxado e não houve merge/release.

@EmersonBraun
EmersonBraun marked this pull request as ready for review October 7, 2026 13:12
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Lighthouse

URL Performance Accessibility Best practices SEO
http://127.0.0.1:3000/ 52 100 96 100
http://127.0.0.1:3000/docs 83 100 96 100
http://127.0.0.1:3000/docs/get-started/getting-started/quickstart 87 100 96 100
http://127.0.0.1:3000/stack 96 100 96 100
http://127.0.0.1:3000/showcase 92 100 96 100

Run by .github/workflows/lighthouse.yml.

maxMessages now cuts only at a user turn boundary and keeps the leading
system prompt, so a user question is never split from its answer, tool
call/result groups stay together, an in-progress turn is kept whole and a
history without a user turn is never emptied.
@EmersonBraun

Copy link
Copy Markdown
Member Author

Review follow-up (C2): maxMessages now cuts only at user turn boundaries and keeps the leading system prompt. No user/assistant or tool call/result split, in-progress turns kept whole, tool-only history never emptied. Contract tests updated (PG16 local run green), all 52 quality gates and memory package tests pass.

…ory-pg

# Conflicts:
#	.doc-bridge/capabilities.json
#	.doc-bridge/index.json
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Lighthouse

URL Performance Accessibility Best practices SEO
http://127.0.0.1:3000/ 59 100 96 100
http://127.0.0.1:3000/docs 82 100 96 100
http://127.0.0.1:3000/docs/get-started/getting-started/quickstart 81 100 96 100
http://127.0.0.1:3000/stack 94 100 96 100
http://127.0.0.1:3000/showcase 94 100 96 100

Run by .github/workflows/lighthouse.yml.

@EmersonBraun
EmersonBraun merged commit 2545678 into main Oct 8, 2026
32 checks passed
@EmersonBraun
EmersonBraun deleted the EmersonBraun/ch-c-memory-pg branch October 8, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant