microskills: a proposer reply with `"extractors": null` (or another wrongly typed field) aborts the fold, and the next session start pays for the proposer again
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with parse_payload and _rx in tokeneconomizer/microskills/distiller.py, then read the existing coverage in tests/test_generic_microskills.py. Reproduce the malformed proposer replies described in the issue and check how Distiller.update and fold_locked handle them. Done means wrongly typed entries are safely ignored, invalid patterns do not abort folding, and tests cover these cases.
由索引模型根据 Issue 内容生成。
描述
What happens
parse_payload (tokeneconomizer/microskills/distiller.py) checks that the proposer's reply is JSON, but not the types inside it:
{"extractors": null, "facts": []}raisesTypeError: 'NoneType' object is not iterable.- An extractor whose
patternis a list raisesTypeError: unhashable type: 'list'in_rx, which only catchesre.error. - A fact whose
detectoris a string raisesAttributeErrorin_ground.
The guard added for #131 only covers the runner call. These errors come later, out of Distiller.update, so they abort fold_locked before folded.json or the ledger is written. The session stays pending, so the next session start folds it again and calls the proposer again.
Repro
Offline: six sessions through hook.main, with TE_MICROSKILLS=on, the default k = 3, and the proposer stubbed to answer {"extractors": null, "facts": []}.
paid proposer calls: 9 (2 expected)
folded.json: ['s0']
ledger records: 1
errors.log tail: TypeError: 'NoneType' object is not iterable
Why it matters
- A model that writes
nullfor "no extractors" makes every later session start call the proposer again. Each of those calls is billed, and none of them reach the ledger. - The envfacts layer, which makes no model calls, stops learning too.
A side note, not part of the fix
PROPOSER_SYSTEM asks for "ONLY a JSON list of <=4 such objects", and a few lines later for "a JSON OBJECT {extractors, facts}". A reply that follows the first instruction is dropped without any notice. The prompt is pinned by a hash in tests/test_generic_microskills.py, so I've left it alone.
I have a fix with tests ready: parse_payload keeps only entries with the expected types, and _rx returns None for a non-string pattern. Happy to open a PR if that approach works for you.
- 主要语言
- Python
- 星标
- 5.6k
- 派生
- 344
- 平均合并
- 14 小时 41 分钟
- 30 天内合并 PR
- 54
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/TokenEconomizer 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
microsoft/TokenEconomizer#193 ·
维护者通常 1 天内回复
-
pricing: Claude's 1-hour cache writes are priced at 1.25x, but billed at 2x可能已有人在做 @anascherif 于 1 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 25/100
microsoft/TokenEconomizer#191 ·
维护者通常 1 天内回复
-
trace: Claude Code's `<synthetic>` notices count as requests and can make a Claude session price on the fallback curve可能已有人在做 @1AbdullahButt 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 20/100
microsoft/TokenEconomizer#189 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 20/100
microsoft/TokenEconomizer#186 ·
维护者通常 1 天内回复
-
plugin: the agent-output readers crash on a JSON line that is not an object可能已有人在做 @rahul05ranjan 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 25/100
microsoft/TokenEconomizer#182 ·
维护者通常 1 天内回复
查看 microsoft/TokenEconomizer 的全部 Issue
相似的 Issue
-
physical
难度 2/5 1-3 小时 新手友好度 74/100
antonyrag/ragleap-core#1339 ·
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 83/100
AllenCell/SubCellSeg#5 ·
-
[🐛 Bug]: oidc_authverifier.py strips trailing slash causing "Invalid token: Invalid issuer" error未关闭
难度 2/5 1-3 小时 新手友好度 76/100
keephq/keep#6934 · 1 个 reaction ·
维护者通常 1 天内回复
-
bug game: 01008BA02525A000 ios
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
needs-triage
难度 1/5 1 小时以内 新手友好度 87/100
gke-labs/kube-agents#5501 ·
维护者通常 1 天内回复