Skip to content

V8 windows skill fix#1502

Open
antonioscarinci wants to merge 3 commits into
safishamsi:v8from
antonioscarinci:v8-windows-skill-fix
Open

V8 windows skill fix#1502
antonioscarinci wants to merge 3 commits into
safishamsi:v8from
antonioscarinci:v8-windows-skill-fix

Conversation

@antonioscarinci

Copy link
Copy Markdown
Contributor

fix: Fixed some issues with the Windows skill and excessive token consumption

antonioscarinci and others added 3 commits June 27, 2026 22:16
Combines v8's features (uv/pipx detection, graphify-out/ convention,
FalkorDB, Step 4.5 health check, directed-graph support, shrink-guard,
build_merge --update) with windows-skill-fix's approach (PowerShell
throughout, external windows-scripts/*.py, fail-fast, incremental
--update fix, Windows encoding fixes).

Key changes:
- windows-scripts/: all 34 scripts ported to graphify-out/ paths and
  v8 API (root=, cache_root=, directed=, build_from_json, etc.)
- detect_incremental.py: propagates all_files so manifest covers full
  corpus on --update, not just changed files
- check_graph_health.py: new script wrapping v8's diagnostics step
- skill-windows.md: rewritten for PowerShell with $GRAPHIFY_SCRIPTS
  loaded from file each step; --update uses inline build_merge() so
  edge direction is preserved (safishamsi#801, safishamsi#1344, safishamsi#1361)
- export.py: replace None attribute values before nx.write_graphml to
  avoid AttributeError on None-valued node/edge properties
- __main__.py: add --answer-file to graphify save-result to bypass
  Windows command-line length limit for long answers
- .gitattributes: add line-ending normalization rules for .py/.sh (LF)
  and .bat/.cmd (CRLF)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix the pyproject.toml so that the Windows skill .py scripts are
installed
Three root causes fixed:

1. skill-windows.md: add explicit routing guard so an AI following
   'do not skip steps' jumps directly to ## For --update after Step 1
   instead of running Steps 2-3 (full detect + full extraction) first.
   Also add note after build_merge() block confirming Steps 2-3 must
   not be re-run.

2. detect_incremental.py: pass kind='ast' to detect_incremental() as
   documented — kind='semantic' (default) mismatches when a prior run
   used kind='ast', treating every previously-updated file as changed.

3. save_manifest_and_cost.py: pass detect['files'] (changed files only)
   instead of detect.get('all_files') (full corpus). save_manifest()
   seeds unchanged entries from the existing manifest, so re-hashing
   the entire corpus on every --update is unnecessary and reads every
   source file.

The installed bash skill's references/update.md gets the same fix
(incremental['new_files'] instead of incremental['files']).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLua3wapoQZo5Z4ejhc5qt
safishamsi pushed a commit that referenced this pull request Jun 29, 2026
…le (#1502)

Two cross-platform fixes salvaged from #1502:

- to_graphml: nx.write_graphml raises ValueError on None attribute
  values, so a node/edge carrying a null field crashed the export.
  Coerce None -> "" for node and edge attributes before writing.

- save-result: add --answer-file as an alternative to --answer so long
  or multiline answers can be passed via a file instead of a fragile
  inline shell arg (notably Windows/PowerShell quoting). Exactly one of
  --answer / --answer-file is required.

The rest of #1502 (a version downgrade and a hand-edited generated
skill-windows.md that fails skillgen --check, plus duplicated
windows-scripts) is left for rework on the PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@safishamsi

Copy link
Copy Markdown
Owner

Thanks for this. I pulled the two clean, cross-platform fixes out of here and landed them on v8 as 407a7f1 (with your authorship), since they're useful on every platform and shouldn't wait on the larger Windows rework:

  • to_graphml null-attr coercionnx.write_graphml raises ValueError on a None attribute value, so a node/edge with a null field crashed the export. Now coerced to "".
  • save-result --answer-file — lets long/multiline answers come from a file instead of a fragile inline arg (Windows/PowerShell quoting). Exactly one of --answer/--answer-file is required.

Both shipped with regression tests and verified by smoke (GraphML with None on node+edge attrs exports to valid XML; a multiline+unicode answer round-trips through --answer-file).

Leaving this PR open for the rest, which needs rework before it can merge:

  1. pyproject.toml version — the branch was cut from an old v8 and this drags the version backward from 0.9.1 to 0.8.49. Please drop that line; releases are managed separately.
  2. graphify/skill-windows.md is a generated artifact (rendered from tools/skillgen/fragments/ by python -m tools.skillgen). It was hand-edited without touching the fragments, so skillgen --check fails and CI is red. The Windows skill changes need to be made in the fragments and regenerated so committed == rendered.
  3. windows-scripts/*.pyquery_graph.py and build_graph.py reimplement the existing graphify query / build pipeline. Prefer having the scripts shell out to the existing CLI commands rather than duplicating traversal/pipeline logic, which will drift over time.

Happy to re-review once those are addressed. Appreciate the Windows focus — it's a real gap.

safishamsi added a commit that referenced this pull request Jun 29, 2026
Covers #1499 (Ruby type-aware resolution), #1308/#1541 (workspace
exports map), #1529 (alias/workspace import-edge regression), #1531
(tsconfig paths fallbacks), #1527 (semantic cache pruning), #1475 (three
ObjC fixes), #1533 (Swift static-call confidence), #1442 (secondary LLM
timeout), #1502 (GraphML null coercion + save-result --answer-file),
#1530 (host-generic skill wording), and the Dependabot dep bumps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mathieucarbou-ibm pushed a commit to mathieucarbou-ibm/graphify that referenced this pull request Jun 29, 2026
…le (safishamsi#1502)

Two cross-platform fixes salvaged from safishamsi#1502:

- to_graphml: nx.write_graphml raises ValueError on None attribute
  values, so a node/edge carrying a null field crashed the export.
  Coerce None -> "" for node and edge attributes before writing.

- save-result: add --answer-file as an alternative to --answer so long
  or multiline answers can be passed via a file instead of a fragile
  inline shell arg (notably Windows/PowerShell quoting). Exactly one of
  --answer / --answer-file is required.

The rest of safishamsi#1502 (a version downgrade and a hand-edited generated
skill-windows.md that fails skillgen --check, plus duplicated
windows-scripts) is left for rework on the PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mathieucarbou-ibm pushed a commit to mathieucarbou-ibm/graphify that referenced this pull request Jun 29, 2026
Covers safishamsi#1499 (Ruby type-aware resolution), safishamsi#1308/safishamsi#1541 (workspace
exports map), safishamsi#1529 (alias/workspace import-edge regression), safishamsi#1531
(tsconfig paths fallbacks), safishamsi#1527 (semantic cache pruning), safishamsi#1475 (three
ObjC fixes), safishamsi#1533 (Swift static-call confidence), safishamsi#1442 (secondary LLM
timeout), safishamsi#1502 (GraphML null coercion + save-result --answer-file),
safishamsi#1530 (host-generic skill wording), and the Dependabot dep bumps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants