phpbotscout index refresh¶
Re-indexes only the sources that have changed, leaving the rest alone.
Usage¶
What "changed" means¶
A source is re-indexed when the commit at the head of its default branch differs from the one recorded against it. The comparison is against the recorded commit, not a timestamp — a repository force-pushed backwards has changed just as much as one pushed forwards.
Everything else is counted as unchanged and reported, rather than silently
omitted. A source that has never been indexed is indexed here too, so refresh
picks up a new repository in the group without a full build.
Refresh saves indexing, not cloning
The commit is read from the clone, so every source is still fetched on every
run. What refresh skips is chunking, embedding and writing — the expensive
part — not the network traffic. If the forge round-trip is what you are
trying to reduce, lengthen
index.refresh_interval rather than reaching
for refresh over build.
Failure is per-source¶
A source that cannot be cloned or read does not end the run. It is recorded against that source with its reason and the run continues, so one unreachable repository does not cost you the other eleven:
$ phpbotscout index refresh
52 sources: 2 indexed, 49 unchanged, 1 failed
120 documents, 900 chunks
Failed:
phpboyscout/go/config
clone refused
Abandoning the cycle on the first failure would leave the whole corpus as stale
as its unluckiest repository. The reason is also kept against the source, so
status answers "why is this stale" and not merely "this is
stale".
Relationship to serve¶
phpbotscout serve runs this same code on a timer. There is one
implementation, so the scheduled and manual routes cannot drift into
disagreeing about what is indexed or where the index lives.
Running index refresh by hand while the daemon is running is safe, but the two
will contend for the database.
Discovery runs every time¶
refresh re-enumerates the namespace on every run rather than reusing the last
listing. A repository made private since the last build must stop being indexed
immediately, and that is only knowable by asking. See
index sources for what discovery costs.
Flags¶
refresh defines no flags of its own. Global flags (--config, --debug,
--output, --ci) are inherited from the root command.
| Name | Description | Default |
|---|---|---|
-h, --help |
Help for refresh. |
false |
See also¶
index build— index everything, ignoring recorded commitsindex status— what is indexed, and how stale