Phase 6.4.25c: correct flex.appendChild -- live verification shows it works
Live probing against Penpot 2.16.2 (repeated, on a dedicated scratch page, cleaned up afterwards) shows board.flex.appendChild(shape) is a real function, distinct from board.appendChild, arity 1, throws nothing, and preserves visual insertion order -- unlike board.appendChild, which still inserts at the front as documented. The prior "broken" claim traces to the MCP server's own high_level_overview() text (CRITICAL / BROKEN / NEVER use), never verified with a live throw, and possibly confused with a real doc bug that mislabels the grid 3-arg example as board.flex. Removes flex.appendChild from the lint's FORBIDDEN patterns and from the gate 5 forbidden-behavior veto, updates PENPOT_API_VERIFIED.md with the verified facts, and drops the now-obsolete pattern from the replay filters in 05_build_dataset.py and 07_build_lora2_mix.py.
This commit is contained in:
@@ -302,7 +302,6 @@ def apply_prefix(content, prefix, mode):
|
||||
FORBIDDEN_PATTERN_NAMES = [
|
||||
"findShapeById con 2 argumentos",
|
||||
"propiedad .layout inexistente",
|
||||
"flex.appendChild",
|
||||
"import_image / importImage / createImage / filePath",
|
||||
"textAlign",
|
||||
"typography.setFont",
|
||||
|
||||
@@ -128,7 +128,6 @@ N_PENPOT_BASICOS = 50
|
||||
FORBIDDEN_REPLAY = [
|
||||
("findShapeById 2 args", re.compile(r"findShapeById\s*\([^)]*,")),
|
||||
(".layout inexistente", re.compile(r"\.layout\b(?!Child|Cell)")),
|
||||
("flex.appendChild", re.compile(r"\.flex\s*\.\s*appendChild\s*\(")),
|
||||
("createText sin argumento", re.compile(r"createText\s*\(\s*(''|\"\")?\s*\)")),
|
||||
("textAlign", re.compile(r"\.textAlign\s*=")),
|
||||
("importImage/createImage/filePath", re.compile(r"\b(importImage|import_image|createImage\s*\(|filePath)\b")),
|
||||
|
||||
@@ -85,11 +85,6 @@ FORBIDDEN = [
|
||||
"La clave `layout` que ves en la salida de shapeStructure() es del OUTPUT del helper, "
|
||||
"no una propiedad del shape.",
|
||||
),
|
||||
(
|
||||
"flex.appendChild",
|
||||
re.compile(r"\.flex\s*\.\s*appendChild\s*\("),
|
||||
"board.flex.appendChild esta roto. Usar board.appendChild(shape), en orden visual.",
|
||||
),
|
||||
(
|
||||
"fontSize/fontWeight/lineHeight/letterSpacing numerico",
|
||||
re.compile(r"\.(fontSize|fontWeight|lineHeight|letterSpacing)\s*=\s*-?\d"),
|
||||
|
||||
@@ -184,7 +184,6 @@ LINT = load_lint_module()
|
||||
VETO_PATTERN_NAMES = {
|
||||
"findShapeById con 2 argumentos",
|
||||
"propiedad .layout inexistente",
|
||||
"flex.appendChild",
|
||||
"fontSize/fontWeight/lineHeight/letterSpacing numerico",
|
||||
"import_image / importImage / createImage / filePath",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user