Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

extraction-spec has no rule for referencing nodes outside the chunk: agents copy id fragments or mint stub nodes, and replace-on-re-extract deletes real content

Aperta
#3,947 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@xiehuanyi ci sta già lavorando.

Dal 5/10/2026.

  • #4123 di @xiehuanyi — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Read references/extraction-spec.md, SKILL.md Step B3, and references/update.md, then trace the build_merge call and the existing allowed_source_files check. Done means foreign source_file values cannot replace existing content, cross-chunk references use complete ids or are reported, and dropped items are counted per file without breaking valid merges.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The subagent prompt in references/extraction-spec.md says how to build ids for
entities in the chunk's own files, and the merge in references/update.md relies
on source_file for replace-on-re-extract. The spec's source_file RULE fixes
the spelling of the value ("EXACTLY as it appears in FILE_LIST"), but nothing
tells a subagent what to do when a file in its chunk refers to an entity that
lives in a file outside its FILE_LIST, and nothing on the merge side
enforces membership. In one --update run that gap produced two separate
silent failures.

Related: #3253 and #537 (subagents can only relate files inside their own
FILE_LIST), #1895 / #2217 / #2260 (out-of-scope source_file, guarded in the
LLM backend path but not in the skill's subagent path), #3004 and #1711
(replace-on-re-extract losing content by other routes).

Failure 1: an id prefix is used as a complete id

To let chunks link to nodes owned by other chunks, the dispatching agent listed
the id prefixes those nodes share (the stem part of {stem}_{entity}).
Several subagents used the prefix verbatim as a target id. 115 edges pointed
at ids that do not and cannot exist. They validate as well-formed strings and
only disappear when the graph is built, as dangling endpoints.

The spec's id rule invites this: it defines ids as stem plus entity, so a stem
reads like a usable id. Step 4.5's health check reports dangling endpoints after
the fact, but by then the edges are already gone.

Failure 2: a stub node for a foreign file triggers destructive replace

Another subagent, asked only to reference three documents handled elsewhere,
defined its own stub node for each so that its edges would not dangle, with
source_file set to those documents. That is locally reasonable. But
build_merge drops every existing node whose source_file appears in the
incoming extraction, so the merge would have deleted 23 rich nodes extracted
earlier for those three documents and replaced them with three stubs.

Nothing would have reported it: node count still rises, the health check passes.
It was caught by reading the subagent's summary, not by any check. The skill's
Part B3 merge and the build_merge call in update.md do not compare incoming
source_file values against the files dispatched this run. The cache write does
(allowed_source_files=uncached), which is the check #1895 describes for the
backend path.

Expected

A subagent should never be able to change nodes for a file it was not given, and
a cross-chunk reference should either resolve to a real id or be reported, not
silently dropped.

Proposal

references/extraction-spec.md, prompt text:

  • Never create a node whose source_file is not in FILE_LIST. A reference to
    something outside the chunk is expressed as an edge only.
  • A dangling cross-chunk reference is acceptable; the controller resolves it.
  • If the prompt ever gives example ids, give complete ids, and state that a stem
    or prefix on its own is never a valid id.

SKILL.md Step B3 and references/update.md, before build_merge:

  • Drop (or re-attribute to the containing file) any incoming node, edge or
    hyperedge whose source_file is not in the set dispatched this run, and print
    how many were dropped per file. The same invariant #2217 proposes for the
    backend path.
  • Optionally, resolve unresolved edge targets centrally against the full id
    space (existing graph + all chunks), where it is known, instead of relying on
    each agent's reconstruction of ids it cannot see.

references/update.md, prose: state that replace-on-re-extract makes
source_file a destructive key, so every node's source_file must name the
file the node actually came from.

Environment: observed on graphifyy 0.9.55, graphify install --platform claude,
Claude Code on Windows 11; now on 0.9.65. Spec and merge flow checked in
v0.9.72 (both files unchanged since v0.9.61): no such rule or check. #2260,
still open, would add the dispatched-set check to the LLM backend path only.

Lingua principale
Python
Stelle
124k
Fork
11.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Graphify-Labs/graphify

Tutte le issue di Graphify-Labs/graphify

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.