PHP: WordPress templates with inline HTML report whole-file parse_unusable on 0.12.1
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
The payload names no source file for the PHP extractor, so start from the inline-HTML masking introduced for #2000/#2389 and find where the <?php open tag on the first line changes the parse verdict. Run the four-case script at /tmp/cbm-test/repro.py, which compares <?php $a = 1; ?> with the tags on their own lines. Done means the WordPress-style block file reports parse_partial with its PHP symbols extracted, and the repro script exits 0.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
PHP: WordPress templates (inline HTML after ?>) report whole-file parse_unusable on 0.12.1
Version: codebase-memory-mcp 0.12.1 (macOS arm64, Apple Silicon)
Related: #2000 / #2389 (inline HTML masking) — the fix works for plain
templates, but the verdict still flips to whole-file parse_unusable for
very common WordPress / ACF shapes.
What happens
Indexing a theme alone in a fresh temp dir reports parse_unusable
(whole_file, ~4 nodes extracted instead of the ~230 nodes you get with the
same file re-shaped):
| file | result |
|---|---|
block/v2/service-cta-4/service-cta-4.php |
parse_unusable, nodes=4 |
includes/nav/Navigation.php (class + inline HTML form markup) |
parse_unusable, nodes=4 |
same file, HTML head with <?php on its own line, ?> on its own line |
partial, nodes=5 |
Because parse_unusable throws away line ranges, check_index_coverage
answers read_source_directly for those paths, so the whole block library
(63/942 files in a large theme, the biggest part of the graph) is gone.
Reproduction
Single file, fresh temp dir each run:
import json, os, shutil, subprocess
CVM = "/path/to/codebase-memory-mcp"
ROOT = "/tmp/repro"
def verdict(body):
shutil.rmtree(ROOT, ignore_errors=True)
os.makedirs(ROOT)
open(os.path.join(ROOT, "t.php"), "w").write(body)
r = subprocess.run([CVM, "cli", "--json", "index_repository", "--repo-path", ROOT,
"--name", "repro", "--mode", "fast"], capture_output=True, text=True)
r2 = json.loads(json.loads(r.stdout)["content"][0]["text"])
return r2.get("parse_unusable_count", 0), r2.get("nodes", 0)
# A. WordPress block: php inline on line 1, html tail.
print(verdict('<?php $a = 1; ?>\n<div class="p-4"><?= $v ?></div>\n')) # ( 1, 4)
# B. The same file with the php tag alone on line 1 / closing alone:
print(verdict('<?php\n$a = 1;\n?>\n<div class="p-4"><?= $v ?></div>\n')) # ( 0, 5)
# C. Pure php control:
print(verdict('<?php\nfunction f() { return 1; }\n')) # ( 0, 6)
Moving the <?php/?> tags onto their own lines flips the file from
parse_unusable to parse_partial (html masked, symbols extracted). The
html-masking pass (#2389) is not consistently in effect for the inline-open
shape.
Expected
Same class of input as #2000: PHP symbols should keep being extracted and
the file should be parse_partial — not parse_unusable with no symbols.
The check_index_coverage "unusable" verdict hides the ranges and makes
callers re-read every template.
Environment
- codebase-memory-mcp 0.12.1,
cli index_repository --mode fast(the MCP
server tool behaves identically) - repro:
/tmp/cbm-test/repro.py(4-case assert, exit 0/1) - macOS 26, arm64
- Lingua principale
- C
- Stelle
- 45.8k
- Fork
- 3.8k
- Merge medio
- 2g 18h
- PR unite (30g)
- 108
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DeusData/codebase-memory-mcp
-
bug ux/behavior
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DeusData/codebase-memory-mcp#3191 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation enhancement parsing/quality ux/behavior
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
DeusData/codebase-memory-mcp#3131 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
hook-augment: the five-row cap keeps the first five search_graph rows, so variables and modules displace function definitions (v0.12.1)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug editor/integration parsing/quality ux/behavior
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DeusData/codebase-memory-mcp#3062 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Generated client files (AGENTS.md block, SKILL.md) teach a call syntax no harness can executeApertabug documentation editor/integration parsing/quality
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DeusData/codebase-memory-mcp#3050 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
editor/integration parsing/quality
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DeusData/codebase-memory-mcp#2286 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di DeusData/codebase-memory-mcp
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
I maintainer di solito rispondono entro 1 giorno
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameApertagame: 010065A014024000 ios
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
seedds/nxnative#3714 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni