Verify every module against independent oracles run in hermetic containers

Abierto
#84 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
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
docker, git, go, python, ruby

Línea de trabajo

Start by tracing the existing Linguist oracle and Go test suite, then review the golden corpus in #75 and the acceptance checklist for the pinned tools and hermetic containers. Done means a cached, network-disabled harness covers the listed oracles, checks soundness and honesty, records reviewed discrepancies, and exposes a small PR subset plus full local or on-demand runs.

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

Descripción

enhancement follow-up

Why

Only two modules are checked against an independent source of truth today:

  • Languages: the real Linguist 9.7.0 gem in Docker. That's 408 conformance cases plus 3,388 samples.
  • Metrics: standalone scc 4.1.0.

Every other module is validated only against author-written fixtures or previously committed dircue output. That covers declarations for npm, Go, Python/uv, Cargo, .NET, Maven and Gradle, plus environments, projects/graph, focus, availability, explain, formats, registries, the Syft import, compare and plan. Those tests prove the code agrees with its author's understanding, not with the ecosystems it models. Every bug found on 2026-09-22 was of this kind:

  • #72: Linguist strategy-chain semantics;
  • the Cargo inherited-dependency allowlist;
  • Git's handling of pattern-only .gitattributes lines.

Line coverage isn't the problem. First-party code is at 82.6% statement coverage, and the whole Go suite runs in ~12 s. The oracles are.

dircue must never execute inspected content. Its test suite can: it can run the real tools on pinned inputs inside hermetic, network-disabled containers to produce ground truth.

Oracles to add

Area Oracle What to compare
Git object reading (default source; go-git fork, where the read path is ~20–45% covered) git cat-file --batch, git ls-tree -r -z byte equality of every selected blob, tree entry and mode on every corpus entry, plus synthetic delta-stress packs (including the backward-copy case from go-git #2378)
Attributes git check-attr -a resolved attributes per file: macros, negation, nested scopes, pattern-only lines
Languages Linguist 9.7.0 gem (existing) extend to the golden corpus (#75) and the generated strategy-chain matrix (#72); compare -s labels too
Structure standalone big-code-analysis CLI at the pinned version per-file metric equality with the worker's output
Cargo cargo metadata --offline --no-deps --format-version 1 workspace members, targets, path dependencies, features, inherited fields
Go go mod edit -json, go work edit -json (pure parsers) module, go/toolchain, require/replace/exclude/retract, use
npm workspaces npm's own workspace expansion (@npmcli/map-workspaces) member resolution from globs
Python PyPA packaging (PEP 508/440), validate-pyproject, uv workspace discovery where available offline requirement and specifier parsing, requires-python, membership
.NET dotnet msbuild -getProperty:… -getItem:ProjectReference (evaluation without restore/build) in pinned-SDK images; dotnet --version under a known installed-SDK set for global.json evaluated TFMs, OutputType, references; SDK selection
Maven / Gradle mvn -o help:effective-pom and gradle projects --offline, with pre-seeded images modules, parents, packaging, included projects
Syft association Syft on the same snapshot package locations mapped to component ownership
Availability git lfs pointer --check, git submodule status, git sparse-checkout list pointers, gitlinks, sparse state
Formats libmagic file --mime-type (a weak oracle; disagreements get reviewed) plus format validators detected format per file

Soundness and honesty checks

Where an oracle evaluates semantics that dircue deliberately doesn't (MSBuild conditions, Gradle scripts), don't demand equality. Assert two things instead:

  • every fact dircue reports as declared or complete is confirmed by the oracle;
  • every oracle fact that dircue lacks lies inside something dircue marked partial, unresolved or unknown.

This tests the evidence-honesty principle directly: a "complete" that the oracle contradicts is a bug.

Acceptance

  • A harness running each oracle in pinned, --network none containers against the golden corpus (#75) and focused synthetic fixtures. It caches oracle results by (input digest, tool version).
  • Soundness and honesty assertions per module. Mismatches either fixed, or recorded as reviewed discrepancies with a reason.
  • A PR tier runs a small fixed subset. The full set runs on demand (workflow_dispatch or a local make target) and at release. Nothing runs on a schedule (#92).
  • Oracle tool versions pinned and upgraded deliberately, with the diff reviewed.

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.