Skip to content

refactor: memory improvements#35

Merged
pedronauck merged 8 commits into
mainfrom
mem-improvs
Apr 18, 2026
Merged

refactor: memory improvements#35
pedronauck merged 8 commits into
mainfrom
mem-improvs

Conversation

@pedronauck
Copy link
Copy Markdown
Member

@pedronauck pedronauck commented Apr 18, 2026

Summary by CodeRabbit

  • New Features
    • Memory search and reindex via CLI and API; durable-memory recall prepends relevant memories to prompts without altering stored user messages.
  • Improvements
    • Memory health now includes catalog stats (indexed/orphaned files, last reindex); memory backed by an SQLite-derived catalog for more reliable search.
    • Prompt handling can be augmented with memory recall for richer dispatch.
  • API Improvements
    • New REST endpoints: GET /api/memory/search and POST /api/memory/reindex.
  • CLI
    • Added memory search and memory reindex commands.
  • Tests
    • Expanded unit, integration, and end-to-end tests covering memory search, reindex, health, and prompt augmentation.

@pedronauck pedronauck self-assigned this Apr 18, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bad8ab04-6690-409f-a81e-42c7b74c4473

📥 Commits

Reviewing files that changed from the base of the PR and between 07df2ad and f600846.

⛔ Files ignored due to path filters (5)
  • .compozy/tasks/mem-improvs/reviews-004/_meta.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-004/issue_001.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-004/issue_002.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-004/issue_003.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-004/issue_004.md is excluded by !**/*.md
📒 Files selected for processing (4)
  • internal/memory/store.go
  • internal/memory/store_test.go
  • magefile.go
  • magefile_test.go

Walkthrough

Adds an SQLite-backed FTS5 durable-memory catalog with Search/Reindex APIs and CLI commands, integrates a recall augmenter into session prompt dispatch, records memory operation logs in the global DB, and updates numerous tests, routes, store/catalog, and tooling to support the feature.

Changes

Cohort / File(s) Summary
Dependency
go.mod
Moved github.com/gorilla/websocket v1.5.4-... from indirect require to direct require.
API Contracts
internal/api/contract/contract.go
Added MemoryReindexRequest and expanded MemoryHealthPayload with config/catalog/indexing fields.
HTTP/UDS Handlers & Routes
internal/api/core/memory.go, internal/api/httpapi/routes.go, internal/api/udsapi/routes.go, internal/api/httpapi/handlers_test.go, internal/api/udsapi/handlers_test.go
Added SearchMemory and ReindexMemory handlers; registered GET /api/memory/search and POST /api/memory/reindex; health now includes memory stats; tests updated.
CLI Client & Commands
internal/cli/client.go, internal/cli/memory.go, internal/cli/*_test.go, internal/cli/helpers_test.go
Extended DaemonClient with SearchMemory/ReindexMemory and HTTP implementations; added memory search and memory reindex commands and tests; added request helper memorySearchValues.
Memory Types, Store & Catalog
internal/memory/types.go, internal/memory/store.go, internal/memory/catalog.go, internal/memory/store_test.go
Added cross-layer types and Backend interface; Store supports options incl. WithCatalogDatabasePath; implemented SQLite FTS5 catalog, Search/Reindex/HealthStats, derived sync logic, and many store tests.
Recall & Session Integration
internal/memory/recall.go, internal/memory/staleness.go, internal/session/interfaces.go, internal/session/manager.go, internal/session/manager_prompt.go, internal/session/manager_test.go
Added NewRecallAugmenter, exported FreshnessWarning, PromptInputAugmenter type and manager option; manager augments driver prompt while preserving stored user message; tests added.
Daemon Boot & Wiring
internal/daemon/boot.go, internal/daemon/daemon.go
Initialize memory store with explicit catalog DB path and wire MemoryStore into session manager deps; session manager constructed with recall augmenter.
Global DB & Observability
internal/store/globaldb/global_db.go, internal/store/globaldb/global_db_observe.go, internal/store/globaldb/global_db_test.go
Added memory_operation_log table and indexes; ListEventSummaries unions memory operations with event summaries and enforces deterministic ordering; tests updated.
Daemon E2E & Test Harness
internal/daemon/daemon_memory_e2e_integration_test.go, internal/daemon/daemon_test.go, internal/testutil/e2e/runtime_harness.go, internal/testutil/e2e/...
Added end-to-end memory CLI/HTTP parity and recall tests; RunInDir helpers; test fixtures now include index-backed documents.
Prompt Assembler & Tests
internal/memory/assembler.go, internal/memory/assembler_test.go
Added memory CLI commands to injected prompt help; updated tests to create stub documents referenced by indexes.
Runtime & Build Tooling
magefile.go, magefile_test.go
Pinned tool versions; added context-aware command helpers and race-enabled go runner; tests for helpers.
Web & Site
packages/site/*, web/src/components/...stories.tsx, packages/site/app/global.css, packages/site/app/global.test.ts, packages/site/source.config.ts
MDX theming change, CSS selector tweak and test; removed tags: ["autodocs"] from multiple Storybook stories.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CLI
    participant HTTPClient as "HTTP Client"
    participant APIHandler as "API Handler\n(SearchMemory)"
    participant Store as "Memory Store"
    participant Catalog as "SQLite Catalog\n(FTS5)"

    User->>CLI: memory search "query"
    CLI->>HTTPClient: SearchMemory(ctx, "query", opts)
    HTTPClient->>APIHandler: GET /api/memory/search?q=...&scope=...&workspace=...
    APIHandler->>Store: Search(ctx, "query", SearchOptions)
    Store->>Catalog: Query FTS5 index
    Catalog-->>Store: []SearchResult
    Store-->>APIHandler: []SearchResult
    APIHandler-->>HTTPClient: JSON response
    HTTPClient-->>CLI: []MemorySearchRecord
    CLI-->>User: Formatted results
Loading
sequenceDiagram
    actor User
    participant Session as "Session Manager"
    participant Augmenter as "Recall Augmenter"
    participant Store as "Memory Store"
    participant Catalog as "SQLite Catalog\n(FTS5)"
    participant Driver as "LLM Driver"

    User->>Session: Send prompt "user message"
    Session->>Augmenter: PromptInputAugmenter(ctx, session, "user message")
    Augmenter->>Store: Search(ctx, "user message", SearchOptions{Workspace})
    Store->>Catalog: Query FTS5 + scope filters
    Catalog-->>Store: []SearchResult
    Store-->>Augmenter: []SearchResult
    Augmenter->>Augmenter: Format recall block (names, snippets, freshness)
    Augmenter-->>Session: "Relevant durable memory...\n\nUser message: user message"
    Session->>Driver: Prompt(ctx, acp.PromptRequest{Message: augmented})
    Driver-->>Session: LLM response
    Note over Session: Stored user_message remains unchanged
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.52% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'refactor: memory improvements' is vague and generic, using non-descriptive terms that don't convey the specific, substantial changes made in this changeset. Consider a more specific title that captures the primary changes, such as: 'feat: add memory search and reindex APIs with catalog-backed storage' or 'feat: implement SQLite-backed memory catalog with search and CLI commands'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (4)
internal/daemon/daemon_test.go (1)

3146-3170: Extract the memory fixture serializer instead of duplicating raw frontmatter.

This helper now embeds the same document shape already serialized in internal/daemon/daemon_memory_e2e_integration_test.go:398-408. Reusing that formatter, or extracting a shared helper, will keep both test suites aligned if frontmatter fields or newline handling change.

♻️ Proposed cleanup
 	writeDaemonFile(
 		t,
 		filepath.Join(globalDir, "global.md"),
-		`---
-name: Global
-description: global note
-type: user
----
-
-global note
-`,
+		memoryDocument("Global", "global note", memory.MemoryTypeUser, "global note"),
 	)
 	writeDaemonFile(t, filepath.Join(globalDir, "MEMORY.md"), "- [Global](global.md) - global note")
 	writeDaemonFile(
 		t,
 		filepath.Join(workspace, aghconfig.DirName, "memory", "workspace.md"),
-		`---
-name: Workspace
-description: workspace note
-type: project
----
-
-workspace note
-`,
+		memoryDocument("Workspace", "workspace note", memory.MemoryTypeProject, "workspace note"),
 	)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/daemon/daemon_test.go` around lines 3146 - 3170, The tests duplicate
raw frontmatter when calling writeDaemonFile to create memory fixtures; instead
reuse or extract the existing memory fixture serializer used in
internal/daemon/daemon_memory_e2e_integration_test.go (the formatter that builds
the serialized frontmatter/document used at lines ~398-408) so both suites share
the same generator. Update the calls to writeDaemonFile in daemon_test.go to
call that shared helper (or move the serializer into a test helper function) to
produce the same serialized YAML frontmatter and body for the "Global" and
"Workspace" fixtures, ensuring consistent newline/field formatting across tests.
go.mod (1)

17-17: Confirm whether HTTPS proxy functionality in the unreleased gorilla/websocket commit is required.

The pinned pseudo-version v1.5.4-0.20250319132907-e064f32e3674 points to an unreleased commit (23 commits ahead of v1.5.3, the latest stable release). This commit implements HTTPS proxy functionality. If this feature is not required by this PR, prefer the latest tagged release v1.5.3 to maintain better provenance tracking and easier vulnerability management.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 17, The dependency line for github.com/gorilla/websocket
currently pins an unreleased pseudo-version
(v1.5.4-0.20250319132907-e064f32e3674) that adds HTTPS proxy support; confirm
whether that HTTPS-proxy functionality is required for this PR and if not,
change the module version to the latest tagged release (v1.5.3) in the go.mod
entry for "github.com/gorilla/websocket", then run "go mod tidy" (and update
vendor/go.sum as needed) and run the project's tests to ensure nothing breaks;
if the HTTPS-proxy commit is required, add a short PR note documenting why the
unreleased pseudo-version (v1.5.4-0.20250319132907-e064f32e3674) is
intentionally used.
internal/store/globaldb/global_db_test.go (1)

1277-1328: Please cover the Limit > 0 branch too.

ListEventSummaries now has separate SQL for limited vs. unlimited merged results, but this test only exercises the unlimited path. Add a mixed-stream case with EventSummaryQuery{Limit: ...} so the new ordering logic across event_summaries and memory_operation_log is locked down as well.

As per coding guidelines, Focus on critical paths: workflow execution, state management, error handling.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/store/globaldb/global_db_test.go` around lines 1277 - 1328, The test
only exercised the unlimited path; add a limited-query case to
TestGlobalDBListEventSummariesIncludesMemoryOperations that calls
globalDB.ListEventSummaries(testutil.Context(t), EventSummaryQuery{Limit: <n>})
(e.g., 1 or 2) after writing the EventSummary via
globalDB.WriteEventSummary(...) and inserting the memory_operation_log row, then
assert the returned slice length matches the Limit and that ordering and fields
are correct across both sources (check summaries[i].Type and
summaries[i].SessionID to ensure memory entries appear with empty SessionID and
the most-recent items from event_summaries and memory_operation_log are merged
correctly). This locks down the Limit>0 merged-SQL path in ListEventSummaries.
internal/daemon/daemon_memory_e2e_integration_test.go (1)

21-21: Please wrap these E2E scenarios in t.Run("Should...") subtests.

Both tests pack several independent contract checks into one large flow, which makes failures harder to localize and drifts from the repository’s test shape. Splitting the main assertions into t.Run("Should ...") blocks would make regressions much easier to pinpoint.

As per coding guidelines, **/*_test.go: MUST use t.Run("Should...") pattern for ALL test cases`.

Also applies to: 225-225

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/daemon/daemon_memory_e2e_integration_test.go` at line 21, The test
function TestDaemonE2EMemoryCatalogCLIHTTPParityAndLegacyPathIsolation bundles
multiple independent E2E checks; refactor it to use t.Run("Should ...") subtests
for each distinct contract/assertion (e.g., CLI vs HTTP parity, legacy path
isolation) so failures are isolated; locate the test by the function name
TestDaemonE2EMemoryCatalogCLIHTTPParityAndLegacyPathIsolation and split its
sequential checks into separate t.Run("Should ...") blocks, moving
setup/teardown into outer scope or dedicated helper functions as needed to avoid
duplication.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/cli/memory.go`:
- Around line 170-177: The CLI currently enforces ExactArgs(1) and uses query :=
args[0], which breaks multi-word queries like "agh memory search auth rewrite";
change the command's Args from cobra.ExactArgs(1) to cobra.MinimumNArgs(1),
replace any direct use of args[0] with query := strings.Join(args, " "), and add
an import for "strings" if missing; apply the same change to the other memory
command mentioned (the block around the lines referenced 184-185) so both accept
and join multi-word queries.

In `@internal/memory/catalog.go`:
- Around line 529-535: The current buildCatalogMatchQuery uses
tokenizeSearchQuery terms unquoted, letting FTS5 treat words like
"and/or/not/near" as operators; update buildCatalogMatchQuery (and the similar
logic at the other block around lines 537-554) to wrap each token in double
quotes and join them with explicit AND (e.g., "\"token\" AND \"token\"") so
every token is treated as a literal phrase; reference the tokenizeSearchQuery
call to get tokens, map each token to a quoted form, and return
strings.Join(quotedTokens, " AND "), preserving existing error handling.

In `@internal/memory/recall.go`:
- Around line 41-46: The recall augmentation should be best-effort: when calling
target.Search(ctx, query, SearchOptions{Workspace: workspaceRoot, Limit:
maxRecallResults}) and receiving a non-nil err from the results, do not return
the error from this function; instead log the error (including context like
query and workspaceRoot) and continue execution with an empty/zero results set
so the function returns the original message; update the error-handling around
the results, err assignment to handle failures by logging and skipping recall
rather than returning err.

In `@internal/memory/store.go`:
- Around line 158-169: The commit currently performs the filesystem mutation
(fileutil.AtomicWriteFile / os.Remove) and then calls s.syncScope and
s.logCatalogEvent using context.Background(), causing derived-state failures to
surface as primary errors and making operations uncancellable; change these
mutation paths (the write/delete handlers that call s.syncScope and
s.logCatalogEvent) to accept and propagate the caller's context (use ctx as the
first parameter instead of context.Background()) and return the filesystem error
immediately while demoting any derived-state/catalog/index failures from
s.syncScope and s.logCatalogEvent to warnings or async repair (call s.warn or
enqueue a background repair task) so that sync/log failures do not cause the
main mutation to fail; update the signatures and all call sites for s.syncScope
and s.logCatalogEvent accordingly and remove context.Background() usages in
these paths.
- Around line 856-880: indexMatchesHeaders currently only verifies that each
filename appears once, allowing stale titles/descriptions to pass; update it to
validate that the on-disk index content exactly matches the Header metadata (not
just filenames). Specifically, while iterating lines using
firstMarkdownLinkTarget, also extract the link text (the markdown link label)
and any adjacent description text and compare them against Header.Title and
Header.Description for the corresponding Header entry; fail if any
title/description differs, if order/occurrence mismatches, or if any header is
missing, so the function enforces a strict canonical match between content and
the slice of Header structs.
- Around line 85-88: The Store type does not currently satisfy the Backend
interface because Backend declares LoadPromptIndex(scope Scope) (content string,
truncated bool, err error) while Store implements LoadIndex with the same
signature; add a compile-time assertion var _ Backend = (*Store)(nil) and fix
the mismatch by either renaming Store.LoadIndex to LoadPromptIndex or adding a
small shim method LoadPromptIndex(scope Scope) (string, bool, error) that simply
delegates to LoadIndex; ensure the assertion is placed near the Store type and
that the shim/rename preserves the original implementation and signature.

In `@internal/memory/types.go`:
- Around line 87-96: The Backend interface is inconsistent: Search and Reindex
already accept context.Context but List, Read, Write, Delete, and
LoadPromptIndex do not; update the Backend interface so all methods take
context.Context as the first parameter (change List(scope Scope) to List(ctx
context.Context, scope Scope), Read(scope Scope, filename string) to Read(ctx
context.Context, scope Scope, filename string), Write(scope Scope, filename
string, content []byte) to Write(ctx context.Context, scope Scope, filename
string, content []byte), Delete(scope Scope, filename string) to Delete(ctx
context.Context, scope Scope, filename string), and LoadPromptIndex(scope Scope)
to LoadPromptIndex(ctx context.Context, scope Scope) (and keep Search(ctx
context.Context, ...) and Reindex(ctx context.Context, ...) as-is); then update
all implementations and call sites to pass the ctx as the first argument and
adjust any tests or mock types (refer to the Backend interface and methods List,
Read, Write, Delete, LoadPromptIndex, Search, Reindex for locations to change).

In `@internal/testutil/e2e/runtime_harness.go`:
- Around line 829-836: The RunInDir behavior uses exec.Cmd.Dir which treats
relative paths as relative to the test process CWD; update CLIClient.RunInDir to
resolve relative workdir values against the harness base c.workdir: after
trimming workdir, if it's empty keep c.workdir; else if !filepath.IsAbs(workdir)
set cmd.Dir = filepath.Join(c.workdir, workdir) otherwise set cmd.Dir = workdir;
ensure you import "path/filepath" and preserve the existing fallback logic
around c.workdir and the use of execabs.CommandContext.

---

Nitpick comments:
In `@go.mod`:
- Line 17: The dependency line for github.com/gorilla/websocket currently pins
an unreleased pseudo-version (v1.5.4-0.20250319132907-e064f32e3674) that adds
HTTPS proxy support; confirm whether that HTTPS-proxy functionality is required
for this PR and if not, change the module version to the latest tagged release
(v1.5.3) in the go.mod entry for "github.com/gorilla/websocket", then run "go
mod tidy" (and update vendor/go.sum as needed) and run the project's tests to
ensure nothing breaks; if the HTTPS-proxy commit is required, add a short PR
note documenting why the unreleased pseudo-version
(v1.5.4-0.20250319132907-e064f32e3674) is intentionally used.

In `@internal/daemon/daemon_memory_e2e_integration_test.go`:
- Line 21: The test function
TestDaemonE2EMemoryCatalogCLIHTTPParityAndLegacyPathIsolation bundles multiple
independent E2E checks; refactor it to use t.Run("Should ...") subtests for each
distinct contract/assertion (e.g., CLI vs HTTP parity, legacy path isolation) so
failures are isolated; locate the test by the function name
TestDaemonE2EMemoryCatalogCLIHTTPParityAndLegacyPathIsolation and split its
sequential checks into separate t.Run("Should ...") blocks, moving
setup/teardown into outer scope or dedicated helper functions as needed to avoid
duplication.

In `@internal/daemon/daemon_test.go`:
- Around line 3146-3170: The tests duplicate raw frontmatter when calling
writeDaemonFile to create memory fixtures; instead reuse or extract the existing
memory fixture serializer used in
internal/daemon/daemon_memory_e2e_integration_test.go (the formatter that builds
the serialized frontmatter/document used at lines ~398-408) so both suites share
the same generator. Update the calls to writeDaemonFile in daemon_test.go to
call that shared helper (or move the serializer into a test helper function) to
produce the same serialized YAML frontmatter and body for the "Global" and
"Workspace" fixtures, ensuring consistent newline/field formatting across tests.

In `@internal/store/globaldb/global_db_test.go`:
- Around line 1277-1328: The test only exercised the unlimited path; add a
limited-query case to TestGlobalDBListEventSummariesIncludesMemoryOperations
that calls globalDB.ListEventSummaries(testutil.Context(t),
EventSummaryQuery{Limit: <n>}) (e.g., 1 or 2) after writing the EventSummary via
globalDB.WriteEventSummary(...) and inserting the memory_operation_log row, then
assert the returned slice length matches the Limit and that ordering and fields
are correct across both sources (check summaries[i].Type and
summaries[i].SessionID to ensure memory entries appear with empty SessionID and
the most-recent items from event_summaries and memory_operation_log are merged
correctly). This locks down the Limit>0 merged-SQL path in ListEventSummaries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f98aba77-f4ac-442c-92d7-a858f5c17e70

📥 Commits

Reviewing files that changed from the base of the PR and between 6b8bf9a and fb69281.

⛔ Files ignored due to path filters (6)
  • cliff.toml is excluded by !**/*.toml
  • go.sum is excluded by !**/*.sum
  • internal/testutil/acpmock/testdata/memory_recall_fixture.json is excluded by !**/*.json
  • openapi/agh.json is excluded by !**/*.json
  • packages/site/content/runtime/core/hooks/declaration.mdx is excluded by !**/*.mdx
  • web/src/generated/agh-openapi.d.ts is excluded by !**/generated/**
📒 Files selected for processing (34)
  • go.mod
  • internal/api/contract/contract.go
  • internal/api/core/memory.go
  • internal/api/httpapi/handlers_test.go
  • internal/api/httpapi/memory_test.go
  • internal/api/httpapi/routes.go
  • internal/api/udsapi/handlers_test.go
  • internal/api/udsapi/memory_test.go
  • internal/api/udsapi/routes.go
  • internal/cli/client.go
  • internal/cli/client_test.go
  • internal/cli/helpers_test.go
  • internal/cli/memory.go
  • internal/cli/memory_test.go
  • internal/daemon/boot.go
  • internal/daemon/daemon.go
  • internal/daemon/daemon_memory_e2e_integration_test.go
  • internal/daemon/daemon_test.go
  • internal/memory/assembler.go
  • internal/memory/assembler_test.go
  • internal/memory/catalog.go
  • internal/memory/recall.go
  • internal/memory/staleness.go
  • internal/memory/store.go
  • internal/memory/store_test.go
  • internal/memory/types.go
  • internal/session/interfaces.go
  • internal/session/manager.go
  • internal/session/manager_prompt.go
  • internal/session/manager_test.go
  • internal/store/globaldb/global_db.go
  • internal/store/globaldb/global_db_observe.go
  • internal/store/globaldb/global_db_test.go
  • internal/testutil/e2e/runtime_harness.go

Comment thread internal/cli/memory.go Outdated
Comment thread internal/memory/catalog.go
Comment thread internal/memory/recall.go
Comment thread internal/memory/store.go
Comment thread internal/memory/store.go Outdated
Comment thread internal/memory/store.go Outdated
Comment thread internal/memory/types.go
Comment thread internal/session/manager_prompt.go
Comment thread internal/testutil/e2e/runtime_harness.go
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/site/app/global.css (1)

185-192: ⚠️ Potential issue | 🟡 Minor

Prevent fenced blocks in lists/tables from receiving inline code styling.

At Line 185, the descendant selector still matches code inside pre when fenced blocks are nested under li/td/th, so block code can inherit inline chrome. Exclude pre code explicitly.

🎯 Suggested selector fix
-.site-doc-body :is(p, li, td, th, blockquote, h1, h2, h3, h4, h5, h6) code {
+.site-doc-body :is(p, li, td, th, blockquote, h1, h2, h3, h4, h5, h6) code:not(pre code) {
   border: 1px solid var(--color-divider);
   border-radius: 0.55rem;
   background: rgba(44, 44, 46, 0.78);
   padding-inline: 0.38rem;
   padding-block: 0.12rem;
   color: var(--color-text-primary);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/site/app/global.css` around lines 185 - 192, The current selector
