Skip to content

test: stage only declared fixture paths in repo fixture commits #328

Description

@flyingrobots

Summary

The new repo fixture builder currently commits fixture changes with git add --all inside the temporary fixture repository.

That is acceptable for the first slice because the fixture root is isolated and path escapes are rejected, but it is still a broad staging primitive. Future fixture tests would be more precise if commits staged only the paths declared by prior fixture operations.

Why

A canonical fixture builder should make repository stories explicit. Broad staging can accidentally hide undeclared generated files or helper artifacts inside a fixture, especially once fuzz/stress overlays arrive.

Scope

  • Track changed fixture-relative paths produced by withFile, deleteFile, and chmod operations.
  • Stage only those paths during commit().
  • Preserve support for intentional whole-repo commits only via an explicit option if needed.
  • Keep path escape checks and temp repo isolation intact.
  • Add regression coverage proving an undeclared untracked file inside the fixture root is not silently committed.

Acceptance Criteria

  • Fixture commits no longer use broad git add --all by default.
  • Tests prove undeclared files remain untracked unless explicitly added by builder operations.
  • Existing fixture-builder self-tests stay green.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlane:foundationSupporting lane — core hardening, contracts, integritytech-debtTechnical debt that needs addressingtestingTesting improvements and infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions