Skip to content

phpbotscout index status

Reports what is in the index, per source, and how stale each one is.

Unlike build, refresh and sources, status reads the local index only. It needs no forge access and works while discovery is unavailable.

Usage

$ phpbotscout index status
SOURCE                    DOCS  CHUNKS  COMMIT    RELEASE           AGE    CHECKED  STATE
phpboyscout/go/config     57    640     abc123de  v0.37.0 9e81f0aa  2d     20m      ok
phpboyscout/go/forge      41    502     4f2a91bc                    5h     4h       stale, deferred
phpboyscout/go/controls   0     0                                   never  never    stale

2 stale, unconfirmed for over three refresh intervals (1h0m0s): phpboyscout/go/controls, phpboyscout/go/forge

phpboyscout/go/controls last failed: clone refused

An empty index says what to do about it rather than printing a bare header:

$ phpbotscout index status
Nothing indexed yet. Run `phpbotscout index build`.

Reading the output

Column Meaning
SOURCE The canonical namespace path the forge reported. This is the identity a source is keyed by: forges redirect renamed and transferred projects, and directory names do not reliably match project names.
DOCS Documents indexed from that source.
CHUNKS Retrievable passages those documents were split into.
COMMIT First 8 characters of the default branch commit the docs, README and changelog were indexed from. Enough to recognise; the full SHA is noise.
RELEASE The release tag and commit the code was indexed from, when that release is behind the branch. Empty when the code came from the branch: the source has no release, or its latest release is the branch head.
AGE How long since that source last indexed successfully, or never.
CHECKED How long since that source was last confirmed current, by a fetch or because the forge reported no activity since one. A source that has not changed keeps an old AGE and a recent CHECKED.
STATE ok, or stale when CHECKED is older than three refresh intervals, and deferred when the last run stopped before reaching it.

Age is relative rather than an absolute timestamp because the question being asked is "is this current enough to answer from", and a timestamp makes the reader do the subtraction.

Failures

A source that failed its last run shows the reason beneath the table, so status answers why something is stale and not merely that it is. The reason is recorded when the failure happens, so it survives the run that produced it, so you do not need to have been watching the terminal.

The refresh interval is index.refresh_interval, the same key serve reads.

Staleness is not an outage

A stale index does not fail the daemon's readiness. /healthz carries the count of stale sources as a degraded index-staleness check, and stays healthy. Answering from what is already indexed, with a caveat, beats not answering, and taking the bot out of service would not fix a forge nobody can reach. status is where staleness surfaces so an operator can act on it; see serve.

Flags

status defines no flags of its own. Global flags (--config, --debug, --output, --ci, --accessible) are inherited from the root command.

Name Description Default
-h, --help Help for status. false

See also