Make docs.bzl tests easier to understand and extend

Aberta
#965 3 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@MaximilianSoerenPollak já está trabalhando nisso.

Desde 23/11/2026.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
25/100
Tipo de issue
Documentação
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
python

Direção de pesquisa

Start with the docs_bzl test suite: the scenario directories with _expected/ golden samples, each scenario's BUILD and source documents, the central catalog that maps golden cases to Bazel targets, and the harness code that overwrites samples on mismatch. The reference_integration scenario is the representative composition to map. Done means a guide that explains when to use golden samples versus explicit assertions and when to extend the reference integration versus add a focused scenario, plus a clearer mapping of existing tests to the requirements they protect.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Problem statement

Overview

It is hard to tell what the docs_bzl tests cover or where to add a new test. Developers have to inspect several files and understand the test harness to work out what a test is meant to protect. We need clear test names and guidance on when to compare output with saved expected files (golden samples), when to write explicit assertions, and where new test cases belong.

Details

The docs_bzl tests cover important behavior, but it is difficult to determine which test protects which requirement and how to add new coverage.

The suite combines explicit Python assertions with golden samples stored in scenario _expected/ directories. Their relationship is unclear: which behavior is covered by the golden samples, which requires explicit assertions, and when should a new test use either approach?

Golden cases are discovered automatically from _expected/ and mapped to Bazel targets through a central catalog. Understanding what they actually protect requires inspecting the scenario’s BUILD, source documents, expected files, and harness code. The resulting test names identify a scenario and output rather than a behavioral expectation. When output differs, the test overwrites the golden samples and fails; reviewing that change requires understanding which differences matter to the scenario’s purpose.

Explicit tests introduce further difficulty:

  • Some check several distinct behaviors under one name.
  • Authors need to know internal Bazel targets, output paths, and helper conventions.
  • Failure assertions vary; some only establish that a build failed, without checking the reason.

reference_integration intentionally approximates the S-CORE setup, including platform requirements, legacy and modern modules, and nested components. This representative composition is valuable and should remain covered; its purpose and the expectations attached to it need to be easier to understand.

Desired outcome

Developers should be able to identify existing coverage and add tests without reverse-engineering the harness. This includes clear guidance on using and reviewing _expected golden samples, writing explicit assertions, and choosing between extending the reference integration and adding a focused scenario.

Linguagem predominante
Python
Estrelas
11
Forks
39
Merge médio
1d 13h
PRs com merge (30d)
65

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

  • Sem Dockerfile nem arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de eclipse-score/docs-as-code

Todas as issues de eclipse-score/docs-as-code

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.