Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Telemetry error report splits a simulation worker failure between its exception and the recorded copy

Aberta
#4,088 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

@anth-volk já está trabalhando nisso.

Desde 27/10/2026.

  • #4089 de @anth-volk — aberto

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
20/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
observability

Direção de pesquisa

Read .github/scripts/telemetry_error_issues/records.py, especially primary_records and _primary_preference, then inspect failure_causes.record_failure_cause and its record_exception(handled=True) call. Check how Stage12FailureCause is identified and how fingerprint algorithm 2 relates to issue #4085. Done means the original exception represents a failure when both records exist, while the copy still represents failures when it is the only record.

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

Descrição

bug

What happens

When a simulation worker or coordinator fails on the simulation service's newer report path, the service logs two ERROR records for the one failure:

  • the original exception, for example ValueError: No dataset found for year 2033: a log record with error.type set, no event.name and no error.handled;
  • a redacted copy written by failure_causes.record_failure_cause through record_exception(handled=True): an exception.recorded event with error.type Stage12FailureCause and error.handled true, carrying the original's traceback. A worker's copy often has the original's frames and timestamp to the microsecond.

primary_records in .github/scripts/telemetry_error_issues/records.py keeps one record per failure, and _primary_preference ranks both as exceptions. When the timestamps tie, the record whose fingerprint inputs sort first wins, which is the copy for a ValueError. So one cause splits across two error groups and two issues. On 2026-10-26, policyengine-stage12-uk-worker groups a8e6ee4984a289c0 and 88e59fcf916bc9ff were one cause.

Proposed change

Rank a Stage12FailureCause record after other exceptions and before messages and failed requests, so the original exception represents the failure. A failure with only the copy still uses the copy.

The copy sets no event name or attribute of its own (exception.recorded and error.handled are what the runtime writes for any handled exception), so its class is the only field that tells it apart.

This changes which record represents those failures, so it should ship with fingerprint algorithm 2 (#4085) rather than need another algorithm change.

Linguagem predominante
Python
Estrelas
18
Forks
33
Merge médio
2d 13h
PRs com merge (30d)
56

Preparar o ambiente

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 PolicyEngine/policyengine-api

Todas as issues de PolicyEngine/policyengine-api

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.