Skip to content

Improve empty host onboarding - #130

Merged
dacorvo merged 3 commits into
mainfrom
improve_empty_host_onboarding
Sep 1, 2026
Merged

Improve empty host onboarding#130
dacorvo merged 3 commits into
mainfrom
improve_empty_host_onboarding

Conversation

@dacorvo

@dacorvo dacorvo commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

This fixes #109

A machine whose agents haven't run yet has no session dirs, and `funes index`
treated that as an error — both the bare form and the `--harness <name>` form the
per-turn hook calls. Nothing to index is a state to report, not a failure.

It is also the state `funes add` leaves a new host in: with no sessions to seed
from, add tells the user to "run `funes index`" — a command that then exits 1.
That is what issue #109 reports.

Refs #109
`funes push` opened the local memory with `?`, so a host that has nothing indexed
yet got lance's internals — a `_versions` path and two crate line numbers — where
the answer is simply that there is nothing to publish.

The session-boundary hook runs `funes push` on exactly that host: a new machine
whose agent hasn't produced a session yet. It is the last command in the fresh-host
flow that still fails on the absent dataset; every other consumer of an absent local
memory (curate, scrub, the read verbs, add) already reports it.

The remote is still classified first, so an unreachable or missing target keeps
failing before any local work.

Refs #109
Three places say a new host clears the wrong-memory guard by re-running `funes add`.
That holds only once the host has an index of its own: a machine whose agent has
never run has nothing to push, so `add` skips the first push and the guard stays up
— the setup issue #109 reports.

Refs #109

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Improves “empty host” onboarding by treating the absence of local sessions / a local index as a non-fatal state during indexing and publishing, and updating docs to reflect when the first interactive push can occur on a new machine.

Changes:

  • funes index now prints a “nothing to index” message and exits successfully when no local session roots exist.
  • funes push now returns a successful “nothing to publish” report when the local memory hasn’t been created/indexed yet.
  • Documentation updates to clarify that the first interactive push (and thus clearing the wrong-memory guard) can only happen once the new host has indexed something.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main.rs Makes index a no-op success (with message) when no local session roots are present.
src/commands/push.rs Makes push a no-op success (with report) when there’s no local index yet.
docs/push.md Clarifies first interactive push requires the host to have an index to push.
docs/automation.md Updates automation guidance for new-host “wrong-memory guard” clearing timing.
docs/add.md Updates add docs to clarify re-running on new host is effective once an index exists.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/main.rs
@dacorvo
dacorvo merged commit 0c6c4bb into main Sep 1, 2026
9 checks passed
@dacorvo
dacorvo deleted the improve_empty_host_onboarding branch September 1, 2026 13:22
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.

chicken and egg problem when adding to an agent on a new machine

2 participants