Skip to content

v0.7.4 - #8

Merged
kovtcharov merged 2 commits into
mainfrom
v0.7.4
Mar 20, 2025
Merged

kovtcharov merged 2 commits into
mainfrom
v0.7.4

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Mar 18, 2025 •

Copy link
Copy Markdown
Contributor
  • Agent Welcome Message and Other Improvements
  • Add color to logger messages
  • CLI Fix Stats and Improve OGA Setup
  • CLI Download Transcript
  • Update Installer Documentation
  • GAIA CLI ASR
  • ASR Improvements
  • Use lemonade-install to install OGA AMD deps
  • Use the public hybrid install
  • Improve CLI
  • Installer and Github Workflows Updates
  • Update Driver Check
  • DeepSeek R1 Support via Ollama
  • Documentation Updates
  • Kokoro TTS
  • GAIA Version
  • Fix Tests

@kovtcharov kovtcharov added the enhancement New feature or request label Mar 18, 2025
@kovtcharov
kovtcharov requested a review from vgodsoe March 18, 2025 22:36
@kovtcharov kovtcharov self-assigned this Mar 18, 2025
@kovtcharov
kovtcharov enabled auto-merge (squash) March 20, 2025 00:01
@kovtcharov
kovtcharov merged commit a8b8b6e into main Mar 20, 2025
@kovtcharov
kovtcharov deleted the v0.7.4 branch March 20, 2025 00:15
itomek pushed a commit that referenced this pull request Mar 12, 2026
- Agent Welcome Message and Other Improvements
- Add color to logger messages
- CLI Fix Stats and Improve OGA Setup
- CLI Download Transcript
- Update Installer Documentation
- GAIA CLI ASR
- ASR Improvements
- Use lemonade-install to install OGA AMD deps
- Use the public hybrid install
- Improve CLI
- Installer and Github Workflows Updates
- Update Driver Check
- DeepSeek R1 Support via Ollama
- Documentation Updates
- Kokoro TTS
- GAIA Version
- Fix Tests
kovtcharov-amd pushed a commit to zycaskevin/gaia that referenced this pull request Jul 8, 2026
…ry' (amd#1958)

A user could edit a memory, then lose it silently. When memory discovery
re-ran and its output was near-identical to a user-edited item, the
dedup merge relabeled that item's `source` from `user` to `discovery`. A
later `gaia memory --reset` — which deletes discovery-sourced items —
then wiped the user's edit. After this fix, a merge never downgrades a
`source='user'` item, so user-edited memories survive both discovery
re-runs and `--reset`, matching the spec guarantee that user-edited
memories are preserved.

Closes amd#1957

## Test plan

- [ ] `python -m pytest tests/unit/test_memory_store.py -x` passes
- [ ] `python util/lint.py --all` passes (pre-existing failures in
`gaia.schedule.daemon` / import-validation are unrelated)
- [ ] Manual: store a `source='user'` item, run a discovery pass that
dedups into it, then `gaia memory --reset`; confirm the user item is
still present with `source='user'`

<details>
<summary>🔍 Technical details</summary>

**Root cause:** the dedup UPDATE in `MemoryStore.store()` used `source =
COALESCE(?, source)` (`src/gaia/agents/base/memory_store.py:827`).
`source` defaults to `"tool"` and is never `NULL`, so `COALESCE` always
took the *incoming* value — a discovery pass (`source='discovery'`)
merging into a `source='user'` item overwrote `'user'` with
`'discovery'`. `gaia memory --reset` then calls
`delete_by_source("discovery")` (`src/gaia/cli.py:6308`) and deleted the
relabeled user item, violating the spec's "new discoveries don't
overwrite user-edited memories" guarantee (AC amd#8).

**Fix:** guard the merge with a SQL `CASE` so a `source='user'` row is
never downgraded:

```sql
source = CASE WHEN source = 'user' THEN 'user' ELSE COALESCE(?, source) END
```

All other merge semantics (content replace, `MAX(confidence)`, embedding
invalidation) are unchanged.

**Tests added** (`tests/unit/test_memory_store.py`, class
`TestDeduplication`):
- `test_dedup_never_downgrades_user_source` — a discovery merge into a
user item keeps `source='user'`.
- `test_user_item_survives_reset_after_discovery_rerun` — the end-to-end
regression: re-run → `delete_by_source('discovery')` leaves the user
item intact.

**Verification:** `pytest tests/unit/test_memory_store.py` → 313 passed.
Broader `tests/unit/` failures are all pre-existing and unrelated
(missing `fastapi` extra; an `_embedding_model` fixture issue in
`test_embedding_cache.py` that also fails on `main`).

**Out of scope:** AC amd#7 (short-content items dropping below the 0.80
Szymkiewicz–Simpson dedup threshold) is intentionally not addressed
here. Lowering that threshold or special-casing short content risks
*over*-merging genuinely distinct facts (e.g. `browser is Chrome` vs
`browser is Firefox`), which needs eval-backed tuning rather than a
targeted data-loss fix. This PR fixes only the HIGH-priority live
data-loss path.
</details>

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
kovtcharov-amd added a commit that referenced this pull request Sep 25, 2026
The guard that keeps hardcoded colours out of the TUI could be walked
straight past by importing lipgloss under a different name. `lg.ANSIColor(81)`
is a hardcoded cyan with no string in it for the hex sweep to read, and
the constructor check only recognised the word "lipgloss" — so the colour
shipped with a green build behind it. Nothing in the tree does this today;
the problem is that the guard reported green on a bypass, which is the one
thing a guard must not do.

It now resolves each import path to the package it really is, so the name
a file happens to spell no longer decides what gets policed. A versioned
module path still resolves, a dot-import is reported at the import site,
and an unrelated package that merely spells itself `lipgloss` stops being
a false positive. The real tree has no aliased colour import, so a
synthetic table carries the proof the rule bites.

The hex pattern's over-match on all-digit runs is now documented as the
deliberate trade it is: excluding them would stop policing `#8`.

Spec, alongside: the TUI row named a test command that never reached the
components package, and the markdown link's blue is recorded as the one
recognised exception to "status hues are not for decoration" — the
convention predates this palette and readers arrive already knowing it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants