Phase 6.3: stop the gate depending on penpot.root, and stop blaming the plugin for its own bugs

The setup returned penpot.root.id and the run aborted when it came back as
an empty string on the second prompt of a batch. penpot.root is the root of
the ACTIVE page, and after createPage plus openPage it need not have caught
up yet - a race the page-emptying code introduced, since that leaves the
emptied page active. The value was never useful anyway: every page shares
the same root id, so it identified nothing. Setup now returns only pageId,
which is unique and stable, and both the audit and the cleanup use it.

The diagnostic message is the second half of the same mistake. It printed
"PLUGIN DEGRADADO, ask the user to reload the browser" whenever any prompt
went unmeasured, regardless of why - so it said that for a failure that was
entirely the gate's own. A message that sends the user to reload their
browser when the bug is mine costs both of us time. It now classifies on
the error text: task timeouts and transport drops point at the plugin,
anything else points at the gate and says so explicitly.

Also closes two evaluation leaks the gate's own pre-flight caught, both in
the seeds rather than the gate prompts, since the prompts have to stay as a
real user would write them:
- A seed shared the 6-gram "la home de una escuela de" with gate prompt 9.
  My first fix was overwritten by a subagent still writing the file, which
  is why it reappeared.
- A seed used the same business as gate prompt 9 - a music school - without
  sharing any 6-gram. Shingles cannot see that: two texts describe the same
  business without sharing words. Training on the domain we then evaluate
  inflates the result invisibly. So the gate now also checks that no seed
  uses any of the gate's business nouns, listed explicitly.

The training mix was rebuilt: it had been assembled before the 20
ambiguous-brief seeds existed, so training on it would not have used the
corpus that was audited. The ambiguous-brief class gets its own mix portion
rather than being folded into design, because diluted across 76 design
seeds it would be at the mercy of a ratio, and that is the class the user
named as the main painpoint. 125 seeds, 168 unique payloads, 446 distinct
user prompts, 901 train and 99 eval.
This commit is contained in:
2026-07-30 20:07:40 +00:00
parent 387b237ee5
commit ad62277f14
6 changed files with 1309 additions and 1205 deletions
+9 -1
View File
@@ -93,12 +93,20 @@ PORTION_OF_GROUP = {
"B5": "diseno", "B6": "diseno", "B7": "diseno", "B8": "diseno",
"C": "api_preguntar",
"D": "api_recuperacion",
# Brief ambiguo: el usuario da UN adjetivo y ninguna paleta, y el modelo tiene que elegirla,
# justificarla y declararla. Es el painpoint principal del usuario y la contramedida directa
# a la cuarta causa raiz (la instruccion del servidor de no elegir colores propios).
# Va como porcion PROPIA y no dentro de 'diseno' para garantizarle un piso: diluida entre los
# 76 seeds de diseno quedaria a merced de la proporcion, y esta clase es justamente la que no
# puede quedar corta.
"E": "diseno_brief_ambiguo",
}
# Los targets son sobre la mezcla de 1000; las proporciones son las mismas que documenta el
# docstring (33.3 / 6.7 / 4.4 / 2.2 y 53.3 de replay).
PORTION_TARGETS = {
"diseno": 333,
"diseno": 253,
"diseno_brief_ambiguo": 80,
"api_forma_correcta": 67,
"api_recuperacion": 44,
"api_preguntar": 23,