Skip to content

Candidate diff and change stream include Stella's own .stella/private/ SQLite sidecars #2038

Description

@macanderson

Problem

In a workspace whose .gitignore does not exclude .stella/private/, Stella's own state files appear in the change stream the verifier and the deck are shown, as if they were the agent's work.

Observed in a real run — the turn diff carried three entries, two of which were Stella's own SQLite sidecars:

  • .stella/private/codegraph.db-shmmodified, +2/-1, body full of binary escape bytes
  • .stella/private/codegraph.db-walmodified, +13/-0, likewise
  • test_regex.pycreated, the only real work

Two consequences:

  1. Evidence noise. Binary escape bytes land in a verifier-facing payload. (The gather_diff path is now safe here — PR fix(stella-pipeline): let the verifier read an untracked file's content, not just its name #2034 renders untracked binaries as git's Binary files ... differ sentence — but this stream is a different channel and is not covered.)
  2. Warrant classification. witness::warrant::changed_paths holds every changed path to the every-path-must-agree rules in crates/stella-pipeline/src/witness/warrant.rs. A .db-wal path is neither docs nor test, so its presence defeats a DocsOnly/TestsOnly waiver that should have applied — the agent's own bookkeeping silently deciding whether a witness is owed.

Why it does not reproduce in this repo

crates/stella-cli/src/agent/tools.rs's GitRepoStatus::untracked_fingerprints shells git ls-files --others --exclude-standard, which honours .gitignore. This repo ships a generated .stella/.gitignore excluding .stella/private/, so the sidecars are filtered here.

A fresh workspace has no such exclusion: a Terminal-Bench task image, a git init scratch dir, or any tree where that file was never generated — or was generated after the first fingerprint snapshot.

Files

  • crates/stella-cli/src/agent/tools.rsGitRepoStatus::untracked_fingerprints
  • crates/stella-pipeline/src/pipeline/verify_probes.rsgather_diff, the untracked delta
  • crates/stella-tools/src/registry.rsrecord_touch, the single AgentEvent::FileChange emitter
  • crates/stella-pipeline/src/witness/warrant.rschanged_paths and the path rules

Reproduce / verify

  1. git init a scratch directory with no .stella/.gitignore.
  2. Run a stella run task there that touches the code graph, so codegraph.db-wal is written.
  3. Inspect the turn diff and the verifier prompt for .stella/private/ paths.

Definition of done

Stella's own state under .stella/private/ never appears in any verifier-facing diff, FileChange stream, or warrant path set, regardless of whether the workspace's .gitignore excludes it.

The exclusion must be a property of the code, not of a generated file that may be missing — the ignore file stays a convenience for the user's git status, never the mechanism verification depends on.

A witness test should assert the exclusion holds with no .gitignore present, since that is the failing configuration.

Constraints

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Drop everything — broken or embarrassing for usersgoal:benchPillar 3 — benches easy to run and their numbers trustworthygoal:tracesPillar 2 — every trace perfectly labelled, always: correct, complete, joinablegoal:witnessPillar 1 — the witness flip must fire, honestly, on real taskspain:token-efficiencyToken waste — redundant calls, bloated prompts, inefficient context/output use

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions