Skip to content

Overhaul Floppy Memory - #38

Merged
riipandi merged 2 commits into
mainfrom
overhaul-floppy
Aug 26, 2026
Merged

riipandi merged 2 commits into
mainfrom
overhaul-floppy

Conversation

@riipandi

Copy link
Copy Markdown
Owner

Summary

Kind

  • Bug fix
  • Feature
  • Docs
  • Other (CI / refactor / pi port)

Tested

Update docs/ in this PR if CLI, crate API, config, or user-visible behavior changed.

@netlify

netlify Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elph ready!

Name Link
🔨 Latest commit 7017c65
🔍 Latest deploy log https://app.netlify.com/projects/elph/deploys/6a8f528a12674a000836e88d
😎 Deploy Preview https://deploy-preview-38--elph.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@riipandi
riipandi merged commit b729ab6 into main Aug 26, 2026
7 of 8 checks passed
@riipandi
riipandi deleted the overhaul-floppy branch August 26, 2026 20:54

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — a solid, well-tested feature. Two minor suggestions inline plus a couple of notes below.

Reviewed changes

  • start_task now surfaces related past tasks (feat(floppy)): StartTaskResult gains related_tasks: Vec<TaskOutcome> populated by a cosine query over tasks.embedding that reuses the already-computed task embedding (no second inference pass), filters to finished tasks, thresholds at 0.35, and caps at 3. The start_task agent tool renders these as a short "Related past tasks" note with status/cost/errors and uses a char-safe truncate_chars on descriptions.
  • Tests: a discriminative bag-of-words embedder mock plus start_task_surfaces_similar_past_tasks asserting similar vs. unrelated tasks are separated by the threshold, along with emptiness assertions on fresh/empty stores. The new test genuinely exercises the behavior and would fail if the query broke.
  • Docs: docs/archive/memory.md covers the new related_tasks return. SQL verified consistent with the existing retrieve.rs query pattern and the tasks schema.

⚠️ Scope — this PR bundles two unrelated changes

The memory feature (0bfed2b) is paired with an unrelated chore(models): refresh chat model catalog from live sources (7017c65) that regenerates ~30 provider catalogs. The catalog refresh looks internally consistent, but it's a separate concern that will be noise in review history and bisection for the memory overhaul. Worth splitting into its own PR (or at minimum calling out in the description) if it isn't an intentional bundle.

ℹ️ Nitpicks

  • crates/coding-agent/src/memory/tools.rs:135 — the None => "in-progress" arm of the completed match is unreachable: related_tasks only returns rows with finished_at IS NOT NULL, and end_task always writes a non-null completed. Harmless, but the label will never render.
  • crates/floppy/src/memory/store/tasks.rs:138-157 — the related-task query does a per-start_task full scan computing cosine distance across every stored finished task (no indexed ordering). Fine at current store sizes, but worth watching as task counts grow.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash | 𝕏

Ok(StartTaskResult {
task_id,
memories,
related_tasks: self.related_tasks(related_emb_buf).await.unwrap_or_default(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The unwrap_or_default() here swallows any error from the related-tasks query (e.g. a vector-type/schema mismatch) with no trace. Since a failure silently degrades the whole feature to empty, log it: match self.related_tasks(related_emb_buf).await { Ok(v) => v, Err(e) => { log::warn!("related tasks query failed: {e:#}"); Default::default() } } — keeps the non-fatal boundary while surfacing real misconfiguration.

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