Resource ceilings applied DURING the filesystem walk, before any in-memory
index build commits to the discovered set. Bounding the streaming walk (not
the post-collection Vec) is what keeps a huge but non-sensitive tree from
OOM-ing or panicking the reload: we stop and return a graceful error the
moment either ceiling is crossed, instead of collecting megabytes of paths
and then letting LiveIndex::load blow the memory bound.
A candidate scout refused before a manifest exists because a catalog budget
was exhausted. This is operational freshness state, never a manifest issue.
Env var gating the SF-009 opt-in “exclude untracked” admission policy.
Default OFF — when unset (or set to anything other than a truthy value) the
index admits files exactly as before, so admission defaults are unchanged.
Env var opting back INTO full indexing of untracked generated-output
directories (F5). Default OFF — when unset, files under an untracked
directory matching is_generated_output_dir_name are demoted to Tier-2
metadata-only. Set to a truthy value (1, true, yes, on) to restore
the previous behavior (full Tier-1 admission).
Walk upward from the current working directory, looking for a .git directory.
Returns None if no git root is found and the cwd is a forbidden directory.