Skip to content

fix(memory): search original workstream text values - #178

Open
rudycelekli wants to merge 1 commit into
Merit-Systems:mainfrom
rudycelekli:fix/find-original-workstream-text
Open

rudycelekli wants to merge 1 commit into
Merit-Systems:mainfrom
rudycelekli:fix/find-original-workstream-text

Conversation

@rudycelekli

Copy link
Copy Markdown

Summary

Find workstream text as it was saved, including quoted report titles, Windows source paths and multiline notes.

workstreams__find currently searches a JSON serialization of the stored content. JSON adds escape characters to quotes, backslashes and newlines, so querying the original saved text returns no record. The ID search and literal SQL wildcard escaping already work.

Search the original string values with PostgreSQL JSON path extraction before applying the existing case-insensitive literal ILIKE pattern. This includes nested source references and observations. Keep filtering inside the database query so the existing 20-record page, offset and ordering still apply to matching records.

Native reproduction and controls

The regression invokes the actual memory provider's save and find tools using an owned interactive memory context, real PGlite/Drizzle and committed migrations. Only the database driver getter is replaced; SQL results and ordering are real. Ordinary inputs are a quoted report title, a Windows document source path and two-line notes, accepted by the shipped save schema.

  • Exact unchanged production source with the final test fixture: 4 fail / 9 pass. All three saved text lookups return no record; the matching-text pagination case also fails. Existing memory controls and the new plain-text/literal %/_ control pass.
  • Patched source with that same fixture: 13/13 pass. Matching text is found, 21 matching records paginate as 20 + 1 without duplicate IDs, and ID search, literal wildcard escaping, revision/capacity/forgetting and existing provider behavior retain their controls.
  • Focused source/test Oxlint: passes with the repository's current configuration. Initial test typing and await-loop lint errors were corrected; the earlier failed command and logs are retained.

Required verification passed on this exact signed source:

  • Unchanged author-fork Checks workflow: frozen install, all six check tasks, 95 files / 881 tests, and complete Eve runtime checks (two mock-model evaluations, thirteen gates, cleanup completed). Its merge checkout has the same tree as the signed source; no workflow change.
  • Supplementary author-fork production build: checks out the exact source SHA, frozen install, genuine pnpm build / Next build with TypeScript and all 14 generated static pages, cache miss, successful cleanup. Public synthetic environment fixtures only; no deployment or live services.

Full build/check/runtime were run on hosted Linux because local disk exhaustion and local Docker cleanup prevented reliable local full gates. Upstream CI may still require maintainer authorization and is not claimed green.

Scope and overlap

One SQL predicate change and five regression cases in the existing owning test file. No schema, migration, dependency, workflow or production test seam changes. Searching text values replaces searching JSON encoding and structural key names; ID matching remains separate.

All 19 current open PR full bodies and file lists were screened: none touch workstream files. The most recent 100 closed PR bodies identify merged #136 as the original workstream feature; it introduced the current serialized-JSON search and does not contain this repair. This is not a live model, HTTP authentication, deployed PostgreSQL or UI test.

AI assistance was used for investigation, implementation, tests and review under the submitting account. Signed DCO commit included.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>

This branch has not been deployed

No deployments
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