2948 Commits
Author SHA1 Message Date
safishamsiandClaude Opus 4.8 5eedffa874 chore(release): bump version to 0.9.105
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
v0.9.105
2026-11-09 16:49:51 +00:00
safishamsiandClaude Opus 4.8 4067e31a88 docs(changelog): add the export/build/llm/perf/skillgen/deps/markdown/csharp batch to 0.9.105
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-09 16:47:24 +00:00
safishamsiandClaude Opus 4.8 6021290cf2 chore(cache): combine the schema-42 bump for markdown (#4806) and csharp (#4849)
Both change per-file extractor output (Markdown bare free-function mention
citation; C# extension-method facts + primitive receiver typing) and land in one
release window, so they share a single bump to 42 chained over prior (41).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-09 16:46:54 +00:00
Deepjyoti-Sarmah acae154d4c fix(csharp): use the 0.75 discrete tier for guarded extension edges (#4828)
The INFERRED rubric is {0.55, 0.65, 0.75, 0.85, 0.95}; the guarded rungs were
emitting 0.70, which test_inferred_confidence_rubric rejects (and which the
rubric has no tier for). 0.75 is the intended one-step-below-0.85 score.

(cherry picked from commit 27c01196ab)
2026-11-09 16:46:28 +00:00
Deepjyoti-Sarmah 7058cbd612 test(csharp): score candidates against the production BCL deny-list (#4828)
The A/B record imported a second copy of the deny-list, so the comparison could
silently stop describing the rule the fix applies. Use one source of truth.

(cherry picked from commit d49009e351)
2026-11-09 16:46:28 +00:00
Deepjyoti-Sarmah b824c815d2 feat(csharp): bind extension calls on chained receivers (#4828)
Closes the last shape in the report: `v.ToString().Mask()`. The receiver of the
outer call is the result of an inner call, so it carries no type at all, and
typing it would need BCL return types the corpus does not know.

The untyped rung therefore applies the same two name proofs the out-of-corpus
rung uses — the name is not a BCL member, and no regular method in the corpus
spells it — with no type-compatibility filter, and requires a unique surviving
declaration. A capitalized untyped receiver is a type named in source
(`Convert.ToInt32(x)`), never a value an extension applies to, so it is skipped.

This is the weakest rung and it is scored accordingly: INFERRED 0.70. The cost is
pinned by a fixture where a regular method elsewhere shares the name: the call
stays unbound rather than risking a false edge.

With all three rungs the reporter's corpus now matches the expected output:

  Connections (3):
    <-- StringExtensions [method] [EXTRACTED] Ext.cs:L3
    <-- .A() [calls] [INFERRED] Svc.cs:L3
    <-- .B() [calls] [INFERRED] Svc.cs:L4

Refs #4828

(cherry picked from commit 99d2834910)
2026-11-09 16:46:28 +00:00
Deepjyoti-Sarmah 8f4317704a feat(csharp): bind extension calls on primitive and third-party receivers (#4828)
Stage 1 deliberately refused a receiver whose type the corpus never declares,
which left the issue's headline case unbound: `s.Mask()` on a `string`, and the
same shape for `int` and any third-party type.

An undeclared type cannot have its instance members enumerated, so the
instance-wins rule cannot be applied. Two conservative proofs replace it:

  * the member name is not one a BCL type owns (`ToString`, `GetValue`, `Split`,
    ...), because those calls are instance calls on the real runtime type; and
  * no regular (non-extension) method anywhere in the corpus spells that name, so
    an in-corpus type cannot legitimately own it either.

A `this T` / `this object` declaration is subject to the same guard and still
applies only when no exact or base/interface match exists. These edges are
INFERRED 0.70, one discrete tier below a receiver typed by the extractor's
declaration table, so a query can tell the two proofs apart.

The reported false negative this cannot reach — `string.ToInt32()` when an
unrelated static class also declares `ToInt32` — is pinned as a documented miss
in the ground-truth fixtures rather than papered over.

Refs #4828

(cherry picked from commit f80468a01b)
2026-11-09 16:46:28 +00:00
Deepjyoti-Sarmah 637e9c6d8e feat(csharp): bind extension calls on typed receivers (#4828)
`value.Mask()` to a classic `this`-parameter extension produced no `calls`
edge: `_resolve_csharp_member_calls` types the receiver and looks the method up
on the receiver's type, but an extension is declared on a static class, so the
lookup found nothing and the call was dropped. The helper looked dead.

New `csharp_extension_calls` resolver, registered after the nominal pass, joins
a call site to the declaration its `this` parameter names. This first stage
binds only provable calls:

  * the receiver's declared type is declared in the corpus and its base chain is
    fully resolved — an out-of-corpus base may declare an instance member of
    that name, and an instance member always wins over an extension;
  * the receiver type declares no instance member of that name;
  * the declaring static class's namespace is visible at the call site, walked
    innermost namespace declaration outward (`CsharpNameResolver
    .visible_namespaces`), so a file-level using is only considered at the
    compilation-unit level and an inner-namespace extension wins;
  * the extended type is the receiver's type, a resolved base, or an implemented
    interface; an open generic `this T` / `this object` declaration applies only
    when no exact or base match exists;
  * the declaration accepts the call's argument count, reusing the arity /
    min_arity facts from #4584 (the receiver is one parameter short of the call);
  * exactly one declaration survives; a tie binds nothing.

Edges are INFERRED 0.85 (the receiver type comes from the extractor's declaration
table), sourced at the call site.

The tests pair the implementation with an executable A/B record: 15 fixtures
whose ground truth is decidable from the C# spec, and 10 candidate strategies
measured on the nominal graph (production resolver disabled for extraction). The
matrix test pins the trades that were measured rather than assumed — no scope
check binds an unimported extension, no poison binds through an unknown base, no
deny-list binds `PropertyInfo.GetValue`, and the bare-name fallback reproduces
the #1609 god-node edge. The production pass is asserted against the same ground
truth in test_csharp_extension_resolution.py.

Refs #4828

(cherry picked from commit a83cc6c0e3)
2026-11-09 16:46:28 +00:00
Deepjyoti-Sarmah 5bfb4241d8 fix(csharp): record extension-method facts and primitive receiver types (#4828)
A call to a classic `this`-parameter extension method produced no `calls`
edge: the member-call resolver looks the method up on the receiver's declared
type, while an extension is declared on a static class. Two facts were missing
before any resolver could join them.

The extractor now persists, on the extension method's node:

  extension: true
  extended_type: <simple name of the `this` parameter's type>
  extended_type_arity: <generic arity of that type>
  extended_is_type_param: true for `this T`

`_csharp_method_signature` already detected the `this` modifier, but only used
it to compute `min_arity`; the extended type is the join key a call site needs
and is recorded where the declaration is still at hand. The type is the same
simple name a receiver is stamped with (`_read_csharp_type_name` strips the
namespace qualifier and generic arguments), so qualified `this App.Widget` and
generic `this Box<int>` are comparable with `receiver_type`.

`_csharp_receiver_type_name` no longer drops every lowercase type: predefined
primitives are not declared in the corpus, but `this string` dispatches on
exactly that name, so filtering them made those calls untypeable before the
extension pass could ever see them. The parking path is guarded in exchange:
`_park_if_absent` does not park a well-known BCL receiver name as a cross-repo
candidate, so `x.ToString()` on an `int` no longer stamps an `unresolved_calls`
payload on the caller.

AST cache schema 29 -> 30: cached `.cs` extractions lack the new facts.

Refs #4828

(cherry picked from commit 6a15bfefab)
2026-11-09 16:46:28 +00:00
Lalit Madan 7b1d14489f test(markdown): isolate rebuild tests in a subprocess
The cache stat index and active scan root are process globals; in the full
suite a prior test's root can be served to a later rebuild and drop the
resolver-minted reference edges. Running each rebuild scenario in a fresh
interpreter gives the test the clean slate it has in isolation.

(cherry picked from commit d559ea232d)
2026-11-09 16:45:48 +00:00
Lalit Madan 1c74ae85af fix(markdown): resolve reference-style links to their uses (#4806)
(cherry picked from commit 814ae07bd8)
2026-11-09 16:45:48 +00:00
Lalit Madan b77380be5c fix(markdown): a bare free function name needs its file cited (#4804)
`resolve_markdown_mentions` linked bare code spans like `token` or `raw`
to unrelated free functions carrying the same label across languages.

Require section-scoped evidence for bare prose-like free function names:
- Keep a bare free-function mention only if the section cites the defining
  file (via a code span, file link, or path qualification) or cites another
  symbol from that file (#4804).
- Exempt distinct code identifiers (snake_case, camelCase, or PascalCase
  in export-by-convention languages).
- Extract source-file links as file citations, scoped to enclosing headings
  as evidence owners, minting doc->file references only for scanned files.
- Resolve inline Markdown links strictly against document-relative targets,
  and reject mixed-form citations escaping the scan root.
- Reconcile doc->file citations in watch rebuilds and bump AST cache schema.

(cherry picked from commit 638ab3ec18)
2026-11-09 16:45:48 +00:00
safishamsiandClaude Opus 4.8 130e072b8d fix(deps): raise the pypdf floor to 6.21.4 and refresh the lock (#5015)
Picks up the pypdf 6.21.3/6.21.4 security fixes in both the pdf and all extras.
Regenerated uv.lock on current v8 so the graphifyy self-entry reads 0.9.104 and
the pypdf bump lands on a clean lock (the PR's lock carried a stale self-version
from its fork). pdf extraction tests pass on 6.21.4.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-09 16:45:30 +00:00
yotamleo 41f82c11a6 fix(deps): raise the pypdf floor to 6.21.4
pypdf 6.21.2 in uv.lock is affected by seven advisories (GHSA-42gh-23hr-vphw,
GHSA-4vqv-7265-gm2w, GHSA-5849-834g-hvw5, GHSA-62m5-6wh8-28x7,
GHSA-cggf-277g-3q54, GHSA-mfr5-77xh-9j7h, GHSA-x3rh-gjgm-fmqc), fixed in
6.21.3 and 6.21.4. Raise the floor in the pdf and all extras and refresh the lock
with uv lock --upgrade-package pypdf (6.21.2 to 6.21.4).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 99aa336ab3)
2026-11-09 16:45:14 +00:00
safishamsiandClaude Opus 4.8 caa6a0783b fix(llm): keep .yaml/.yml out of the splittable-document set (#5078 follow-up)
The doc-bisect fix added .yaml/.yml to _SPLITTABLE_TEXT_SUFFIXES, but those are
code, not documents (reclassified document->code in #2214), and never reach the
semantic pass, so slicing them at prose boundaries is meaningless. Drop the two
suffixes and their test parametrization; the core truncation-bisect fix stands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-09 16:45:05 +00:00
thanhsonvoice 76a80a838c fix(skillgen): tell claw/kiro/pi subagents to write their chunk to CHUNK_PATH
claw, kiro and pi dispatch semantic subagents with a CHUNK_PATH and expect
each to write its chunk file there, but they shipped the compact extraction
spec, which never names CHUNK_PATH. A subagent following that prompt
verbatim returned its JSON inline, so Step B3 found no chunk file and
reported the chunk as missing.

Add a compact-disk spec variant (the compact prompt plus the CHUNK_PATH
substitution and write step) and switch claw, kiro and pi to it. Codex keeps
the plain compact spec: its workers return JSON inline and the orchestrator
writes the chunk files.

Add a regression test: every host whose dispatch passes CHUNK_PATH gets a
spec that writes to it, and the inline-JSON host (codex) does not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b26a79372d)
2026-11-09 16:44:15 +00:00
marq 4e781ef8bc fix(llm): bisect splittable documents below char cap on output truncation (#5072)
(cherry picked from commit 3d06d10849)
2026-11-09 16:44:15 +00:00
dherreraj 91cc31b05f feat(llm): forward a custom provider's extra_headers as default_headers (#3680)
providers.json can already override request body fields with
`extra_body`, but not headers, and some OpenAI-compatible gateways
require one: OpenCode Go rejects any request without
`x-opencode-session` (400 MissingSessionID). The only workaround was
the SDK-global OPENAI_CUSTOM_HEADERS env var.

Accept an optional `extra_headers` object on a provider entry and pass
it to the OpenAI client as `default_headers` at both construction
sites, extraction (`_call_openai_compat`) and `_call_llm` (labeling and
the --dedup-llm tiebreaker). Only string-to-string entries are kept,
and an Authorization entry is dropped with a warning, so the API key
still always comes from the provider's env_key. Without the field, the
client is built exactly as before.

(cherry picked from commit 82b48065ac)
2026-11-09 16:44:06 +00:00
tpateeq eb9468a906 perf(extract): free whole-graph intermediates early to cut peak RAM
graphify extract kept several full copies of the graph alive after they
were consumed. Release each one as soon as it is used, without changing
call order or output (graph.json is byte-identical):

- extract(): new opt-in release_parse_memo clears the Python parse memo
  once both resolution passes finish; the CLI sets it, watch/MCP/library
  callers keep the warm memo as before.
- extract CLI: drop the parsed previous graph.json once the resolution
  context is built, the context after AST extraction, and the raw
  AST/semantic/merged lists once G is built.
- to_json: canonicalize node/link dicts in place, and free the shrink
  guard copies and the previous-graph parse before writing.
- cluster._partition: drop the sorted edge rows once stable is built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ykSAxiohPs7ei9m9DasUD
(cherry picked from commit 3892aea30b)
2026-11-09 16:44:06 +00:00
Khaled Ali 2643077a22 fix(export): don't count replaced or pruned sources as lost in the write guard
to_json passed an empty deleted_sources to _lost_saved_semantic_nodes, so
the old ids of every doc build_merge re-extracted this run (LLM ids are not
stable) were reported as lost whenever the guard was armed, e.g. by an
omitted file. build_merge now stashes the saved sources it replaced
(semantic tier) or pruned on G.graph, and to_json pops it and excuses them.
Sources with an unverified shrink (#3203) and untouched files stay guarded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ec964ea137)
2026-11-09 16:44:05 +00:00
sdivyanshu90 b327203c30 fix(build): tolerate structured enum fields
Report malformed enum values without hashing them, and use conservative builder fallbacks so one structured field cannot abort a usable extraction.

Refs #5086

Co-authored-by: OpenAI <noreply@openai.com>
(cherry picked from commit 00da7d0155)
2026-11-09 16:44:04 +00:00
safishamsiandClaude Opus 4.8 177b35e6a5 chore(cache,query): combine the schema-41 bump and clarify the qualified-tail doc
Fold the Markdown mention change (#5093) into #5098's AST schema-41 comment with a
chained prior (40), since both change per-file extractor output and share one
release window. Correct the _qualified_tail docstring example (a dotted tail is
one token, not CamelCase-split) and note the CamelCase fallback only fires on
cased input the lowercased-norm_label callers never pass (#5095 tweak).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-09 14:21:57 +00:00
safishamsiandClaude Opus 4.8 98dc02b1a1 docs(changelog): open 0.9.105 for the watch/cpp/markdown/wiki/build/query batch
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-09 14:21:45 +00:00
safishamsiandClaude Opus 4.8 d51dce6164 fix(cpp): park a typed cross-repo local member call from the chain resolver (#5098 follow-up)
#5098's receiver-chain resolver dropped a single-element chain (`Greeter g;
g.greet()`) when the receiver's class is declared in no local file, where the
pre-chain path parked it by type name for the cross-repo merge to finish (#3152).
Restore that parking for a single-element chain with a known-but-local-absent
receiver type, so a typed local calling into another repo is parked, not lost.
Fixes test_cross_repo_member_calls[cpp-typed-local].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-09 14:21:09 +00:00
Brenden Smith ae55b5b219 fix(cpp): resolve typed member chains across headers
Preserve lexical receiver types and access operators, resolve fields by their declaring class, and unwrap supported standard smart pointers without guessing ambiguous targets. Persist class metadata for incremental resolution and invalidate older AST caches. Add regression and negative coverage for split headers, shadowing, namespace collisions, forward declarations, and cached rebuilds.

(cherry picked from commit 287b78caca)
2026-11-09 14:09:57 +00:00
Aditya kumar singh 8fcec967ac fix(markdown): do not drop uppercase namespace classes or parenthesized method mentions
(cherry picked from commit ba55e741f3)
2026-11-09 14:09:56 +00:00
Houyun Sun 107ddf0846 fix(path): refuse an endpoint whose words the graph doesn't know
`graphify path` fell back to the top of the score ranking for any name that
matched no tier, so `zzqqxx_no_such_symbol_9137` resolved to
`no_such_symbol_helper()` (three shared `_`-split tokens) and printed its route
with exit 0, while `explain` on the same name said "No node matching".
Nothing that exists could have answered that request, and the route reads as
if it had.

The fallback now only runs when every word of the query appears in some
node's name or id. That keeps the partial names it is there for
(`draft-generator` -> `draft-generator.ts`, `Reject-everything judge` ->
`Degenerate Reject-Everything Judge`, a label the caller is still typing) and
turns a name made of unknown words into the miss `explain` already reports,
which the CLI surfaces as exit 4.

Fixes #5079

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit a084c3dd67)
2026-11-09 14:09:49 +00:00
Houyun Sun 3192fdf1f4 fix(query): match a label's name after its schema/namespace qualifier
`query sweep_widget_state` missed `public.sweep_widget_state()` even though
`explain` on the same name found it. The full-query tier only fires when the
joined query tokens equal or prefix the label, so a leading `public` defeated
it, and the per-token tiers handed the seed slots to unrelated nodes whose
whole label is one of the query's tokens (`SWEEP`, `WIDGET`, `State`).

Add a tier between exact and prefix for labels of the shape
`<qualifier><sep><rest>` where the query names exactly `<rest>`: dotted,
`::`, `/`, `:` and `@` segments, plus a CamelCase qualifier on the last
segment. It is scaled down by the qualifier's token count and capped at four
tokens, so `public.f()` is trusted more than `a.b.c.d.f()`. Trailing
file-extension and numeric segments are skipped, so `lib/foo/bar.py` is the
name `bar` rather than `py`.

Nothing changes for a query that already equals or prefixes a label, or for
plain snake_case identifiers: those never reach the new branch.

Fixes #5080

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 8d2e1caed8)
2026-11-09 14:09:46 +00:00
Houyun Sun 913b8e3a56 fix(detect): keep the racily-clean window when seen lands before mtime
_mtime_may_hide_a_rewrite() bailed out with "the mtime check already fired"
whenever seen - mtime came out negative. The caller only reaches it after the
stored and current mtime compared equal, so that shortcut skipped the hash on
a row that was still written in the same tick as the file.

seen is time.time() and mtime is the filesystem's, so the two clocks can
disagree by a few hundred nanoseconds in either direction (#5036: ~240 ns on
NTFS). When they do, a same-length rewrite inside the tick goes undetected and
detect_incremental reports the file as unchanged.

Only the magnitude of the delta says anything about whether the row is current,
so compare -delta against the same window. A row stamped a full window before
the mtime is still from an earlier run and keeps the stat-only fastpath.

Tests: test_a_row_stamped_just_before_the_mtime_still_hashes reproduces the
signed-delta miss, and test_a_row_stamped_well_before_the_mtime_keeps_the_
fastpath pins that the fastpath is not widened to every row.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 376f333f72)
2026-11-09 14:09:36 +00:00
sen bce80814d7 fix: resolve calls through destructured CommonJS barrel requires
A destructured require that reaches a symbol through a barrel
(`const { SourceCode } = require('./index')`, where `index.js` re-exports
`SourceCode` from another module) left the symbol import edge on the
barrel. The barrel defines no node, so cross-file call resolution found no
import evidence and dropped the `calls` edge.

Keep the required target file and imported name on the structural require
edge, then follow the target's exports to the declaring symbol before
cross-file resolution runs. The keys are internal and removed from the
final graph.

Fixes #5034

(cherry picked from commit 689e18a87e)
2026-11-09 14:09:31 +00:00
Aditya kumar singh 8a5756266a fix(tree): derive common directory root from file parents in build_tree
(cherry picked from commit 96fcb3b54e)
2026-11-09 14:09:25 +00:00
Aditya kumar singh d63d41165b fix(affected): recursively seed nested member nodes for file seeds
(cherry picked from commit 31e7414d7c)
2026-11-09 14:09:23 +00:00
nothariharan cbc48a69ab fix(cache): stop a degraded semantic entry from pinning the corpus (#5083)
An under-produced semantic extraction (e.g. a doc chunk that returns only
its file-level node) is saved to the unversioned content-hash cache
without a `partial` flag. The #3203 shrink guard then refuses the graph
write on every later run while the cache keeps serving the degraded chunk,
so no LLM call is ever made again and the corpus stays un-updatable until
the entry is deleted by hand.

`save_semantic_cache` cannot read graph.json (and should not), so the
shared shrink handler marks the entry the read path would serve `partial`
once the guard has measured the shrink. `load_cached` already treats
`partial` as a miss, so the next run re-dispatches the file and a complete
extraction overwrites the same content-hash key with a clean entry. This
covers both a fresh under-production and a run that replays an
already-poisoned entry written by an older version.

The guard's stderr now separates "fresh extraction is smaller" from "a
cached smaller chunk is being replayed", names the marked cache entry, and
stops recommending --allow-partial for the cached case: following that
advice would write the degraded replay over the larger graph and drop the
prior nodes.

Tests: cache-level marking (prompt-fingerprinted and legacy flat
fallback), plus two end-to-end CLI repros that fail on the old code. The
second demonstrates the reported loop: the next run hit the poisoned
cache and refused again without ever calling the model.

(cherry picked from commit fc7f700f9e)
2026-11-09 14:09:22 +00:00
nothariharan 0a14069d7f fix(build): keep hyperedges whole across an incremental merge (#5081)
_load_existing_graph backs build_merge (--update) and merge_raw_extraction (--update --no-cluster). It read hyperedges only from the top-level key, so a graph.json whose hyperedges live in the node-link slot (graph.hyperedges, the shape node_link_data-only writers emit) lost its whole hyperedge set on the next incremental merge. build_from_json already folds that slot (#2485); the loader now does too. A top-level list still wins (the canonical slot, and the CLI's source pruner edits only it); a missing, null, or malformed top-level value falls back to the nested list instead of dropping or raising on a readable set.

The deleted-source prune also removed nodes AFTER build() had revalidated hyperedge members, so a surviving cross-file hyperedge kept naming the deleted file's node. Re-run the same #1916 policy once the node set is final: drop members that no longer resolve, and drop the hyperedge only when no member remains.

Adds the reported #5081 flow end to end, nested-only coverage for both incremental paths, malformed top-level fallback, top-level precedence, and deleted-member pruning.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@deepseek.com>
(cherry picked from commit e71d14cfa0)
2026-11-09 14:09:20 +00:00
nothariharan 1de3f09607 fix(wiki): fold slugs with casefold so the orphan sweep keeps current articles
to_wiki allocated unique slugs with str.lower() while the orphan sweep
indexed produced filenames with str.casefold(). For labels whose lower()
spellings differ but whose case folds agree ("Straße" / "STRASSE",
"Σ" / "ς"), both slugs were allocated, the folded map kept one, and the
sweep unlinked the other freshly written article. The export reported
both and index.md linked to the deleted page.

Dedup slugs on casefold(), the same relation the sweep uses, keeping the
existing ASCII filename behavior. Also skip any file whose exact name is
in produced before consulting the folded map, so "never delete a file
this run wrote" holds even if the two rules drift again, and build the
map from sorted(produced) so the survivor is deterministic.

Regressions cover community/community, community/hub and hub/hub
collisions for German sharp-s and Greek sigma, verify every link and
article body, and require repeated exports to be a byte-identical
fixpoint. The relabel test guards against turning the cleanup into a
no-op.

Fixes #5087

(cherry picked from commit 914f70d3fa)
2026-11-09 14:09:19 +00:00
Deepjyoti-Sarmah 43e1d4650a fix(watch): keep the recursive handler alive off Linux (#5074)
The pruned watch tree is Linux-only. macOS and Windows still use a
recursive schedule, so `watched` stays empty and the handler's parent
guard dropped every event. Apply the guard only when the manual tree is
active, and leave the recursive fallback alone when an ignore file
changes.

Add a darwin-simulated regression test and make the schedule contract
tests platform-aware.

(cherry picked from commit 2ee00533dd)
2026-11-09 14:09:19 +00:00
Deepjyoti-Sarmah ce66353f93 test(watch): pin the pruned watch tree (#5033)
Add a fake-observer scheduling test and a Linux inotify watch-count
test. Update the three contract assertions from recursive=True to
recursive=False.

(cherry picked from commit 3215888c13)
2026-11-09 14:09:19 +00:00
Deepjyoti-Sarmah 23390d21b1 fix(watch): survive ENOSPC while adding a watch (#5033)
inotify_add_watch returns ENOSPC when max_user_watches is exhausted.
Log and skip that directory instead of killing the watcher.

(cherry picked from commit 3c4c84a017)
2026-11-09 14:09:19 +00:00
Deepjyoti-Sarmah d81c4a9556 fix(watch): reload ignore rules when an ignore file changes (#5033)
The ignored predicate is built at startup. Rebuild it and reschedule the
tree when .graphifyignore or .gitignore changes, so a newly ignored
directory stops being watched and a newly unignored one starts.

(cherry picked from commit 509df2b391)
2026-11-09 14:09:19 +00:00
Deepjyoti-Sarmah 73a1e861a0 fix(watch): drop events from directories no longer watched (#5033)
A directory moved out of the root can still deliver an event after its
watch is removed. Drop events whose parent is not in the watched map,
and stale file paths whose parent no longer exists.

(cherry picked from commit cf36ca04d4)
2026-11-09 14:09:19 +00:00
Deepjyoti-Sarmah 549ae57159 fix(watch): prune ignored directories from the watch tree (#5033)
On Linux, schedule non-recursive watches only for directories that
ignored_predicate() keeps. Recursive schedule installs a watch on every
directory, including .graphifyignore'd trees, and can exhaust
max_user_watches.

New and moved directories are scanned and their existing files are
synthesized as created events, so mkdir && write is not missed.

(cherry picked from commit 0c60a6ce10)
2026-11-09 14:09:19 +00:00
safishamsiandClaude Opus 4.8 6c8002eca4 docs(changelog): cite the correct per-PR issues for the 0.9.104 robustness batch
The @azizur100389 cluster fixes #5016/#5017/#5018/#5019/#5020 (one each), not a
shared #5020, and the fresh-subfolder query fix references #2603. Correct the
thanks/issue refs and add the PR numbers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-08 00:50:14 +00:00
safishamsiandClaude Opus 4.8 433a57a002 test(install): allow the lean-core line budget for the #4762 per-block reads
The scan-path injection fix reads graphify-out/.graphify_root once per Python
block, so the lean claude core grew from ~795 to 807 lines. Raise the ceiling to
820 — still far under the ~1156-line pre-split monolith the guard exists to catch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
v0.9.104
2026-11-07 23:19:08 +00:00
safishamsiandClaude Opus 4.8 cb5106e861 chore(release): bump version to 0.9.104
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-07 23:13:24 +00:00
safishamsiandClaude Opus 4.8 c3d5305eb2 security(skill): read the scan root from .graphify_root, never substitute it (#4762)
The generated /graphify runbook substituted the agent-supplied scan path straight
into Python string literals across every code block: detect(Path('INPUT_PATH')),
extract(cache_root=Path('INPUT_PATH'), root=Path('INPUT_PATH')), the semantic
cache check/save, build_from_json/generate/diagnose, the manifest write, and the
--update detect_incremental + merge. A scan root whose NAME carried a single
quote or a $(...) / backtick broke out of the literal and ran as arbitrary code
the moment the block ran (e.g. a cloned repo with a subdirectory named
$(...) ). The shell transport was already hardened (#3642/#3844 write the path
to graphify-out/.graphify_root through a quoted heredoc); this extends the same
trust boundary to the Python blocks.

Each block now reads the resolved root from graphify-out/.graphify_root (the file
Step 1 writes) into an INPUT_PATH variable and passes the value, so the path is
always inert data, never code. The prose no longer tells the agent to substitute
a path. Applied to the assembled hosts (core.md, references/shared/update.md) and
to the Aider and Devin monoliths; a new _is_input_path_sidecar_fix_line sanctions
the monolith diff and --monolith-roundtrip / --check / --audit-coverage stay
green. A fast regression guard asserts no generated skill body carries a quoted
'INPUT_PATH' code literal.

SPEC_PATH (the skill's own extraction-spec install path, not attacker-controlled)
is left substituted and tracked as a follow-up.

Reported and first proposed by @danikdanik in #4762.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-07 23:13:09 +00:00
safishamsiandClaude Opus 4.8 1a6c252195 docs(changelog): add the extractor/watch/ingest/query/cli batch to 0.9.104
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-07 22:36:35 +00:00
safishamsiandClaude Opus 4.8 cd9634832c fix(cli): reject non-finite or negative provider pricing (#5031 follow-up)
The landed fix caught a non-numeric price but still accepted nan, inf and
negative values, which parse as floats and then flow into cost estimation as
NaN/inf/negative. Validate each --pricing-input/--pricing-output through
_valid_price (finite and >= 0) with the same clean error + exit(1), and test
that nan/inf/-inf/1e999/-5 are rejected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-07 22:36:00 +00:00
safishamsiandClaude Opus 4.8 6ee8e2258e fix(tree): align node-alias precedence with the graph build (#5030 follow-up)
tree_html.build_tree folded aliases in a different order (src first) than
build._fold_node_aliases (src last), so a node carrying two conflicting file
aliases could key on different paths in the viewer vs the built graph. Use the
same order and pop the consumed alias, as the build-side fold does.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-07 22:36:00 +00:00
Aditya kumar singh 778c906a08 fix(cli): support equals-syntax and safe float validation for provider pricing flags
(cherry picked from commit e39355c7fe)
2026-11-07 22:33:56 +00:00
Aditya kumar singh c018fc9f97 fix(tree): support src and file aliases to prevent empty tree viewer
(cherry picked from commit 035b0ada94)
2026-11-07 22:33:55 +00:00