abhay-codes07
97922b9c66
fix(extractors): share the in-flight scan root via base, not graphify.extract ( #3666 )
...
`extractors/markdown.py` read the scan root of the extraction in flight with a
function-local `import graphify.extract` + `getattr(_extract,
"_XAML_ACTIVE_EXTRACT_ROOT", None)`. That violates MIGRATION.md invariant #4
("never import from graphify.extract inside this package; direction is
extract.py -> extractors/"), and the `getattr(..., None)` meant a rename of the
module global would silently disable Markdown wikilink (Obsidian vault)
resolution rather than fail loudly.
Move the ambient scan root onto `extractors/base.py` — where the extractors
legitimately live — as `set_active_scan_root()` / `active_scan_root()`.
`_safe_extract_with_xaml_root` now publishes the root there (still saving and
restoring for nested extraction), the two XAML readers and the Markdown vault
lookup read it through the accessor, and `markdown.py` imports it in the correct
direction. The `_XAML_ACTIVE_EXTRACT_ROOT` module global in extract.py is gone;
nothing else referenced it.
Behavior is unchanged — the same process-global root is set around each
extraction and read by the same sites. Tests assert the extractor no longer
imports graphify.extract (fails on the old code), that the set/get/restore
contract nests correctly, and that markdown's accessor IS the base accessor.
The markdown, XAML/dotnet, and language suites stay green; the only failures on
this machine are the pre-existing v8 baseline set (c-include determinism,
wikilink-unicode, two watch cwd-deleted cases), which fail identically on clean
v8.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JJbLfztSxm2tH5cJwBbe9q
(cherry picked from commit 86721f765d )
2026-10-16 18:21:28 +01:00
..
2026-10-13 10:27:02 +01:00
2026-10-10 22:13:39 +01:00
2026-10-11 20:47:55 +01:00
2026-10-16 18:21:28 +01:00
2026-10-08 14:27:06 +01:00
2026-10-05 19:40:12 +01:00
2026-10-09 19:18:06 +01:00
2026-10-16 17:10:31 +01:00
2026-10-12 12:16:17 +01:00
2026-10-16 17:10:31 +01:00
2026-10-12 14:49:28 +01:00
2026-09-29 13:49:39 +01:00
2026-10-05 20:11:30 +01:00
2026-10-02 17:10:08 +01:00
2026-10-12 23:02:50 +01:00
2026-10-07 17:26:00 +01:00
2026-10-04 20:40:34 +01:00
2026-09-22 15:00:07 +01:00
2026-09-22 14:58:22 +01:00
2026-10-13 22:21:43 +01:00
2026-10-12 14:49:28 +01:00
2026-10-16 17:13:49 +01:00
2026-10-09 02:48:22 +01:00
2026-10-08 14:27:06 +01:00
2026-09-30 20:41:10 +01:00
2026-09-25 15:44:08 +01:00
2026-10-16 17:14:07 +01:00
2026-10-11 21:07:15 +01:00
2026-10-02 17:10:07 +01:00
2026-10-06 20:54:55 +01:00
2026-10-02 17:10:07 +01:00
2026-09-27 18:56:31 +01:00
2026-10-13 11:14:16 +01:00
2026-10-13 11:18:12 +01:00
2026-10-04 20:23:44 +01:00
2026-10-02 16:50:45 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 11:14:16 +01:00
2026-10-06 20:54:15 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:43 +01:00
2026-09-27 18:39:52 +01:00
2026-10-12 14:50:32 +01:00
2026-10-13 22:21:48 +01:00
2026-10-12 13:01:00 +01:00
2026-10-12 22:37:55 +01:00
2026-10-04 02:07:23 +01:00
2026-10-12 12:29:39 +01:00
2026-09-25 16:01:47 +01:00
2026-10-16 18:21:28 +01:00
2026-10-13 22:21:43 +01:00
2026-10-16 17:10:31 +01:00
2026-09-28 10:15:38 +01:00
2026-10-12 22:58:40 +01:00
2026-10-10 21:20:29 +01:00
2026-10-08 14:28:54 +01:00
2026-10-08 14:28:27 +01:00
2026-10-04 20:23:14 +01:00
2026-10-07 17:26:00 +01:00
2026-10-11 20:49:42 +01:00
2026-10-11 20:49:42 +01:00
2026-10-09 02:51:03 +01:00
2026-10-11 21:06:09 +01:00
2026-09-23 16:54:04 +01:00
2026-10-12 22:58:40 +01:00
2026-10-14 22:53:26 +01:00
2026-10-07 17:26:17 +01:00
2026-10-07 17:52:47 +01:00
2026-09-23 19:45:40 +01:00
2026-10-13 22:21:43 +01:00
2026-10-16 18:21:28 +01:00
2026-09-30 20:10:34 +01:00
2026-10-14 22:31:57 +01:00
2026-10-13 22:53:44 +01:00
2026-10-12 22:37:54 +01:00
2026-09-22 14:58:12 +01:00
2026-09-22 14:58:12 +01:00
2026-10-13 11:14:22 +01:00
2026-10-16 17:12:53 +01:00
2026-10-13 11:14:26 +01:00
2026-10-09 19:46:57 +01:00
2026-10-08 14:27:06 +01:00
2026-09-30 20:41:10 +01:00
2026-10-10 21:37:39 +01:00
2026-10-13 10:26:57 +01:00
2026-10-13 10:26:57 +01:00
2026-10-16 17:10:31 +01:00
2026-10-16 17:10:31 +01:00
2026-10-10 21:20:29 +01:00
2026-10-12 14:49:28 +01:00
2026-10-13 11:14:16 +01:00
2026-10-04 02:08:29 +01:00
2026-10-09 19:18:06 +01:00
2026-10-06 20:54:35 +01:00
2026-09-25 16:15:15 +01:00
2026-10-14 22:31:57 +01:00
2026-10-04 20:23:44 +01:00
2026-10-14 22:31:57 +01:00
2026-10-12 22:37:54 +01:00
2026-10-12 22:37:54 +01:00
2026-10-09 19:18:06 +01:00
2026-10-09 19:18:06 +01:00
2026-10-10 01:13:46 +01:00
2026-10-07 17:26:00 +01:00
2026-10-12 23:02:44 +01:00
2026-10-12 23:02:50 +01:00
2026-10-16 17:10:31 +01:00
2026-10-16 17:11:41 +01:00
2026-10-10 22:11:03 +01:00
2026-10-04 20:23:14 +01:00
2026-09-27 18:39:52 +01:00
2026-10-13 11:14:16 +01:00
2026-10-05 19:40:12 +01:00
2026-09-30 20:41:10 +01:00
2026-10-14 22:53:26 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 22:38:11 +01:00
2026-10-16 17:10:31 +01:00
2026-10-11 20:47:44 +01:00
2026-10-11 20:49:42 +01:00
2026-10-10 01:24:41 +01:00
2026-10-12 22:58:40 +01:00
2026-10-02 16:50:45 +01:00
2026-09-30 20:41:10 +01:00
2026-10-07 17:26:00 +01:00
2026-10-09 19:18:06 +01:00
2026-10-05 20:12:06 +01:00
2026-10-13 22:53:44 +01:00
2026-10-16 17:12:53 +01:00
2026-10-07 17:26:17 +01:00
2026-10-07 17:26:17 +01:00
2026-10-09 19:18:06 +01:00
2026-10-13 11:16:15 +01:00
2026-10-13 11:14:16 +01:00
2026-09-26 13:45:58 +01:00
2026-10-14 22:53:26 +01:00
2026-10-14 22:53:26 +01:00
2026-10-10 01:13:46 +01:00
2026-10-07 17:26:00 +01:00
2026-10-05 19:40:04 +01:00
2026-10-11 20:49:42 +01:00
2026-09-28 10:18:13 +01:00
2026-10-05 19:40:12 +01:00
2026-10-12 14:49:34 +01:00
2026-10-13 11:14:30 +01:00
2026-10-13 11:14:30 +01:00
2026-10-08 14:27:06 +01:00
2026-10-13 10:27:02 +01:00
2026-09-25 15:44:21 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 13:01:40 +01:00
2026-10-12 22:37:54 +01:00
2026-10-12 22:37:55 +01:00
2026-10-08 14:28:20 +01:00
2026-10-06 20:54:15 +01:00
2026-10-08 14:29:00 +01:00
2026-10-08 14:29:19 +01:00
2026-10-12 13:02:22 +01:00
2026-10-16 17:11:42 +01:00
2026-10-10 01:33:40 +01:00
2026-10-12 22:37:54 +01:00
2026-10-08 14:28:54 +01:00
2026-10-16 17:11:41 +01:00
2026-10-10 01:28:39 +01:00
2026-10-13 22:53:44 +01:00
2026-10-12 13:01:00 +01:00
2026-10-12 22:58:40 +01:00
2026-10-10 01:01:10 +01:00
2026-10-09 19:17:53 +01:00
2026-10-08 14:27:06 +01:00
2026-10-10 22:11:03 +01:00
2026-10-02 17:10:07 +01:00
2026-10-05 20:11:30 +01:00
2026-10-02 17:10:07 +01:00
2026-10-16 17:12:53 +01:00
2026-10-09 02:48:23 +01:00
2026-10-04 01:43:04 +01:00
2026-10-14 22:34:17 +01:00
2026-10-02 17:10:07 +01:00
2026-10-11 21:06:10 +01:00
2026-10-13 11:14:16 +01:00
2026-10-10 21:20:29 +01:00
2026-10-04 02:07:00 +01:00
2026-10-04 02:07:00 +01:00
2026-10-12 12:18:15 +01:00
2026-10-07 17:26:00 +01:00
2026-10-12 22:37:54 +01:00
2026-10-09 19:18:06 +01:00
2026-10-16 17:13:49 +01:00
2026-10-11 21:06:10 +01:00
2026-10-16 17:13:54 +01:00
2026-10-12 14:49:29 +01:00
2026-10-09 19:17:53 +01:00
2026-10-05 20:12:34 +01:00
2026-10-09 19:18:06 +01:00
2026-10-13 10:26:57 +01:00
2026-10-07 17:26:00 +01:00
2026-10-16 17:12:42 +01:00
2026-10-07 17:26:00 +01:00
2026-10-10 22:11:03 +01:00
2026-10-02 17:10:07 +01:00
2026-09-23 17:01:39 +01:00
2026-10-04 01:43:04 +01:00
2026-10-08 14:27:06 +01:00
2026-10-04 20:40:34 +01:00
2026-10-04 20:23:44 +01:00
2026-10-13 11:14:16 +01:00
2026-10-13 11:14:16 +01:00
2026-10-12 22:37:54 +01:00
2026-10-09 19:18:06 +01:00
2026-09-27 18:39:51 +01:00
2026-10-11 20:49:48 +01:00
2026-10-02 17:10:07 +01:00
2026-10-10 21:38:54 +01:00
2026-10-16 17:11:41 +01:00
2026-10-07 17:26:11 +01:00
2026-10-11 20:47:44 +01:00
2026-10-09 19:18:06 +01:00
2026-09-30 20:41:10 +01:00
2026-10-12 23:02:50 +01:00
2026-10-07 17:26:00 +01:00
2026-10-06 20:54:15 +01:00
2026-10-14 22:53:26 +01:00
2026-10-12 22:58:40 +01:00