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

[TS] Produce replayable witnesses for unrefined any references selected as strings

Aberta
#592 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
kotlin
Domínio
backend, testing-qa

Direção de pesquisa

Start with usvm-ts/src/test/resources/samples/lang/TypeCoercion.ts, method transitiveCoercionNoTypes, and the prepareRefinedStringBackings and TsTestResolver.kt:398 paths mentioned in the issue. Reproduce the missing backing array failure and trace how the final model selects a string for an unrefined any reference. Define a sound witness or explicit unsupported result that preserves path constraints and all listed alternatives; validate every emitted witness by native replay.

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

Descrição

An unconstrained any reference can be selected as a string by the final solver model without a modeled backing array. Witness extraction then raises TsUnsupportedWitnessException instead of producing a replayable input. This is independent of the computed-member frontend update.

Observed evidence:

  • CI at USVM 2679630a854114b3d82740bc16623fc674092b2e, run 38957306345, TypeCoercion.test transitiveCoercionNoTypes: Symbolic string is missing backing array: 0x-2. The stack is resolveParameters -> resolveFakeObject -> resolveExpr -> resolveTsValue -> resolveString (TsTestResolver.kt:398). CI reached 100% method coverage before extraction failed.
  • The same unchanged test reproduced locally on clean main e56cea5018f5f04408083fe44be9a5212ae2600f, using the previous JacoDB pin 4251d2023d: Symbolic string is missing backing array: 0x-1.
  • An isolated run at the CI commit also passed, so the precise model selection is variable. The failure is not established as a computed-member pin regression.

Reproducer source remains in usvm-ts/src/test/resources/samples/lang/TypeCoercion.ts, method transitiveCoercionNoTypes(a, b, c). It compares a == b, c != 0, c != 1, and c && a == c, returning 1, 2, 4, or 3.

prepareRefinedStringBackings only prepares references proven to be non-nullish strings on the current path. The any references in this example may remain unrefined, while the final model's type stream chooses a string. Do not replace missing backing with an invented empty string or suppress extraction failure: that could invalidate the path witness.

Required result: define and implement a sound way to obtain concrete witnesses for these unrefined alternatives (including their original path constraints), or report their unsupported status explicitly at the analysis/witness boundary. Preserve nullish, object, numeric, Boolean, and string alternatives. Validate every emitted concrete witness by native replay. Keep this separate from the bounded numeric/Boolean TypeCoercion regression fixture; that fixture does not establish general any witness support.

Linguagem predominante
Kotlin
Estrelas
33
Forks
27
Merge médio
3d 21h
PRs com merge (30d)
88

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

  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 UnitTestBot/usvm

Todas as issues de UnitTestBot/usvm

Issues semelhantes

Mais issues de Kotlin

Receba novas issues na sua caixa de entrada

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