Skip to content

detect: exempt Office/Workspace sidecars from the ignore check (#3504) - #3516

Closed
ayushcodes10 wants to merge 1 commit into
Graphify-Labs:v8from
ayushcodes10:fix-3504-office-sidecar-gitignore
Closed

detect: exempt Office/Workspace sidecars from the ignore check (#3504)#3516
ayushcodes10 wants to merge 1 commit into
Graphify-Labs:v8from
ayushcodes10:fix-3504-office-sidecar-gitignore

Conversation

@ayushcodes10

Copy link
Copy Markdown
Contributor

Summary

Fixes #3504. detect() converts .docx/.xlsx files and Google Workspace shortcuts into markdown sidecars under graphify-out/converted/, then ran the same scan-ignore check against the sidecar's own freshly-written path. The documented "Migration and portability" gitignore advice puts the whole output directory inside a gitignored tree, so that check rejected the tool's own output for the same reason a user would gitignore it — the source document silently vanished from the corpus, with nothing recorded in skipped_sensitive or anywhere else to explain why. Installing graphifyy[office] therefore appeared to fix Office support while changing nothing observable.

The ignore check exists to keep user files out of the scan, not to filter output this same detection pass just produced from an already-admitted source file. Both conversion branches (Office and Google Workspace) now exempt a sidecar that lands under converted_dir from the ignore check — matching the issue's own suggested fix exactly.

Test plan

  • Added two regression tests in tests/test_detect.py, one per conversion branch, each writing a .gitignore covering graphify-out/ (matching the documented advice) and mocking the converter to confirm the sidecar still reaches files['document'].
  • Verified both tests fail without the fix (reverted detect.py, confirmed AssertionError: 0 == 1 on both) and pass with it.
  • Full suite: python3 -m pytest -q — 5457 passed, only the pre-existing unrelated failures (test_ollama_retry_cap.py missing openai in this env, one flaky timing assertion in test_ts_import_type_arguments.py).
  • python3 -m tools.skillgen --check — OK.

🤖 Generated with Claude Code

https://claude.ai/code/session_017qfdzgbA5KedGEjD1AayNh

detect() converts Office files and Google Workspace shortcuts into
markdown sidecars under a converted subdirectory of the output dir,
then ran the same scan ignore check on the sidecar's own path. The
documented gitignore advice puts the whole output dir inside a
gitignored tree, so that check rejected the tool's own output for
the same reason a user would gitignore it, and the source document
vanished from the corpus with nothing recorded about why. The check
exists to keep user files out of the scan, not to filter output this
same pass just produced from an already admitted source, so a
sidecar under the converted directory is now exempt from it. Fixes
Graphify-Labs#3504.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qfdzgbA5KedGEjD1AayNh

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphify reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Formal verification. No changes could be formally verified in this run.


Graphify review — findings

Exempts converted sidecars living under converted_dir from the _ignored_for_scan check in detect, so Office and Google Workspace conversions aren't dropped when the documented .gitignore advice puts graphify-out/ in an ignored tree. Without the exemption, every .docx/.xlsx/.gdoc silently vanishes from the corpus once a repo follows that advice, since the tool's own output dir is gitignored for the same reason. Adds tests covering both conversion branches landing a sidecar in a gitignored output dir.

No blocking issues surfaced. 5 lower-confidence candidates did not survive cross-model review.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 2392 functions depend on the 524 functions this change touches.

Health — this change adds coupling hotspots:

  • new: extract() — 585 callers, 44 callees
  • new: _rebuild_code() — 115 callers, 51 callees
  • new: detect() — 112 callers, 15 callees
  • new: _extract_generic() — 18 callers, 26 callees
  • new: save_manifest() — 40 callers, 11 callees
  • new: extract_files_direct() — 17 callers, 20 callees
  • new: extract_js() — 85 callers, 4 callees
  • new: extract_xaml() — 19 callers, 17 callees
  • …and 44 more — each is listed as a finding

Verification — 2392 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 963 function(s) in the blast radius were not formally verified this run

Test selection

Test selection

51 of 273 test file(s) selected (19%) via static blast radius.

  • tests/test_astro_extraction.py — impact
  • tests/test_atomic_writes.py — impact
  • tests/test_build.py — impact
  • tests/test_charmap_encoding.py — impact
  • tests/test_chunking.py — impact
  • tests/test_cjs_module_extension.py — impact
  • tests/test_claude_cli_backend.py — impact
  • tests/test_cpp_nested_and_cli.py — impact
  • tests/test_detect.py — impact, changed-test
  • tests/test_dotnet.py — impact
  • tests/test_evidence_binding.py — impact
  • tests/test_extract.py — impact
  • tests/test_extract_cli.py — impact
  • tests/test_file_slice.py — impact
  • tests/test_ignore_file_encoding.py — impact
  • tests/test_image_vision.py — impact
  • tests/test_import_extension_resolution.py — impact
  • tests/test_incremental_mtime_collision.py — impact
  • tests/test_indirect_dispatch.py — impact
  • tests/test_indirect_dispatch_assign_return.py — impact
  • tests/test_indirect_dispatch_getattr.py — impact
  • tests/test_js_exported_scalar_bindings.py — impact
  • tests/test_languages.py — impact
  • tests/test_llm_backends.py — impact
  • tests/test_long_path_hashing.py — impact
  • tests/test_manifest_ingest.py — impact
  • tests/test_mcp_ingest.py — impact
  • tests/test_multilang.py — impact
  • tests/test_non_regular_files.py — impact
  • tests/test_office_incremental.py — impact
  • tests/test_office_limits.py — impact
  • tests/test_ollama.py — impact
  • tests/test_out_dir_evidence.py — impact
  • tests/test_oversized_document_slicing.py — impact
  • tests/test_package_json_subpath_imports.py — impact
  • tests/test_pdf_slicing.py — impact
  • tests/test_pdf_token_estimate.py — impact
  • tests/test_phantom_external_import.py — impact
  • tests/test_pipeline.py — impact
  • tests/test_python_underscore_resolution.py — impact
  • tests/test_rationale.py — impact
  • tests/test_ruby_resolution.py — impact
  • tests/test_scala_self_type.py — impact
  • tests/test_stale_prune.py — impact
  • tests/test_swift_computed_properties.py — impact
  • tests/test_ts_new_expression_calls.py — impact
  • tests/test_typescript_module_extensions.py — impact
  • tests/test_unmapped_at_alias_resolution.py — impact
  • tests/test_vue_extraction.py — impact
  • tests/test_watch.py — impact
  • … and 1 more

Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.

Formal verification

Could not verify: Could not verify detect.

The verifier did not have enough to check detect, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: parameter `root` is annotated `Path` — outside the synthesizable primitive/collection set

· 52 more finding(s) on lines outside this diff (see the check run).

@safishamsi

Copy link
Copy Markdown
Collaborator

Shipped in v0.9.60 — landed on v8 via cherry-pick with your authorship preserved. Thanks @ayushcodes10 — Office/Workspace converted sidecars are no longer dropped when graphify-out/ is gitignored. Release: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.60

@safishamsi safishamsi closed this Sep 12, 2026
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.

Office sidecars in graphify-out/converted/ are silently dropped when graphify-out is gitignored

2 participants