".site-doc-body :is(p, li, td, th, blockquote, h1, h2, h3, h4, h5, h6) code"
unintentionally matches code inside fenced blocks (pre code); update that rule
so it excludes code that is a descendant of pre (e.g., only target inline code,
not pre code) by modifying the selector to explicitly exclude pre/code cases
(use a :not(pre) or otherwise exclude "pre code") so block code in fenced blocks
inside li/td/th will not receive the inline styling.
🧹 Nitpick comments (2)
internal/memory/store_test.go (2)

667-690: Prefer t.Run("Should...") blocks for these new single-case tests.

These additions are all standalone top-level cases. Wrapping them in named subtests would keep the file aligned with the repo’s test shape and make future expansion easier.

As per coding guidelines, MUST use t.Run("Should...") pattern for ALL test cases and Use table-driven tests with subtests (t.Run) as default in Go tests.

Also applies to: 791-847, 849-880, 882-928, 956-963

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/memory/store_test.go` around lines 667 - 690, Wrap the top-level
test TestStoreLoadPromptIndexViaBackendAlias into a named subtest using
t.Run("Should load prompt index via backend alias", func(t *testing.T) { ... })
and move the existing test body into that subtest (keep calls to
env.store.Write, backend.LoadPromptIndex and the assertions intact); similarly
convert the other single-case top-level tests in this file to follow the same
t.Run("Should...") subtest pattern so each becomes a named subtest rather than a
standalone test function.

791-847: Please add a partial-indexed health case here.

This test only exercises the cold-start path where both scopes are indexed together. It won't catch the case where the catalog already contains global rows and HealthStats() is asked about a workspace for the first time, which is where scope readiness can be skipped and stats get understated. A follow-up case that indexes global first and then checks a newly introduced workspace would protect that regression.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/memory/store_test.go` around lines 791 - 847, Add a new test case
(either extend TestStoreSearchAndReindex or add TestStoreHealthPartialIndexed)
that simulates a partially-indexed catalog: create the Store via
NewStore(...).ForWorkspace(workspaceRoot), call EnsureDirs(), Write a global
memory (ScopeGlobal) and run Reindex(ctx, ReindexOptions{}) or otherwise index
only global scope, then create a new workspace path with a workspace-scoped file
(ScopeWorkspace) but do NOT reindex that workspace; call HealthStats(ctx,
[]string{workspaceRoot}) and assert the returned stats account only for the
already-indexed global rows (e.g. IndexedFiles == 1), that orphaned files are
correct, and that the workspace-specific LastReindex is nil/indicates not
reindexed. Use the same helpers used in this file (mustMemoryContent, Reindex,
HealthStats, ScopeGlobal, ScopeWorkspace) to locate and implement the case.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/memory/store.go`:
- Around line 427-443: The current logic uses s.catalog.entryCount(ctx) and only
reindexes when the global count is zero, which skips initial indexing for a new
workspace if the catalog already has rows; change this to check counts per
requested scope/workspace and call s.reindexScopes for each missing scope: for
ScopeGlobal still check a global count and call s.reindexScopes(ctx,
ScopeGlobal, "") when its count==0, and for each filter where
filter.scope==ScopeWorkspace call a per-workspace count (e.g., a catalog method
that accepts a workspaceRoot or use a filtered query) and call
s.reindexScopes(ctx, ScopeWorkspace, filter.workspaceRoot) when that
workspace-specific count==0 so new workspaces get indexed and show up in
HealthStats.

In `@internal/testutil/e2e/runtime_harness_lifecycle_test.go`:
- Around line 113-135: The test function
TestCLIClientRunInDirResolvesRelativePathsAgainstBaseWorkdir should be converted
to use a named subtest: wrap the existing body in t.Run("Should resolve relative
paths against base workdir", func(t *testing.T) { ... }), keep the t.Parallel()
call inside that subtest (not at top level), and leave all references to
CLIClient, writeCLIScript, RunInDir and the assertions unchanged so behavior
remains identical; this satisfies the requirement to use the t.Run("Should...")
pattern for each case.

In `@magefile_test.go`:
- Around line 57-58: Rename the t.Run subtest titles in magefile_test.go to the
required "Should..." pattern without changing test logic—specifically update the
t.Run call currently titled "sets cgo for race commands without mutating the
input" to something like "Should set cgo for race commands without mutating the
input" (and likewise rename the other t.Run at the later occurrence around lines
83-84) while leaving the anonymous test function, t.Parallel(), and assertions
unchanged.

In `@magefile.go`:
- Around line 532-534: The function runRaceEnabledGoCommand currently returns
the raw error from runCommandInDirWithEnv without context; modify
runRaceEnabledGoCommand to capture the error from runCommandInDirWithEnv and, if
non-nil, return a wrapped error using fmt.Errorf that includes a short context
string (e.g., "runRaceEnabledGoCommand: failed to run 'go' with args %v: %w")
and the original error; reference the call to runCommandInDirWithEnv(".",
withRaceEnabledEnv(env), "go", args...) and ensure fmt is imported if not
already.
- Around line 86-88: Pin the tool module versions and add wrapped error context:
replace all occurrences of "gotest.tools/gotestsum@latest" (used near the run
invocation and the other two occurrences) with a specific version (e.g.
gotest.tools/gotestsum@<version>) and replace
"golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest" with
a fixed version as well; then in the function runRaceEnabledGoCommand change any
bare error returns to wrapped errors using fmt.Errorf with %w (e.g., return
fmt.Errorf("running race-enabled go command %v: %w", args, err)) so callers
receive contextualized errors.

---

Outside diff comments:
In `@packages/site/app/global.css`:
- Around line 185-192: The current selector ".site-doc-body :is(p, li, td, th,
blockquote, h1, h2, h3, h4, h5, h6) code" unintentionally matches code inside
fenced blocks (pre code); update that rule so it excludes code that is a
descendant of pre (e.g., only target inline code, not pre code) by modifying the
selector to explicitly exclude pre/code cases (use a :not(pre) or otherwise
exclude "pre code") so block code in fenced blocks inside li/td/th will not
receive the inline styling.

---

Nitpick comments:
In `@internal/memory/store_test.go`:
- Around line 667-690: Wrap the top-level test
TestStoreLoadPromptIndexViaBackendAlias into a named subtest using t.Run("Should
load prompt index via backend alias", func(t *testing.T) { ... }) and move the
existing test body into that subtest (keep calls to env.store.Write,
backend.LoadPromptIndex and the assertions intact); similarly convert the other
single-case top-level tests in this file to follow the same t.Run("Should...")
subtest pattern so each becomes a named subtest rather than a standalone test
function.
- Around line 791-847: Add a new test case (either extend
TestStoreSearchAndReindex or add TestStoreHealthPartialIndexed) that simulates a
partially-indexed catalog: create the Store via
NewStore(...).ForWorkspace(workspaceRoot), call EnsureDirs(), Write a global
memory (ScopeGlobal) and run Reindex(ctx, ReindexOptions{}) or otherwise index
only global scope, then create a new workspace path with a workspace-scoped file
(ScopeWorkspace) but do NOT reindex that workspace; call HealthStats(ctx,
[]string{workspaceRoot}) and assert the returned stats account only for the
already-indexed global rows (e.g. IndexedFiles == 1), that orphaned files are
correct, and that the workspace-specific LastReindex is nil/indicates not
reindexed. Use the same helpers used in this file (mustMemoryContent, Reindex,
HealthStats, ScopeGlobal, ScopeWorkspace) to locate and implement the case.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 702a0986-29c9-43b8-9603-a7ad2d1866ae

📥 Commits

Reviewing files that changed from the base of the PR and between fb69281 and 99e2ce6.

⛔ Files ignored due to path filters (60)
  • .compozy/tasks/mem-improvs/reviews-001/_meta.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_001.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_002.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_003.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_004.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_005.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_006.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_007.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_008.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_009.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_010.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_011.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_012.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-001/issue_013.md is excluded by !**/*.md
  • packages/site/content/runtime/cli-reference/index.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/agents/definitions.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/agents/providers.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/agents/spawning.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/automation/jobs.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/automation/triggers.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/automation/webhooks.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/bridges/overview.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/bridges/routing.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/bridges/setup.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/configuration/agent-md.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/configuration/config-toml.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/configuration/env-vars.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/configuration/file-locations.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/configuration/mcp-json.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/configuration/skill-md.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/extensions/develop.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/extensions/install.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/getting-started/first-agent.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/getting-started/installation.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/getting-started/quick-start.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/getting-started/web-ui.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/hooks/declaration.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/hooks/event-catalog.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/memory/best-practices.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/memory/dream.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/memory/scopes.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/memory/system.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/operations/daemon.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/operations/database.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/operations/production.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/operations/troubleshooting.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/overview/architecture.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/overview/comparison.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/overview/what-is-agh.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/sessions/events.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/sessions/lifecycle.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/sessions/permissions.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/sessions/resume.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/skills/bundled.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/skills/marketplace.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/skills/overview.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/skills/skill-md.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/workspaces/config-overlays.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/workspaces/multi-root.mdx is excluded by !**/*.mdx
  • packages/site/content/runtime/core/workspaces/resolver.mdx is excluded by !**/*.mdx
📒 Files selected for processing (26)
  • internal/cli/memory.go
  • internal/cli/memory_test.go
  • internal/daemon/daemon_memory_e2e_integration_test.go
  • internal/daemon/daemon_test.go
  • internal/memory/catalog.go
  • internal/memory/store.go
  • internal/memory/store_test.go
  • internal/session/manager_prompt.go
  • internal/session/manager_test.go
  • internal/store/globaldb/global_db_test.go
  • internal/testutil/e2e/runtime_harness.go
  • internal/testutil/e2e/runtime_harness_lifecycle_test.go
  • magefile.go
  • magefile_test.go
  • packages/site/app/global.css
  • packages/site/app/global.test.ts
  • packages/site/source.config.ts
  • web/src/components/design-system/stories/design-system-showcase.stories.tsx
  • web/src/components/design-system/stories/metric-strip.stories.tsx
  • web/src/components/design-system/stories/page-content.stories.tsx
  • web/src/components/design-system/stories/panel.stories.tsx
  • web/src/components/design-system/stories/pill.stories.tsx
  • web/src/components/design-system/stories/section-heading.stories.tsx
  • web/src/components/design-system/stories/status-dot.stories.tsx
  • web/src/components/design-system/stories/texture-canvas.stories.tsx
  • web/src/components/design-system/stories/toolbar.stories.tsx
💤 Files with no reviewable changes (9)
  • web/src/components/design-system/stories/toolbar.stories.tsx
  • web/src/components/design-system/stories/section-heading.stories.tsx
  • web/src/components/design-system/stories/status-dot.stories.tsx
  • web/src/components/design-system/stories/metric-strip.stories.tsx
  • web/src/components/design-system/stories/panel.stories.tsx
  • web/src/components/design-system/stories/design-system-showcase.stories.tsx
  • web/src/components/design-system/stories/texture-canvas.stories.tsx
  • web/src/components/design-system/stories/page-content.stories.tsx
  • web/src/components/design-system/stories/pill.stories.tsx
✅ Files skipped from review due to trivial changes (3)
  • packages/site/source.config.ts
  • packages/site/app/global.test.ts
  • internal/cli/memory.go
🚧 Files skipped from review as they are similar to previous changes (7)
  • internal/cli/memory_test.go
  • internal/store/globaldb/global_db_test.go
  • internal/session/manager_prompt.go
  • internal/testutil/e2e/runtime_harness.go
  • internal/session/manager_test.go
  • internal/daemon/daemon_memory_e2e_integration_test.go
  • internal/memory/catalog.go

Comment thread internal/memory/store.go Outdated
Comment thread internal/testutil/e2e/runtime_harness_lifecycle_test.go
Comment thread magefile_test.go Outdated
Comment thread magefile.go Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (1)
internal/memory/store.go (1)

168-169: ⚠️ Potential issue | 🟠 Major

Mutation follow-up still runs under context.Background().

Write/Delete now demote derived-state failures to warnings, but these helpers still do the follow-up DB/file work with context.Background(). If the catalog sync blocks, the caller has no way to cancel or bound it. Please thread a caller context into these paths, or use a bounded store-owned context. As per coding guidelines, Use context.Context as first argument to functions crossing runtime boundaries — avoid context.Background() outside main and focused tests.

Also applies to: 186-187, 770-795

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/memory/store.go` around lines 168 - 169, The follow-up mutation
helpers (s.syncScopeAfterMutation, s.logMutationEvent) are being invoked with
context.Background(), which prevents callers from cancelling blocking
catalog/file work; change these call sites in Write/Delete and the other
mentioned locations (around lines using s.syncScopeAfterMutation and
s.logMutationEvent) to accept and propagate a caller-provided context (add ctx
context.Context to the Write/Delete method signatures and to any internal
helpers that perform DB/file follow-up) or, if a caller context is not
available, create a store-owned bounded context (context.WithTimeout or
WithCancel stored on the store) and use that instead of context.Background();
update all call chains (including the methods that currently call
s.syncScopeAfterMutation and s.logMutationEvent) to pass the ctx through so
follow-up work is cancelable and bounded.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/memory/catalog.go`:
- Around line 317-319: The deferred calls currently do `_ = rows.Close()` (in
internal/memory/catalog.go where rows is used around the blocks at lines shown)
which suppress errors; update those defers to either check the returned error
from rows.Close() and handle/log it (e.g., using the package logger or returning
a wrapped error from the enclosing function), or add a brief justification
comment if it is provably safe to ignore because rows.Err() is already checked
after iteration; ensure you adjust the defer in both places (the defer around
rows at ~317-319 and the similar defer at ~408-410) so the error is not silently
discarded and reference the surrounding function name where you make the change.

In `@internal/memory/store.go`:
- Around line 618-632: ensureCatalogFilterReady currently treats
scopeEntryCount(...) == 0 as the only readiness signal and will call
reindexScopes every time a legitimately empty scope/workspace has zero rows;
instead add a persisted per-scope/workspace readiness marker in the
memory_catalog_state table and consult that marker in ensureCatalogFilterReady
before deciding to reindex. Specifically, modify ensureCatalogFilterReady to
first read a synced/readiness flag for the given filter.scope and
filter.workspaceRoot from memory_catalog_state, only fall back to calling
scopeEntryCount if the marker is missing, and after reindexScopes completes
successfully set the marker for that scope/workspace; update any codepaths that
create or refresh the catalog (reindexScopes) to write the marker (and
clear/update it on failures) so empty but-synced scopes do not reindex on every
Search/HealthStats call.
- Around line 327-343: In Search, validate the incoming query string (parameter
`query`) immediately after normalizing scope/workspace and before calling
`s.ensureCatalogReady` to avoid triggering a full catalog warm-up for empty or
punctuation-only inputs; reject tokenless queries (empty or that contain no
alphanumeric tokens) by returning a clear error. Also clamp the requested
`opts.Limit` into a server-side bounded value (e.g., min defaultSearchLimit and
maxSearchLimit) and assign that to `limit` before any work is done; update
references in this function (Search, SearchOptions, defaultSearchLimit) and add/
reuse a small helper (e.g., `isTokenlessQuery`) if helpful. Ensure the
validation and clamping occur prior to the `ensureCatalogReady` call so
expensive operations are avoided for invalid requests.

In `@magefile_test.go`:
- Around line 104-109: Add a sentinel error and switch the test to use
errors.Is/As: declare var errRaceEnabledGoCommand = errors.New("run race-enabled
go command") in magefile.go, change runRaceEnabledGoCommand to wrap that
sentinel when returning errors (e.g., use fmt.Errorf with %w to include args and
the underlying err), then in the test replace the strings.Contains checks with
errors.Is(err, errRaceEnabledGoCommand) to assert the sentinel is in the chain
and use errors.As(err, new(*exec.ExitError)) (or a typed variable) to assert the
underlying failure is an exec.ExitError.

---

Duplicate comments:
In `@internal/memory/store.go`:
- Around line 168-169: The follow-up mutation helpers (s.syncScopeAfterMutation,
s.logMutationEvent) are being invoked with context.Background(), which prevents
callers from cancelling blocking catalog/file work; change these call sites in
Write/Delete and the other mentioned locations (around lines using
s.syncScopeAfterMutation and s.logMutationEvent) to accept and propagate a
caller-provided context (add ctx context.Context to the Write/Delete method
signatures and to any internal helpers that perform DB/file follow-up) or, if a
caller context is not available, create a store-owned bounded context
(context.WithTimeout or WithCancel stored on the store) and use that instead of
context.Background(); update all call chains (including the methods that
currently call s.syncScopeAfterMutation and s.logMutationEvent) to pass the ctx
through so follow-up work is cancelable and bounded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be4f3fc6-864e-4e83-b473-b6411871d11f

📥 Commits

Reviewing files that changed from the base of the PR and between 99e2ce6 and 2a6607b.

⛔ Files ignored due to path filters (9)
  • .compozy/tasks/mem-improvs/reviews-002/_meta.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-002/issue_001.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-002/issue_002.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-002/issue_003.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-002/issue_004.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-002/issue_005.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-002/issue_006.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-002/issue_007.md is excluded by !**/*.md
  • docs/ideas/memory-gaps/README.md is excluded by !**/*.md
📒 Files selected for processing (6)
  • internal/memory/catalog.go
  • internal/memory/store.go
  • internal/memory/store_test.go
  • internal/testutil/e2e/runtime_harness_lifecycle_test.go
  • magefile.go
  • magefile_test.go
✅ Files skipped from review due to trivial changes (1)
  • internal/testutil/e2e/runtime_harness_lifecycle_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/memory/store_test.go

Comment thread internal/memory/catalog.go
Comment thread internal/memory/store.go
Comment thread internal/memory/store.go
Comment thread magefile_test.go Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/memory/store.go (1)

158-169: ⚠️ Potential issue | 🟠 Major

Reject writes to the derived MEMORY.md index.

Write(..., "MEMORY.md", ...) currently reports success, then syncScopeAfterMutation regenerates that same path from scanned headers and discards the caller payload. Because internal/extension/host_api.go:1006-1020 forwards storeHandle.Write() directly, API callers can get a success response for data that is immediately lost.

🐛 Proposed fix
 	path, err := s.pathFor(scope, filename)
 	if err != nil {
 		return err
 	}
+	if filepath.Base(path) == indexFilename {
+		return wrapValidationError(
+			"write memory",
+			filename,
+			errors.New("MEMORY.md is a derived index and cannot be written directly"),
+		)
+	}
 	if err := os.MkdirAll(filepath.Dir(path), dirPerm); err != nil {
 		return fmt.Errorf("memory: ensure directory %q: %w", filepath.Dir(path), err)
 	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/memory/store.go` around lines 158 - 169, Reject writes targeting the
