[Bug]: `DISABLE_PAYG` and `COUNTER_SYNC` are incorrectly decoded as `SET_TIME` in extended token mode
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia riproducendo il problema con OpenPAYGOTokenEncoder e OpenPAYGOTokenDecoder in modalità token estesa usando gli snippet Python forniti. Confronta il tipo di token decodificato per DISABLE_PAYG e COUNTER_SYNC con i tipi previsti; il lavoro è completato quando entrambi i token vengono decodificati come i tipi con cui sono stati codificati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Preflight Checklist
- I have read the Contributing Guidelines for this project, if it exists.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Expected Behavior
When using OpenPAYGO in Extended Token mode I would expect DISABLE_PAYG and COUNTER_SYNC to be decoded as such.
Actual Behavior
However, they are decoded as SET_TIME Tokens.
Steps to reproduce
# OpenPAYGO-python
from openpaygo import OpenPAYGOTokenEncoder, TokenType
encoder = OpenPAYGOTokenEncoder()
new_count, final_token = encoder.generate_token(
secret_key="bc41ec9530f6dac86b1a29ab82edc5fb",
count=4,
value=None,
token_type=TokenType.DISABLE_PAYG,
starting_code=516959010,
restricted_digit_set=False,
extended_token=True,
)
print(f"{new_count=}")
print(f"{final_token=}")
new_count=5
final_token='223770960008'
# OpenPAYGO-python
from openpaygo import OpenPAYGOTokenDecoder
decoder = OpenPAYGOTokenDecoder()
value, token_type, count, updated_counts = decoder.decode_token(
secret_key="bc41ec9530f6dac86b1a29ab82edc5fb",
starting_code=516959010,
restricted_digit_set=False,
token="223770960008",
count=4,
)
print(f"{value=}")
print(f"{token_type=}")
print(f"{count=}")
print(f"{updated_counts=}")
value=998.0
token_type=2
count=5
updated_counts=None
Note that token_type=2 is wrong.
What operating system(s) are you using?
macOS
Additional Information
No response
- Lingua principale
- Python
- Stelle
- 15
- Fork
- 15
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di EnAccess/OpenPAYGO-python
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
EnAccess/OpenPAYGO-python#34 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
EnAccess/OpenPAYGO-python#25 ·
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
EnAccess/OpenPAYGO-python#22 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
EnAccess/OpenPAYGO-python#21 ·
-
documentation enhancement good first issue hacktoberfest help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
EnAccess/OpenPAYGO-python#15 ·
Tutte le issue di EnAccess/OpenPAYGO-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/skills#1811 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
speaches-ai/speaches#678 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
datalayer/mcp-compose#42 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
UKGovernmentBEIS/inspect_evals#2523 ·