determinism violation prints only a 2,000-character prefix, hiding the first difference
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 64/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript
- Domínio
- testing
Direção de pesquisa
Procure no harness oracle-gaps o código que formata a mensagem de violação de oracle-gaps.report e o corte de 2.000 caracteres em cada texto registrado. Reproduza com vitest --run --config oracle-gaps/vitest.config.mjs gap-report-oracle -t "an edit that changed the cold result after a hang replaced the only context", depois use esse log para confirmar que o prefixo impresso esconde a divergência. Pronto significa que a mensagem reporta o primeiro offset divergente em cada texto com aproximadamente 200 caracteres de contexto, além do tipo de cada observação e dos dois comprimentos, sem nada truncado antes do offset.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
When two runs of a constructed history record different observations, the determinism violation prints the
observation's text only as a prefix. The first 2,000 characters are identical, and the output stops there, so the
difference is not shown. A diagnosis then needs a local patch to see where the two traces diverge.
The violation should print the first differing offset in each recorded text, with context on both sides, and the
observation's kinds and lengths, so the failure can be read without a patch.
Example
tests/gap-report-oracle.property.test.mjs, test "constructed history: an edit that changed the cold result after a
hang replaced the only context" (run with -t), at commit 11105c5 on fix/gap-cli-retention (#61):
Error: oracle-gaps.report: two runs of "constructed history: an edit that changed the cold result after a hang replaced
the only context" recorded different traces at observation 0 ("cli").
First run: cli {"lead":[...
Second run: cli {"lead":[...
Both texts are the same for 1,996 characters, and the framework cuts them at 2,000. The difference is not visible.
Log: /tmp/oom/h2h-control.log (on the reporting machine). Replay: vitest --run --config oracle-gaps/vitest.config.mjs gap-report-oracle -t "an edit that changed the cold result after a hang replaced the only context".
Why it matters
The determinism check is how a timing dependency is caught. A check that cannot say what differed cannot tell whether
the difference is a wall-clock cut, a reordering, or a different gap, so the failure cannot be classified.
Expected
- The first differing offset in each text, with about 200 characters of context on each side.
- The observation's kind and the lengths of the two texts.
- Nothing cut before the offset.
Limits
This is a diagnostic issue. It doesn't say whether the underlying nondeterminism is a bug (the wall-clock cut issue may
be the cause, tracked separately).
- Linguagem predominante
- JavaScript
- Estrelas
- 5
- Forks
- 1
- Merge médio
- 8h 31min
- PRs com merge (30d)
- 60
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TanStack/oracles
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 46/100
Mantenedores costumam responder em até 1 dia
Todas as issues de TanStack/oracles
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Edit: Telemante [YT]Abertachannels:edit check:passed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
swc-project/swc-next-issues#490 ·