derived index file ("MEMORY.md") before performing filesystem operations: in the
Write path (around s.pathFor, before os.MkdirAll/fileutil.AtomicWriteFile and
before calling syncScopeAfterMutation/logMutationEvent) detect if
filepath.Base(path) (or the incoming filename) equals "MEMORY.md" and return a
non-nil error (e.g. a formatted error indicating writes to the derived MEMORY.md
are rejected). This prevents reporting success for payloads that will be
immediately overwritten by syncScopeAfterMutation; keep the existing
normalization (scope.Normalize()) for the error context.
🧹 Nitpick comments (1)
magefile_test.go (1)

56-93: Prefer a table-driven shape for these env variants.

These two subtests are just input/output variations of the same behavior. A small table would remove the duplicated setup/assertion flow and make future env cases cheaper to add.

As per coding guidelines, Use table-driven tests with subtests (t.Run) as default.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@magefile_test.go` around lines 56 - 93, The test duplicates two similar
subtests for withRaceEnabledEnv; refactor TestWithRaceEnabledEnv into a
table-driven test: define a slice of test cases with fields (name, input
map[string]string, expect map[string]string, expectNoMutation bool), iterate
over cases and call t.Run(tc.name, func(t *testing.T){ t.Parallel(); got :=
withRaceEnabledEnv(tc.input); assert got values (CGO_ENABLED, CI, etc.) against
tc.expect; if tc.expectNoMutation verify the original input map was not mutated
and that adding to got does not affect input; include a case for nil input—this
removes duplicated setup/assertion and makes adding variants trivial.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/memory/store.go`:
- Around line 579-582: The code currently uses cleanDirPath(workspace) directly
which preserves an explicit "<workspace>/.agh/memory" suffix and causes
ForWorkspace(workspaceRoot) to resolve to "<workspace>/.agh/memory/.agh/memory";
fix by normalizing and stripping any trailing ".agh/memory" before using
workspaceRoot: after computing workspaceRoot := cleanDirPath(workspace) (and
after the deriveWorkspaceRoot fallback), detect if workspaceRoot refers inside
the memory subdir (compare against filepath.Join(".agh","memory") or use
strings.HasSuffix with filepath.Join) and if so set workspaceRoot to the parent
workspace directory (remove the ".agh/memory" suffix) so subsequent calls like
ForWorkspace(workspaceRoot), Search and Reindex operate on the correct root.
- Around line 415-424: The loop building catalogFilter for ScopeWorkspace should
normalize each incoming workspace string before deduping: call
normalizeScopeAndWorkspace (or the same normalization logic) on the trimmed
workspace to obtain the canonical workspaceRoot/scope, handle/skip any errors or
empty results, then use that normalized workspaceRoot for the seen map and for
constructing catalogFilter{scope: ScopeWorkspace, workspaceRoot: normalized}.
Replace the current raw-trim-and-dedupe flow (variables seen, trimmed, filters
append) so duplicates like "/repo/app" and "/repo/app/.agh/memory" collapse to
the same normalized workspaceRoot.

