Improve empty host onboarding - #130
Merged
Merged
Conversation
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
There was a problem hiding this comment.
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 indexnow prints a “nothing to index” message and exits successfully when no local session roots exist.funes pushnow 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #109