Documentation
¶
Overview ¶
Package workspace owns the .stagefreight/ generated namespace and keeps it hygienic. StageFreight writes run outputs there every execution; if any are committed they dirty the worktree and poison StageFreight's own clean-tree invariants. This package classifies that namespace — ephemeral run outputs are gitignored and never tracked, while persistent published assets (badges/) stay trackable — and provides deterministic, reversible normalization.
Hard scope boundary: every mutation here is confined to .stagefreight/. It never edits the root .gitignore, never untracks files outside the namespace, and never touches user source trees.
Index ¶
Constants ¶
const NamespaceDir = paths.Root
NamespaceDir is the StageFreight-owned generated namespace. It is the Durable-bucket root; paths is the single source of truth (see src/paths).
Variables ¶
This section is empty.
Functions ¶
func DetectTrackedEphemeral ¶
DetectTrackedEphemeral returns the repo-relative paths of tracked files (from the git index) that are StageFreight-owned ephemeral outputs.
func EnsureGitignore ¶
EnsureGitignore writes/updates .stagefreight/.gitignore to the managed body. Returns true if it created or changed the file. Touches ONLY that file.
func GitignorePath ¶
GitignorePath is the managed ignore file — INSIDE the namespace, never root.
func IsEphemeral ¶
IsEphemeral reports whether a repo-relative path is a StageFreight-owned ephemeral output: anything under the namespace that is NOT in the durable allowlist. Used both to detect tracked artifacts and to exclude StageFreight's own generated files from clean-tree gates (layer C). This is the inverse of the allowlist — an UNKNOWN output under .stagefreight/ is ephemeral by default (safe: a new output can never accidentally be treated as committable), and the durable carve-out (including the managed .gitignore) always wins.
func UntrackEphemeral ¶
UntrackEphemeral removes the given paths from the git index (the `git rm --cached` equivalent) WITHOUT touching the working-tree files — contents are preserved, only index ownership changes. It refuses any path that is not a StageFreight-owned ephemeral output: the hard scope boundary, enforced in code.
Types ¶
This section is empty.