In `@magefile.go`:
- Around line 537-542: The helper runRaceEnabledGoCommand should accept a
context and pass it down to runCommandInDirWithEnv which in turn must use
exec.CommandContext instead of exec.Command so subprocesses are cancellable;
update function signatures (runRaceEnabledGoCommand, runCommandInDirWithEnv) to
include ctx context.Context and thread ctx through the call chain. Also fix the
error wrapping in runRaceEnabledGoCommand to use a single %w wrap and include
the args in the message (e.g., fmt.Errorf("race-enabled go command %v: %w",
args, err)) so only the underlying error is wrapped and the args are included as
context. Ensure all call sites are updated to provide a context.

---

Outside diff comments:
In `@internal/memory/store.go`:
- Around line 158-169: Reject writes targeting the derived index file
("MEMORY.md") before performing filesystem operations: in the Write path (around
s.pathFor, before os.MkdirAll/fileutil.AtomicWriteFile and before calling
syncScopeAfterMutation/logMutationEvent) detect if filepath.Base(path) (or the
incoming filename) equals "MEMORY.md" and return a non-nil error (e.g. a
formatted error indicating writes to the derived MEMORY.md are rejected). This
prevents reporting success for payloads that will be immediately overwritten by
syncScopeAfterMutation; keep the existing normalization (scope.Normalize()) for
the error context.

