fix: complete approved layout and prompt cancellation safeguards

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-10-24 23:42:46 +08:00
co-authored by multica-agent
parent 4f4a75b3da
commit 7ddd1d32d0
13 changed files with 114 additions and 66 deletions
+2
View File
@@ -16,3 +16,5 @@ Additional verification:
- `python3 scripts/hel840/compare_reference.py --reference /path/to/approved-v2.html --output ./evidence/hel840/tokens.json` compares token values; it does not claim screenshot pixel equality.
The approved original HTML and PNGs must be supplied unchanged from the approved attachment. Keep originals, mapping and actual application captures separate. For cancellation/timeout screenshots the isolated fixture accelerates the total timeout to 1.5 seconds; the product uses 120 seconds. Complete recognized weighted expressions are preserved verbatim so their weights cannot move to another operand. Closing a request does not promise that a supplier stops charging.
Review packaging supports `--matrix-run finalized --states-run finalized` when the final full capture was recorded under that directory. This keeps a single source capture for the delivered matrix and states.
+3 -1
View File
@@ -118,6 +118,8 @@ try:
1
).click()
page.wait_for_timeout(150)
assert page.locator(".mlist").bounding_box()["height"] >= 212
assert page.locator(".mrow").first.bounding_box()["y"] >= 44
if label.startswith("04"):
page.locator("#desk-prompt").wait_for()
page.locator("#desk-prompt").fill(
@@ -137,7 +139,7 @@ try:
"height": height,
"page": label,
"dom": page.evaluate(
"""()=>{const rect=s=>{const n=document.querySelector(s);if(!n)return null;const r=n.getBoundingClientRect(),c=getComputedStyle(n);return {x:r.x,y:r.y,width:r.width,height:r.height,bottom:r.bottom,font:c.font,fontFamily:c.fontFamily,color:c.color,background:c.backgroundColor}};return {overflow:document.documentElement.scrollWidth>innerWidth,theme:document.documentElement.dataset.theme,main:rect('main'),resume:rect('.resume'),library:rect('.lib2'),filter:rect('.mg-side'),detail:rect('.lib-detail'),models:rect('.mdl'),modelDetail:rect('.mdl-detail'),band:rect('.ptband'),dock:rect('.studio-form'),media:rect('.stage-media .print'),generate:rect('.gen')}}"""
"""()=>{const rect=s=>{const n=document.querySelector(s);if(!n)return null;const r=n.getBoundingClientRect(),c=getComputedStyle(n);return {x:r.x,y:r.y,width:r.width,height:r.height,bottom:r.bottom,font:c.font,fontFamily:c.fontFamily,color:c.color,background:c.backgroundColor}};return {overflow:document.documentElement.scrollWidth>innerWidth,theme:document.documentElement.dataset.theme,main:rect('main'),resume:rect('.resume'),library:rect('.lib2'),filter:rect('.mg-side'),detail:rect('.lib-detail'),models:rect('.mdl'),modelList:rect('.mlist'),modelRow:rect('.mrow'),modelDetail:rect('.mdl-detail'),band:rect('.ptband'),dock:rect('.studio-form'),media:rect('.stage-media .print'),generate:rect('.gen')}}"""
),
}
)
+12 -10
View File
@@ -12,6 +12,8 @@ parser = argparse.ArgumentParser()
parser.add_argument("--approved", type=Path, required=True)
parser.add_argument("--evidence", type=Path, required=True)
parser.add_argument("--output", type=Path, required=True)
parser.add_argument("--matrix-run", default="delivery")
parser.add_argument("--states-run", default="default-verification")
args = parser.parse_args()
root = Path(__file__).resolve().parents[2]
evidence = args.evidence.resolve()
@@ -36,19 +38,19 @@ for name in [
"HEL-837-交互样本-v2.html",
]:
copy(args.approved / name, Path("originals") / name)
for p in (evidence / "delivery/matrix").rglob("*.png"):
copy(p, Path("product") / p.relative_to(evidence / "delivery/matrix"))
for p in (evidence / "default-verification/states").glob("*.png"):
for p in (evidence / args.matrix_run / "matrix").rglob("*.png"):
copy(p, Path("product") / p.relative_to(evidence / args.matrix_run / "matrix"))
for p in (evidence / args.states_run / "states").glob("*.png"):
copy(p, Path("states") / p.name)
for p in (evidence / "motion-hd/motion").glob("*.png"):
copy(p, Path("motion") / p.name)
for run, name in [("default-verification", "interactions"), ("motion-hd", "motion-hd")]:
for run, name in [(args.states_run, "interactions"), ("motion-hd", "motion-hd")]:
for i, p in enumerate((evidence / run / "recordings").glob("*.webm")):
copy(p, Path("recordings") / f"{name}-{i}.webm")
for run, name in [
("delivery", "geometry.json"),
("delivery", "token-comparison.json"),
("default-verification", "interaction-checks.json"),
(args.matrix_run, "geometry.json"),
(args.matrix_run, "token-comparison.json"),
(args.states_run, "interaction-checks.json"),
("motion-hd", "motion-checks.json"),
("restart", "restart-check.json"),
]:
@@ -67,7 +69,7 @@ for name in [
"motion-840.log",
]:
copy(root / name, Path("logs") / name)
for run in ["delivery", "default-verification", "motion-hd"]:
for run in dict.fromkeys([args.matrix_run, args.states_run, "motion-hd"]):
copy(evidence / run / "server.log", Path("logs") / f"{run}-server.log")
copy(
evidence / run / "fixture/provider.jsonl",
@@ -79,12 +81,12 @@ for p in (root / "scripts/hel840").glob("*"):
copy(p, Path("reproduction/scripts/hel840") / p.name)
copy(root / "docs/changelogs/2026-10-24-hel840-v2.md", Path("实现与自测说明.md"))
# Fake-only snapshots; never include daemon roster/state or installed configuration.
for p in (evidence / "default-verification/fixture/assets/uploads").glob("*"):
for p in (evidence / args.states_run / "fixture/assets/uploads").glob("*"):
if p.is_file():
copy(p, Path("reproduction/fixture/assets/uploads") / p.name)
for name in ["before-empty.db", "calliope_config.json"]:
copy(
evidence / "default-verification/fixture" / name,
evidence / args.states_run / "fixture" / name,
Path("reproduction/fixture") / name,
)
head = subprocess.check_output(
-1
View File
@@ -318,7 +318,6 @@ if not conn.execute("SELECT 1 FROM projects LIMIT 1").fetchone():
"name": "暮色",
"description": "隔离夹具",
"prompt": "夜景中的猫",
"negative_prompt": "",
},
]
},