Assert end-to-end metamorphic invariants across source modes, platforms and settings

Abierto
#85 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
ci-cd, testing

Línea de trabajo

Start with the proposed tests/metamorphic harness and the golden-corpus entries in #75, then review the existing scanner and Git tests, including their Windows skips. Define seeded generated-tree transformations for the listed invariants and make the PR tier reproducible; done means the acceptance checks run across Linux, macOS and Windows with documented exceptions and on-demand full-corpus execution.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement follow-up

Why

Many of dircue's promises are invariants: statements about how output must not change. Today they're spot-tested inside individual packages, e.g. a few determinism tests in environments, focus and registries. They aren't asserted end to end across the whole pipeline or on real repositories. Metamorphic tests need no external oracle, are cheap, and catch whole classes of bugs, including the Git-versus-directory divergences and ordering issues a parallel scanner can hide.

Invariants to assert (whole pipeline, all modules)

  1. Git ≡ directory. A committed tree and a directory export of the same tree give identical results, modulo explicitly documented differences (eol conversion, symlinks, submodules).
  2. Git storage variants ≡. Loose, packed, re-packed/aggressively delta-compressed and shallow repositories (and linked worktrees where supported) give identical results for the same tree.
  3. Worker count. Byte-identical at 1, 2, N and 64 workers.
  4. Location. The same content at two absolute paths gives identical output once the map is portable (#74). Until then, identical after normalizing root.
  5. Enumeration order. Byte-identical for files created in shuffled order, and on case-sensitive vs case-insensitive filesystems where names don't collide.
  6. Locality. Adding an unrelated file under a new directory changes only the facts involving that file.
  7. Performance-only settings (presets, cache and buffer sizes; #91): byte-identical output. A setting that changes output must be declared coverage-affecting.
  8. Documentation stripping (#74): removing Markdown, comments and docstrings changes no non-documentation fact.
  9. Attribute equivalence. Equivalent overrides at root and nested .gitattributes scopes give identical results.
  10. Saved-report round trip. Save → load → compare with itself reports no changes. compare(A, B) and compare(B, A) mirror each other.

Acceptance

  • A tests/metamorphic harness that applies each transformation to the golden-corpus entries (#75) and to generated trees. Generated trees are random but seeded and reproducible, with mixed ecosystems, symlinks, deep nesting, large files, unicode and control-character names.
  • Runs on Linux, macOS and Windows. Windows path handling currently has explicit skips in scanner and Git tests.
  • PR tier on generated trees; the full corpus on demand (workflow_dispatch or a local make target) and at release. Nothing runs on a schedule (#92).
  • Every intentional exception is documented, with a test pinning its exact scope.

Part of the 1.0 quality program: #83. Epic: #81.

Lenguaje dominante
Go
Estrellas
0
Forks
0
Merge medio
11 h 3 min
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de war-and-code/dircue

Todos los issues de war-and-code/dircue

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.