Skip to content

fix(learnings): preserve current entries in cross-project search#1619

Open
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1618-learnings-cross-project
Open

fix(learnings): preserve current entries in cross-project search#1619
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1618-learnings-cross-project

Conversation

@jbetala7
Copy link
Copy Markdown
Contributor

Fixes #1618

Summary

  • tag learnings JSONL rows by source file before parsing them
  • apply the cross-project trust gate only to rows loaded from other projects
  • add regressions for current-project observed entries and trusted/untrusted foreign entries

Root cause

gstack-learnings-search --cross-project inferred cross-project rows with !line.includes(slug). Current-project learnings do not normally include the project slug in their JSON body, so observed/inferred current learnings with trusted:false were treated as foreign and dropped.

Verification

  • bun test test/gstack-learnings-search.test.ts
  • bun test test/learnings.test.ts test/gstack-learnings-search.test.ts
  • direct clean-home repro: --cross-project --query current now prints the current observed learning, while --query foreign only prints the trusted user-stated foreign learning
  • git diff --check origin/main...HEAD
  • git merge-tree --write-tree HEAD origin/main

Collision check

Searched open issues/PRs for cross-project learnings, gstack-learnings-search cross-project trusted, current project learnings --cross-project, cross-project trust gate learnings, gstack-learnings-search --cross-project, bin/gstack-learnings-search, and issue #1618.

Open PR #940 touches bin/gstack-learnings-search, but it retains the same line.includes(slug) cross-project classification and is about legacy schema normalization, so it does not cover this bug.

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.

gstack-learnings-search --cross-project hides current project observed learnings

1 participant