fix(skillgen): make --update append to cost.json like the initial build#1934
Open
kimdzhekhon wants to merge 1 commit into
Open
fix(skillgen): make --update append to cost.json like the initial build#1934kimdzhekhon wants to merge 1 commit into
kimdzhekhon wants to merge 1 commit into
Conversation
The initial full-build skill flow (Step 8 in core.md) appends each run to graphify-out/cost.json and updates the running totals. The --update (incremental) flow saves the manifest but never touched cost.json at all, so after the first full build, every subsequent `graphify update` printed its token usage to stdout and then discarded it — cost.json stayed frozen on the initial run's single entry forever. Add the same append-a-run-and-update-totals block to the shared references/update.md fragment (right after save_manifest), sourced from new_extraction's token counts and incremental['new_total'] for the file count. Regenerated the 14 per-host skill-*.md/update.md artifacts and their tools/skillgen/expected/ snapshots via `python -m tools.skillgen && python -m tools.skillgen --bless`. Fixes Graphify-Labs#1769.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
graphify-out/cost.jsonand updates running totals.--update(incremental) flow never touchedcost.jsonat all — it only callssave_manifest. So after the first full build, every subsequentgraphify updateprinted its token usage to stdout and discarded it;cost.jsonstayed frozen on the initial run's single entry forever, matching the symptom in cost.json never appends after the initial run — extract prints token counts but doesn't persist them #1769 exactly.references/update.mdfragment, right aftersave_manifest, usingnew_extraction's token counts andincremental['new_total']for the file count.update.mdartifacts and theirtools/skillgen/expected/snapshots viapython -m tools.skillgen && python -m tools.skillgen --bless.Fixes #1769.
Test plan
python -m tools.skillgen --check— clean after regenerating (no drift)uv run pytest tests/test_skillgen.py -q— 58 passeduv run pytest tests/ -q— full suite: 3264 passed (5 pre-existing failures unrelated to this change, missing optionalopenaidependency in this environment)graphify/skills/claude/references/update.mdcontains the new cost.json block with correct variable references