db-ivm structural-identity oracle model treats nested deep nodes as distinct
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- Meio dia
- Facilidade para iniciantes
- 58/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- databases, testing-qa
Direção de pesquisa
Start in packages/db-ivm/tests/structural-identity-oracle.property.test.ts, in the test "agrees with D2 value identity for independent values" and the model's normal(spec) function. Confirm the counterexample by running the test with the seed and path from the issue, then make the model agree with equalHashValues for nested deep nodes without changing equalHashValues or structuralIdentity. Done when the named replay passes, the property passes at 2000 runs, and the counterexample is kept as a fixed case.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
The db-ivm structural-identity oracle fails at random in CI. The failing assertion is the oracle's own sanity check, so the defect is most likely in the oracle's model, not in equalHashValues or structuralIdentity.
Failure
packages/db-ivm/tests/structural-identity-oracle.property.test.ts, test "agrees with D2 value identity for independent values":
Property failed after 1888 tests
{ seed: -956497647, path: "1887", endOnFailure: true }
Counterexample: [{"k":"deep","depth":6,"v":{"k":"leaf","i":3}},{"k":"deep","depth":3,"v":{"k":"deep","depth":3,"v":{"k":"leaf","i":3}}}]
AssertionError: model vs equalHashValues: expected true to be false
It failed CI on #2127, which does not change db-ivm.
Reproduce
The property calls fast-check directly, so the oracle replay environment variables do not reach it. Add the seed and path to the options, then run the test:
{ numRuns: 2000, seed: -956497647, path: `1887` }
On main (bbbf017ef) it fails at the first run with the same counterexample.
Analysis
Both specs build the same value: a leaf nested six levels deep. deep(6, leaf) and deep(3, deep(3, leaf)) produce equal structures, so equalHashValues returns true. The model's normal(spec) gives different strings for the two specs, so the model predicts false. The model normalizes the spec, not the built value, so it does not see that nested deep nodes compose.
Suggested fix
- Make
normalcollapse nesteddeepnodes (sum their depths) before it serializes, or compute the model from the built value's shape. - Add the counterexample as a named replay.
- Route this property through the shared oracle config, so that
TANSTACK_DB_ORACLE_SEEDandTANSTACK_DB_ORACLE_PATHcan replay it.
- Linguagem predominante
- TypeScript
- Estrelas
- 3.9k
- Forks
- 272
- Merge médio
- 1d 1h
- PRs com merge (30d)
- 235
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
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/db
-
Dificuldade 3/5 Meio dia Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 8/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 5/100
TanStack/db#2139 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
Mantenedores costumam responder em até 1 dia
Todas as issues de TanStack/db
Issues semelhantes
-
Add: VIVE TVAbertaapproved check:passed streams:add
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
iptv-org/iptv#55293 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Fission-AI/OpenSpec#2084 ·
Mantenedores costumam responder em até 2 dias
-
Contrib indemnité de départ à la retraite : faire le pont avec le simulateur sur la page génériqueAbertaP1
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
SocialGouv/code-du-travail-numerique#7561 ·
Mantenedores costumam responder em até 1 dia
-
beginner bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
hiero-ledger/hiero-sdk-js#4517 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
kubernetes-sigs/headlamp#7950 ·
Mantenedores costumam responder em até 3 dias