fix(pulse): auto-start user-index module on Pulse startup#1197
Closed
jonesy1234 wants to merge 1 commit into
Closed
fix(pulse): auto-start user-index module on Pulse startup#1197jonesy1234 wants to merge 1 commit into
jonesy1234 wants to merge 1 commit into
Conversation
The user-index module (Pulse/modules/user-index.ts) exports a full start()/stop()/health() lifecycle and is designed to be a first-class Pulse module — it scans USER/, builds Pulse/state/user-index.json, and sets up fs.watch for live updates. However, pulse.ts never imports or starts it, so the index is only built when a user manually runs `bun run Pulse/modules/user-index.ts`. Result on a fresh install: the Life Dashboard, /api/user-index, the Daemon publish_feed, and the Interview skill's gap detection all read a missing or stale index until the user discovers the manual command. Wire modules/user-index into pulse.ts using the same always-load pattern as modules/wiki: conditional import in loadModules() and await userIndexModule.start() in the startup sequence so the initial scan + fs.watch daemon both run. Also document the module in PULSE.toml.example. Module is opt-out via try/catch (matches wiki). No new deps. No breaking changes.
Owner
|
Hey @jonesy1234, thank you for the PR and the work that went into it. We're changing how LifeOS ships: from a full We're closing it for that reason, not because the idea was wrong. If the need still stands against the new model, we'd love a fresh PR once it lands. Thanks again for contributing. |
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.
Summary
The user-index module (
Pulse/modules/user-index.ts) exports a fullstart()/stop()/health()lifecycle and is designed to be afirst-class Pulse module — it scans
USER/, buildsPulse/state/user-index.json, and sets upfs.watchfor liveupdates. However,
pulse.tsnever imports or starts it, so the indexis only built when a user manually runs
bun run Pulse/modules/user-index.ts.Result on a fresh install: the Life Dashboard,
/api/user-index, theDaemon publish_feed, and the Interview skill's gap detection all read
a missing or stale index until the user discovers the manual command.
Reproduction
USER/(e.g. createUSER/TELOS/Foo.md)http://localhost:31337/lifeor hit/api/user-indexPulse/state/user-index.jsonmtime is unchanged from install time
Fix
Wire
modules/user-indexintopulse.tsusing the same always-loadpattern as
modules/wiki:loadModules()(try/catch — module is optional)await userIndexModule.start()in the startup sequence so theinitial scan +
fs.watchdaemon both runAlso documents the module in
PULSE.toml.example.Risk
Minimal. Module is opt-out via try/catch (matches wiki). The
start()function already exists, was already tested via thestandalone CLI, and writes to a path Pulse's own observability module
already serves. No new deps. No breaking changes.
Verification
pulse.tstranspiles cleanly (bun build --no-bundle)Maintainer testing recommended:
Pulse/state/user-index.jsonis written on first startupUSER/*.mdfile updates the index within ~250ms(existing debounce in user-index.ts)
bun run Pulse/modules/user-index.tsstandalone CLI still works