---

Nitpick comments:
In `@magefile_test.go`:
- Around line 56-93: The test duplicates two similar subtests for
withRaceEnabledEnv; refactor TestWithRaceEnabledEnv into a table-driven test:
define a slice of test cases with fields (name, input map[string]string, expect
map[string]string, expectNoMutation bool), iterate over cases and call
t.Run(tc.name, func(t *testing.T){ t.Parallel(); got :=
withRaceEnabledEnv(tc.input); assert got values (CGO_ENABLED, CI, etc.) against
tc.expect; if tc.expectNoMutation verify the original input map was not mutated
and that adding to got does not affect input; include a case for nil input—this
removes duplicated setup/assertion and makes adding variants trivial.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ea973bf4-5e8b-4d87-a4b3-c5b6aea6e9c2

📥 Commits

Reviewing files that changed from the base of the PR and between 2a6607b and 07df2ad.

⛔ Files ignored due to path filters (5)
  • .compozy/tasks/mem-improvs/reviews-003/_meta.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-003/issue_001.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-003/issue_002.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-003/issue_003.md is excluded by !**/*.md
  • .compozy/tasks/mem-improvs/reviews-003/issue_004.md is excluded by !**/*.md
📒 Files selected for processing (5)
  • internal/memory/catalog.go
  • internal/memory/store.go
  • internal/memory/store_test.go
  • magefile.go
  • magefile_test.go
✅ Files skipped from review due to trivial changes (1)
  • internal/memory/catalog.go

Comment thread internal/memory/store.go Outdated
Comment thread internal/memory/store.go Outdated
Comment thread magefile.go Outdated
pedronauck added a commit that referenced this pull request May 26, 2026
## Release v0.0.1

This PR prepares the release of version v0.0.1.

### Changelog

## 0.0.1 - 2026-05-26



### Other Changes

- Lessons learned



### ♻️ Refactoring

- Project structure (#7)
- Kb improvements (#12)
- Rename spaces to channels (#17)
- Add extensions gaps (#21)
- Improve tool calls ui (#22)
- Remove web app header
- Module improvements (#29)
- Memory improvements (#35)
- Storybook for web and ui (#38)
- Enable AGH network by default for new installs (#57)
- Hermes adjustments (#69)
- Badges design (#84)
- Storybook scenario and logos gallery
- Migrate typescript tests (#114)
- Internal go packages (#120)
- Ui patterns (#127)
- Improve e2e tests (#130)
- Ui redesign
- Workspace isolation across runtime surfaces (#145)
- Prod ready applies (#162)
- Tool card ui (#164)
- Alpha on logo
- Prod ready features (#167)
- Thread sheet (#202)



### 🎉 Features

- Implement config foundation packages
- Implement sqlite store package
- Add ACP client package
- Add session lifecycle manager
- Implement observe package
- Add daemon composition root
- Add uds api server
- Implement cli package
- Add http api server
- Add system design
- Add foundation types, schemas, and layout shell for web client
- Add daemon health polling and agent sidebar systems for web client
- Add session system CRUD, streaming core, and session store for web
client
- Add chat view, messages, and composer tests for web client
- Add tool cards and renderers for web client
- Add file-backed memory store core
- Scaffold memory session seams
- Add memory dream consolidation service
- Wire memory assembler into daemon
- Add memory api and cli
- New skills system (#1)
- Add workspace entity (#5)
- Add new skill capabilities (#8)
- Web ui v2 (#9)
- Improve hooks system (#10)
- Session resilience (#11)
- Add extensability (#13)
- Add automation (#16)
- Add channels (#14)
- Add network implementation (#15)
- Add network, bridges and automations web pages (#18)
- Ext registry (#20)
- Add core tasks (#19)
- Bridge adapters (#23)
- Add site (#26)
- Add ext refac and sandbox (#25)
- Settings ui (#37)
- Tasks ui (#36)
- Harness improvements (#44)
- Agent capabilities (#49)
- Redesign ui (#48)
- Unify capability (#53)
- Redesign network workspace (#59)
- Add task deletion and split session delete from stop (#58)
- Session provider selection (#60)
- Production grade adjustments (#66)
- Autonomous system (#75)
- Add agent session route (#80)
- Tools registry (#85)
- Agents soul (#88)
- Add network threads (#105)
- Orchestration improvements (#106)
- Memory v2 (#108)
- Agent categories (#113)
- Providers model (#118)
- Add canonical AGH bundled skill (#143)
- Onboarding and improvements (#198)
- Onboarding and improvements (#201)



### 🐛 Bug Fixes

- Review round
- Review rounds
- Resolve memory extensibility review batch
- Embed web into daemon
- Defaults agents
- Acp integration (#4)
- Lint errors
- Prd folder
- Remove orphan web actions and dead surfaces (#55)
- Qa testing and fixes (#73)
- New review rounds (#82)
- Security audit (#90)
- Release qa round (#95)
- Add missing tools (#141)
- New qa round (#147)
- Advanced qa round (#149)
- Homebrew tap
- Final review round (#151)
- Daemon healthy
- Reasoning models (#158)
- Lint errors (#160)
- Review round (#168)
- Release adjustments (#171)
- Stabilize release ci fixtures
- Stabilize release integration gate
- Stabilize release verify gates
- Stabilize release integration flows
- Stabilize release verify gates
- Stabilize main verify shutdown
- Ignore stale acpmock cancel
- Marketplace search focus and filtering (#193)
- Website video
- Workspace command select



### 📚 Documentation

- Update agents.md
- Update prd
- Update skills
- Update compozy tasks
- Update compozy
- Update compozy
- Add new skills
- Archive prd
- Update prds
- Update rfc
- Update prds
- Update prds
- Add automation prd
- Channels prd
- Update prd
- Update prd
- New prds
- Archive prds
- Bridges adapters prd
- Sandbox prd
- Update
- Archive prd
- Update
- Add new prd
- New design
- Update prd
- Archive prds
- Update prds
- Tasks-ui prd tasks
- Update prd
- Update design docs
- Agent capabilities prd
- Improve site docs
- Remove old design references
- Udpate
- Autonomous prd
- Update skills
- Blog design
- Agent sould prd
- Final qa plan
- Update
- Remove codex ledgers from gitignore
- Remove not needed files
- Udpate ledger
- Update cy-codex-loop skill
- Orchestration improves prd
- Update prds
- Orch improvs prd
- Memv2 prd
- Providers model prd
- Update refacs prd
- New design proposal
- Update rules
- Update skills
- New blog posts (#173)
- Format docs
- Remove old design files
- Remove old
- Skeeper update



### 📦 Build System

- Initial structure
- Commitlint
- Frontend base structure
- Update vscode settings
- Add subagents
- Coderabbit
- Prd and tooling
- Bun lock
- Lint tooling
- Copy.md and tooling adjusts
- Add repoclone rc
- Upgrade skeeper to v0.2.0
- Update go.mod
- Adopt task artifacts into skeeper
- Sync codex plans with skeeper
- Skeeper lock
- Skeeper lock
- New skills
- Skeeper lock
- Skeeper lock
- Skeeper lock
- Update deps and go
- Regenerate daytona sidecar assets for go 1.26.3
- Fix cliff
- Ignore docs on fmt
- Build web assets before goreleaser
- Extend release dry-run timeout



### 🔧 CI/CD

- Lint errors
- Fint release pr
- Fix goreleaser



### 🧪 Testing

- Add e2e tests (#27)
- Qa rounds (#78)
- Improve test suite (#138)
- Harden daemon-served restart reloads
- Harden daemon-served readiness waits
- Stabilize dashboard focus assertion
- Stabilize release integration gates
- Stabilize release e2e markers
- Stabilize release e2e flows

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This was referenced May 26, 2026
pedronauck added a commit that referenced this pull request May 26, 2026
## Release v0.0.1

This PR prepares the release of version v0.0.1.

### Changelog

## 0.0.1 - 2026-05-26



### Other Changes

- Lessons learned



### ♻️ Refactoring

- Project structure (#7)
- Kb improvements (#12)
- Rename spaces to channels (#17)
- Add extensions gaps (#21)
- Improve tool calls ui (#22)
- Remove web app header
- Module improvements (#29)
- Memory improvements (#35)
- Storybook for web and ui (#38)
- Enable AGH network by default for new installs (#57)
- Hermes adjustments (#69)
- Badges design (#84)
- Storybook scenario and logos gallery
- Migrate typescript tests (#114)
- Internal go packages (#120)
- Ui patterns (#127)
- Improve e2e tests (#130)
- Ui redesign
- Workspace isolation across runtime surfaces (#145)
- Prod ready applies (#162)
- Tool card ui (#164)
- Alpha on logo
- Prod ready features (#167)
- Thread sheet (#202)



### 🎉 Features

- Implement config foundation packages
- Implement sqlite store package
- Add ACP client package
- Add session lifecycle manager
- Implement observe package
- Add daemon composition root
- Add uds api server
- Implement cli package
- Add http api server
- Add system design
- Add foundation types, schemas, and layout shell for web client
- Add daemon health polling and agent sidebar systems for web client
- Add session system CRUD, streaming core, and session store for web
client
- Add chat view, messages, and composer tests for web client
- Add tool cards and renderers for web client
- Add file-backed memory store core
- Scaffold memory session seams
- Add memory dream consolidation service
- Wire memory assembler into daemon
- Add memory api and cli
- New skills system (#1)
- Add workspace entity (#5)
- Add new skill capabilities (#8)
- Web ui v2 (#9)
- Improve hooks system (#10)
- Session resilience (#11)
- Add extensability (#13)
- Add automation (#16)
- Add channels (#14)
- Add network implementation (#15)
- Add network, bridges and automations web pages (#18)
- Ext registry (#20)
- Add core tasks (#19)
- Bridge adapters (#23)
- Add site (#26)
- Add ext refac and sandbox (#25)
- Settings ui (#37)
- Tasks ui (#36)
- Harness improvements (#44)
- Agent capabilities (#49)
- Redesign ui (#48)
- Unify capability (#53)
- Redesign network workspace (#59)
- Add task deletion and split session delete from stop (#58)
- Session provider selection (#60)
- Production grade adjustments (#66)
- Autonomous system (#75)
- Add agent session route (#80)
- Tools registry (#85)
- Agents soul (#88)
- Add network threads (#105)
- Orchestration improvements (#106)
- Memory v2 (#108)
- Agent categories (#113)
- Providers model (#118)
- Add canonical AGH bundled skill (#143)
- Onboarding and improvements (#198)
- Onboarding and improvements (#201)



### 🐛 Bug Fixes

- Review round
- Review rounds
- Resolve memory extensibility review batch
- Embed web into daemon
- Defaults agents
- Acp integration (#4)
- Lint errors
- Prd folder
- Remove orphan web actions and dead surfaces (#55)
- Qa testing and fixes (#73)
- New review rounds (#82)
- Security audit (#90)
- Release qa round (#95)
- Add missing tools (#141)
- New qa round (#147)
- Advanced qa round (#149)
- Homebrew tap
- Final review round (#151)
- Daemon healthy
- Reasoning models (#158)
- Lint errors (#160)
- Review round (#168)
- Release adjustments (#171)
- Stabilize release ci fixtures
- Stabilize release integration gate
- Stabilize release verify gates
- Stabilize release integration flows
- Stabilize release verify gates
- Stabilize main verify shutdown
- Ignore stale acpmock cancel
- Marketplace search focus and filtering (#193)
- Website video
- Workspace command select



### 📚 Documentation

- Update agents.md
- Update prd
- Update skills
- Update compozy tasks
- Update compozy
- Update compozy
- Add new skills
- Archive prd
- Update prds
- Update rfc
- Update prds
- Update prds
- Add automation prd
- Channels prd
- Update prd
- Update prd
- New prds
- Archive prds
- Bridges adapters prd
- Sandbox prd
- Update
- Archive prd
- Update
- Add new prd
- New design
- Update prd
- Archive prds
- Update prds
- Tasks-ui prd tasks
- Update prd
- Update design docs
- Agent capabilities prd
- Improve site docs
- Remove old design references
- Udpate
- Autonomous prd
- Update skills
- Blog design
- Agent sould prd
- Final qa plan
- Update
- Remove codex ledgers from gitignore
- Remove not needed files
- Udpate ledger
- Update cy-codex-loop skill
- Orchestration improves prd
- Update prds
- Orch improvs prd
- Memv2 prd
- Providers model prd
- Update refacs prd
- New design proposal
- Update rules
- Update skills
- New blog posts (#173)
- Format docs
- Remove old design files
- Remove old
- Skeeper update



### 📦 Build System

- Initial structure
- Commitlint
- Frontend base structure
- Update vscode settings
- Add subagents
- Coderabbit
- Prd and tooling
- Bun lock
- Lint tooling
- Copy.md and tooling adjusts
- Add repoclone rc
- Upgrade skeeper to v0.2.0
- Update go.mod
- Adopt task artifacts into skeeper
- Sync codex plans with skeeper
- Skeeper lock
- Skeeper lock
- New skills
- Skeeper lock
- Skeeper lock
- Skeeper lock
- Update deps and go
- Regenerate daytona sidecar assets for go 1.26.3
- Fix cliff
- Ignore docs on fmt
- Build web assets before goreleaser
- Extend release dry-run timeout



### 🔧 CI/CD

- Lint errors
- Fint release pr
- Fix goreleaser
- Fix release



### 🧪 Testing

- Add e2e tests (#27)
- Qa rounds (#78)
- Improve test suite (#138)
- Harden daemon-served restart reloads
- Harden daemon-served readiness waits
- Stabilize dashboard focus assertion
- Stabilize release integration gates
- Stabilize release e2e markers
- Stabilize release e2e flows

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
pedronauck added a commit that referenced this pull request May 26, 2026
## Release v0.0.2

This PR prepares the release of version v0.0.2.

### Changelog

## 0.0.2 - 2026-05-26



### Other Changes

- Lessons learned



### ♻️ Refactoring

- Project structure (#7)
- Kb improvements (#12)
- Rename spaces to channels (#17)
- Add extensions gaps (#21)
- Improve tool calls ui (#22)
- Remove web app header
- Module improvements (#29)
- Memory improvements (#35)
- Storybook for web and ui (#38)
- Enable AGH network by default for new installs (#57)
- Hermes adjustments (#69)
- Badges design (#84)
- Storybook scenario and logos gallery
- Migrate typescript tests (#114)
- Internal go packages (#120)
- Ui patterns (#127)
- Improve e2e tests (#130)
- Ui redesign
- Workspace isolation across runtime surfaces (#145)
- Prod ready applies (#162)
- Tool card ui (#164)
- Alpha on logo
- Prod ready features (#167)
- Thread sheet (#202)



### 🎉 Features

- Implement config foundation packages
- Implement sqlite store package
- Add ACP client package
- Add session lifecycle manager
- Implement observe package
- Add daemon composition root
- Add uds api server
- Implement cli package
- Add http api server
- Add system design
- Add foundation types, schemas, and layout shell for web client
- Add daemon health polling and agent sidebar systems for web client
- Add session system CRUD, streaming core, and session store for web
client
- Add chat view, messages, and composer tests for web client
- Add tool cards and renderers for web client
- Add file-backed memory store core
- Scaffold memory session seams
- Add memory dream consolidation service
- Wire memory assembler into daemon
- Add memory api and cli
- New skills system (#1)
- Add workspace entity (#5)
- Add new skill capabilities (#8)
- Web ui v2 (#9)
- Improve hooks system (#10)
- Session resilience (#11)
- Add extensability (#13)
- Add automation (#16)
- Add channels (#14)
- Add network implementation (#15)
- Add network, bridges and automations web pages (#18)
- Ext registry (#20)
- Add core tasks (#19)
- Bridge adapters (#23)
- Add site (#26)
- Add ext refac and sandbox (#25)
- Settings ui (#37)
- Tasks ui (#36)
- Harness improvements (#44)
- Agent capabilities (#49)
- Redesign ui (#48)
- Unify capability (#53)
- Redesign network workspace (#59)
- Add task deletion and split session delete from stop (#58)
- Session provider selection (#60)
- Production grade adjustments (#66)
- Autonomous system (#75)
- Add agent session route (#80)
- Tools registry (#85)
- Agents soul (#88)
- Add network threads (#105)
- Orchestration improvements (#106)
- Memory v2 (#108)
- Agent categories (#113)
- Providers model (#118)
- Add canonical AGH bundled skill (#143)
- Onboarding and improvements (#198)
- Onboarding and improvements (#201)



### 🐛 Bug Fixes

- Review round
- Review rounds
- Resolve memory extensibility review batch
- Embed web into daemon
- Defaults agents
- Acp integration (#4)
- Lint errors
- Prd folder
- Remove orphan web actions and dead surfaces (#55)
- Qa testing and fixes (#73)
- New review rounds (#82)
- Security audit (#90)
- Release qa round (#95)
- Add missing tools (#141)
- New qa round (#147)
- Advanced qa round (#149)
- Homebrew tap
- Final review round (#151)
- Daemon healthy
- Reasoning models (#158)
- Lint errors (#160)
- Review round (#168)
- Release adjustments (#171)
- Stabilize release ci fixtures
- Stabilize release integration gate
- Stabilize release verify gates
- Stabilize release integration flows
- Stabilize release verify gates
- Stabilize main verify shutdown
- Ignore stale acpmock cancel
- Marketplace search focus and filtering (#193)
- Website video
- Workspace command select



### 📚 Documentation

- Update agents.md
- Update prd
- Update skills
- Update compozy tasks
- Update compozy
- Update compozy
- Add new skills
- Archive prd
- Update prds
- Update rfc
- Update prds
- Update prds
- Add automation prd
- Channels prd
- Update prd
- Update prd
- New prds
- Archive prds
- Bridges adapters prd
- Sandbox prd
- Update
- Archive prd
- Update
- Add new prd
- New design
- Update prd
- Archive prds
- Update prds
- Tasks-ui prd tasks
- Update prd
- Update design docs
- Agent capabilities prd
- Improve site docs
- Remove old design references
- Udpate
- Autonomous prd
- Update skills
- Blog design
- Agent sould prd
- Final qa plan
- Update
- Remove codex ledgers from gitignore
- Remove not needed files
- Udpate ledger
- Update cy-codex-loop skill
- Orchestration improves prd
- Update prds
- Orch improvs prd
- Memv2 prd
- Providers model prd
- Update refacs prd
- New design proposal
- Update rules
- Update skills
- New blog posts (#173)
- Format docs
- Remove old design files
- Remove old
- Skeeper update



### 📦 Build System

- Initial structure
- Commitlint
- Frontend base structure
- Update vscode settings
- Add subagents
- Coderabbit
- Prd and tooling
- Bun lock
- Lint tooling
- Copy.md and tooling adjusts
- Add repoclone rc
- Upgrade skeeper to v0.2.0
- Update go.mod
- Adopt task artifacts into skeeper
- Sync codex plans with skeeper
- Skeeper lock
- Skeeper lock
- New skills
- Skeeper lock
- Skeeper lock
- Skeeper lock
- Update deps and go
- Regenerate daytona sidecar assets for go 1.26.3
- Fix cliff
- Ignore docs on fmt
- Build web assets before goreleaser
- Extend release dry-run timeout



### 🔧 CI/CD

- Lint errors
- Fint release pr
- Fix goreleaser
- Fix release
- Fix release process



### 🧪 Testing

- Add e2e tests (#27)
- Qa rounds (#78)
- Improve test suite (#138)
- Harden daemon-served restart reloads
- Harden daemon-served readiness waits
- Stabilize dashboard focus assertion
- Stabilize release integration gates
- Stabilize release e2e markers
- Stabilize release e2e flows
- Improve suite speed

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
pedronauck added a commit that referenced this pull request May 27, 2026
## Release v0.0.2

This PR prepares the release of version v0.0.2.

### Changelog

## 0.0.2 - 2026-05-26



### Other Changes

- Lessons learned



### ♻️ Refactoring

- Project structure (#7)
- Kb improvements (#12)
- Rename spaces to channels (#17)
- Add extensions gaps (#21)
- Improve tool calls ui (#22)
- Remove web app header
- Module improvements (#29)
- Memory improvements (#35)
- Storybook for web and ui (#38)
- Enable AGH network by default for new installs (#57)
- Hermes adjustments (#69)
- Badges design (#84)
- Storybook scenario and logos gallery
- Migrate typescript tests (#114)
- Internal go packages (#120)
- Ui patterns (#127)
- Improve e2e tests (#130)
- Ui redesign
- Workspace isolation across runtime surfaces (#145)
- Prod ready applies (#162)
- Tool card ui (#164)
- Alpha on logo
- Prod ready features (#167)
- Thread sheet (#202)



### 🎉 Features

- Implement config foundation packages
- Implement sqlite store package
- Add ACP client package
- Add session lifecycle manager
- Implement observe package
- Add daemon composition root
- Add uds api server
- Implement cli package
- Add http api server
- Add system design
- Add foundation types, schemas, and layout shell for web client
- Add daemon health polling and agent sidebar systems for web client
- Add session system CRUD, streaming core, and session store for web
client
- Add chat view, messages, and composer tests for web client
- Add tool cards and renderers for web client
- Add file-backed memory store core
- Scaffold memory session seams
- Add memory dream consolidation service
- Wire memory assembler into daemon
- Add memory api and cli
- New skills system (#1)
- Add workspace entity (#5)
- Add new skill capabilities (#8)
- Web ui v2 (#9)
- Improve hooks system (#10)
- Session resilience (#11)
- Add extensability (#13)
- Add automation (#16)
- Add channels (#14)
- Add network implementation (#15)
- Add network, bridges and automations web pages (#18)
- Ext registry (#20)
- Add core tasks (#19)
- Bridge adapters (#23)
- Add site (#26)
- Add ext refac and sandbox (#25)
- Settings ui (#37)
- Tasks ui (#36)
- Harness improvements (#44)
- Agent capabilities (#49)
- Redesign ui (#48)
- Unify capability (#53)
- Redesign network workspace (#59)
- Add task deletion and split session delete from stop (#58)
- Session provider selection (#60)
- Production grade adjustments (#66)
- Autonomous system (#75)
- Add agent session route (#80)
- Tools registry (#85)
- Agents soul (#88)
- Add network threads (#105)
- Orchestration improvements (#106)
- Memory v2 (#108)
- Agent categories (#113)
- Providers model (#118)
- Add canonical AGH bundled skill (#143)
- Onboarding and improvements (#198)
- Onboarding and improvements (#201)



### 🐛 Bug Fixes

- Review round
- Review rounds
- Resolve memory extensibility review batch
- Embed web into daemon
- Defaults agents
- Acp integration (#4)
- Lint errors
- Prd folder
- Remove orphan web actions and dead surfaces (#55)
- Qa testing and fixes (#73)
- New review rounds (#82)
- Security audit (#90)
- Release qa round (#95)
- Add missing tools (#141)
- New qa round (#147)
- Advanced qa round (#149)
- Homebrew tap
- Final review round (#151)
- Daemon healthy
- Reasoning models (#158)
- Lint errors (#160)
- Review round (#168)
- Release adjustments (#171)
- Stabilize release ci fixtures
- Stabilize release integration gate
- Stabilize release verify gates
- Stabilize release integration flows
- Stabilize release verify gates
- Stabilize main verify shutdown
- Ignore stale acpmock cancel
- Marketplace search focus and filtering (#193)
- Website video
- Workspace command select



### 📚 Documentation

- Update agents.md
- Update prd
- Update skills
- Update compozy tasks
- Update compozy
- Update compozy
- Add new skills
- Archive prd
- Update prds
- Update rfc
- Update prds
- Update prds
- Add automation prd
- Channels prd
- Update prd
- Update prd
- New prds
- Archive prds
- Bridges adapters prd
- Sandbox prd
- Update
- Archive prd
- Update
- Add new prd
- New design
- Update prd
- Archive prds
- Update prds
- Tasks-ui prd tasks
- Update prd
- Update design docs
- Agent capabilities prd
- Improve site docs
- Remove old design references
- Udpate
- Autonomous prd
- Update skills
- Blog design
- Agent sould prd
- Final qa plan
- Update
- Remove codex ledgers from gitignore
- Remove not needed files
- Udpate ledger
- Update cy-codex-loop skill
- Orchestration improves prd
- Update prds
- Orch improvs prd
- Memv2 prd
- Providers model prd
- Update refacs prd
- New design proposal
- Update rules
- Update skills
- New blog posts (#173)
- Format docs
- Remove old design files
- Remove old
- Skeeper update



### 📦 Build System

- Initial structure
- Commitlint
- Frontend base structure
- Update vscode settings
- Add subagents
- Coderabbit
- Prd and tooling
- Bun lock
- Lint tooling
- Copy.md and tooling adjusts
- Add repoclone rc
- Upgrade skeeper to v0.2.0
- Update go.mod
- Adopt task artifacts into skeeper
- Sync codex plans with skeeper
- Skeeper lock
- Skeeper lock
- New skills
- Skeeper lock
- Skeeper lock
- Skeeper lock
- Update deps and go
- Regenerate daytona sidecar assets for go 1.26.3
- Fix cliff
- Ignore docs on fmt
- Build web assets before goreleaser
- Extend release dry-run timeout



### 🔧 CI/CD

- Lint errors
- Fint release pr
- Fix goreleaser
- Fix release
- Fix release process
- Fix release sync
- Decouple release dry-run npm auth
- Persist web assets git auth



### 🧪 Testing

- Add e2e tests (#27)
- Qa rounds (#78)
- Improve test suite (#138)
- Harden daemon-served restart reloads
- Harden daemon-served readiness waits
- Stabilize dashboard focus assertion
- Stabilize release integration gates
- Stabilize release e2e markers
- Stabilize release e2e flows
- Improve suite speed


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated web assets dependency to a newer version for improved
stability and performance.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/compozy/agh/pull/211?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
pedronauck added a commit that referenced this pull request May 27, 2026
## Release v0.0.2

This PR prepares the release of version v0.0.2.

### Changelog

## 0.0.2 - 2026-05-27



### Other Changes

- Lessons learned



### ♻️ Refactoring

- Project structure (#7)
- Kb improvements (#12)
- Rename spaces to channels (#17)
- Add extensions gaps (#21)
- Improve tool calls ui (#22)
- Remove web app header
- Module improvements (#29)
- Memory improvements (#35)
- Storybook for web and ui (#38)
- Enable AGH network by default for new installs (#57)
- Hermes adjustments (#69)
- Badges design (#84)
- Storybook scenario and logos gallery
- Migrate typescript tests (#114)
- Internal go packages (#120)
- Ui patterns (#127)
- Improve e2e tests (#130)
- Ui redesign
- Workspace isolation across runtime surfaces (#145)
- Prod ready applies (#162)
- Tool card ui (#164)
- Alpha on logo
- Prod ready features (#167)
- Thread sheet (#202)



### 🎉 Features

- Implement config foundation packages
- Implement sqlite store package
- Add ACP client package
- Add session lifecycle manager
- Implement observe package
- Add daemon composition root
- Add uds api server
- Implement cli package
- Add http api server
- Add system design
- Add foundation types, schemas, and layout shell for web client
- Add daemon health polling and agent sidebar systems for web client
- Add session system CRUD, streaming core, and session store for web
client
- Add chat view, messages, and composer tests for web client
- Add tool cards and renderers for web client
- Add file-backed memory store core
- Scaffold memory session seams
- Add memory dream consolidation service
- Wire memory assembler into daemon
- Add memory api and cli
- New skills system (#1)
- Add workspace entity (#5)
- Add new skill capabilities (#8)
- Web ui v2 (#9)
- Improve hooks system (#10)
- Session resilience (#11)
- Add extensability (#13)
- Add automation (#16)
- Add channels (#14)
- Add network implementation (#15)
- Add network, bridges and automations web pages (#18)
- Ext registry (#20)
- Add core tasks (#19)
- Bridge adapters (#23)
- Add site (#26)
- Add ext refac and sandbox (#25)
- Settings ui (#37)
- Tasks ui (#36)
- Harness improvements (#44)
- Agent capabilities (#49)
- Redesign ui (#48)
- Unify capability (#53)
- Redesign network workspace (#59)
- Add task deletion and split session delete from stop (#58)
- Session provider selection (#60)
- Production grade adjustments (#66)
- Autonomous system (#75)
- Add agent session route (#80)
- Tools registry (#85)
- Agents soul (#88)
- Add network threads (#105)
- Orchestration improvements (#106)
- Memory v2 (#108)
- Agent categories (#113)
- Providers model (#118)
- Add canonical AGH bundled skill (#143)
- Onboarding and improvements (#198)
- Onboarding and improvements (#201)



### 🐛 Bug Fixes

- Review round
- Review rounds
- Resolve memory extensibility review batch
- Embed web into daemon
- Defaults agents
- Acp integration (#4)
- Lint errors
- Prd folder
- Remove orphan web actions and dead surfaces (#55)
- Qa testing and fixes (#73)
- New review rounds (#82)
- Security audit (#90)
- Release qa round (#95)
- Add missing tools (#141)
- New qa round (#147)
- Advanced qa round (#149)
- Homebrew tap
- Final review round (#151)
- Daemon healthy
- Reasoning models (#158)
- Lint errors (#160)
- Review round (#168)
- Release adjustments (#171)
- Stabilize release ci fixtures
- Stabilize release integration gate
- Stabilize release verify gates
- Stabilize release integration flows
- Stabilize release verify gates
- Stabilize main verify shutdown
- Ignore stale acpmock cancel
- Marketplace search focus and filtering (#193)
- Website video
- Workspace command select



### 📚 Documentation

- Update agents.md
- Update prd
- Update skills
- Update compozy tasks
- Update compozy
- Update compozy
- Add new skills
- Archive prd
- Update prds
- Update rfc
- Update prds
- Update prds
- Add automation prd
- Channels prd
- Update prd
- Update prd
- New prds
- Archive prds
- Bridges adapters prd
- Sandbox prd
- Update
- Archive prd
- Update
- Add new prd
- New design
- Update prd
- Archive prds
- Update prds
- Tasks-ui prd tasks
- Update prd
- Update design docs
- Agent capabilities prd
- Improve site docs
- Remove old design references
- Udpate
- Autonomous prd
- Update skills
- Blog design
- Agent sould prd
- Final qa plan
- Update
- Remove codex ledgers from gitignore
- Remove not needed files
- Udpate ledger
- Update cy-codex-loop skill
- Orchestration improves prd
- Update prds
- Orch improvs prd
- Memv2 prd
- Providers model prd
- Update refacs prd
- New design proposal
- Update rules
- Update skills
- New blog posts (#173)
- Format docs
- Remove old design files
- Remove old
- Skeeper update



### 📦 Build System

- Initial structure
- Commitlint
- Frontend base structure
- Update vscode settings
- Add subagents
- Coderabbit
- Prd and tooling
- Bun lock
- Lint tooling
- Copy.md and tooling adjusts
- Add repoclone rc
- Upgrade skeeper to v0.2.0
- Update go.mod
- Adopt task artifacts into skeeper
- Sync codex plans with skeeper
- Skeeper lock
- Skeeper lock
- New skills
- Skeeper lock
- Skeeper lock
- Skeeper lock
- Update deps and go
- Regenerate daytona sidecar assets for go 1.26.3
- Fix cliff
- Ignore docs on fmt
- Build web assets before goreleaser
- Extend release dry-run timeout
- Fix release dry-run token contract



### 🔧 CI/CD

- Lint errors
- Fint release pr
- Fix goreleaser
- Fix release
- Fix release process
- Fix release sync
- Decouple release dry-run npm auth
- Persist web assets git auth
- Require npm auth before release merge



### 🧪 Testing

- Add e2e tests (#27)
- Qa rounds (#78)
- Improve test suite (#138)
- Harden daemon-served restart reloads
- Harden daemon-served readiness waits
- Stabilize dashboard focus assertion
- Stabilize release integration gates
- Stabilize release e2e markers
- Stabilize release e2e flows
- Improve suite speed


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
  * Updated dependencies to latest versions.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/compozy/agh/pull/214?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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