devflow-engine 1.2.5__py3-none-any.whl → 1.2.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  __all__ = ["__version__"]
2
2
 
3
- __version__ = "1.2.5"
3
+ __version__ = "1.2.7"
@@ -282,6 +282,24 @@ def _repro_tests_under_observability_sandbox(
282
282
  return True
283
283
 
284
284
 
285
+ def _is_executable_repro_artifact(path: Path) -> bool:
286
+ name = path.name.lower()
287
+ if name in {"playwright.config.ts", "playwright.config.js", "playwright.config.mjs", "playwright.config.cjs"}:
288
+ return False
289
+ if name in {"package.json", "package-lock.json", "pnpm-lock.yaml", "yarn.lock"}:
290
+ return False
291
+ if path.suffix.lower() not in {".py", ".js", ".jsx", ".ts", ".tsx"}:
292
+ return False
293
+ if path.suffix.lower() == ".py":
294
+ return name.startswith("test_") or name.endswith("_test.py") or "repro" in name
295
+ return (
296
+ ".spec." in name
297
+ or ".test." in name
298
+ or name.startswith("repro_")
299
+ or name.startswith("repro-")
300
+ )
301
+
302
+
285
303
  def _validate_ui_observability_repro(
286
304
  observation: dict[str, Any],
287
305
  *,
@@ -314,6 +332,59 @@ def _validate_ui_observability_repro(
314
332
  return True, None
315
333
 
316
334
 
335
+ def _load_sandbox_observability_artifact(
336
+ *,
337
+ repo_root: Path,
338
+ error_task_id: str,
339
+ runtime_context: dict[str, Any] | None,
340
+ ) -> dict[str, Any] | None:
341
+ obs_dir = repo_root / ".devflow" / "observability" / error_task_id
342
+ output_path = obs_dir / "repro_output.txt"
343
+ if not output_path.is_file():
344
+ return None
345
+
346
+ candidates = [
347
+ p for p in sorted(obs_dir.iterdir())
348
+ if p.is_file() and _is_executable_repro_artifact(p)
349
+ ]
350
+ if not candidates:
351
+ return None
352
+
353
+ artifact = candidates[0]
354
+ rel_artifact = artifact.relative_to(repo_root).as_posix()
355
+ output = output_path.read_text(encoding="utf-8", errors="replace")[-12000:]
356
+ report = _as_dict(_as_dict(runtime_context or {}).get("user_report"))
357
+ title = str(report.get("title") or "").strip()
358
+ command = (
359
+ f"cd /workspace && npx playwright test {rel_artifact} --reporter=list"
360
+ if artifact.suffix.lower() in {".js", ".jsx", ".ts", ".tsx"}
361
+ else f"cd /workspace && python {rel_artifact}"
362
+ )
363
+ return {
364
+ "observed": True,
365
+ "confidence": "high",
366
+ "summary": "Recovered existing sandboxed observability repro artifacts.",
367
+ "likely_location": title,
368
+ "affected_files": [],
369
+ "deferred_questions": [],
370
+ "repro_artifact_path": rel_artifact,
371
+ "repro_run_command": command,
372
+ "repro_output": output,
373
+ "repro_oracles": [
374
+ "Sandboxed repro output captures the reported failing behavior before fix dispatch."
375
+ ],
376
+ "repro_tests": [
377
+ {
378
+ "file": rel_artifact,
379
+ "name": artifact.stem,
380
+ "language": artifact.suffix.lstrip("."),
381
+ "rationale": "Recovered from .devflow/observability sandbox artifacts.",
382
+ }
383
+ ],
384
+ "artifact_recovery": True,
385
+ }
386
+
387
+
317
388
  def _persist_fix_proof(
318
389
  *,
319
390
  store: ExecutionStore,
@@ -894,6 +965,14 @@ class BuildObservabilityNode(Node):
894
965
 
895
966
  if cached_observation is not None:
896
967
  out: dict[str, Any] = {"observable": True, "observation": cached_observation, "cache_hit": True}
968
+ elif source_kind == "user_report" and (
969
+ recovered_observation := _load_sandbox_observability_artifact(
970
+ repo_root=repo_root,
971
+ error_task_id=error_task_id,
972
+ runtime_context=context.get("runtimeContext") if isinstance(context.get("runtimeContext"), dict) else None,
973
+ )
974
+ ) is not None:
975
+ out = {"observable": True, "observation": recovered_observation, "artifact_recovery": True}
897
976
  else:
898
977
  fn: Callable[[dict[str, Any]], dict[str, Any]] = funcs["build_observability_fn"]
899
978
  out = fn(context)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devflow-engine
3
- Version: 1.2.5
3
+ Version: 1.2.7
4
4
  Summary: DevFlow v2 CLI-first engine (projects, stories, execution store, review packets)
5
5
  Author: DevFlow
6
6
  License: Proprietary
@@ -1,4 +1,4 @@
1
- devflow_engine/__init__.py,sha256=BjG-4A0W5jUNLQNn-VOizHHitPlUgD8ycR4OdIzqiVA,49
1
+ devflow_engine/__init__.py,sha256=RlEeZORd3A8UxZw0tQHLXIZvGcy1LyHO2RVS2PQ16lQ,49
2
2
  devflow_engine/agentic_prompts.py,sha256=z5F0lzlrpscG4UBs8chZapF3iAk6eE16yv9i6m1tO3g,4424
3
3
  devflow_engine/agentic_runtime.py,sha256=omfRST0LB6jvULs6ItavtOnqhWI1ZujzWfYqpe57-yI,13912
4
4
  devflow_engine/api_key_flow_harness.py,sha256=LBvibkcgTcTWCgsesvkHXZ2t902iicOab_FlH-Qzdy4,21468
@@ -32,7 +32,7 @@ devflow_engine/devin2/agent_definition.py,sha256=pCp915tojwPlepRpvjlU1DoPuT_anxR
32
32
  devflow_engine/devin2/pi_runner.py,sha256=xRl-qA3RgMFgiR5fnG6fTwwL95PMk6zVdRdFa-fXy2E,7466
33
33
  devflow_engine/error/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  devflow_engine/error/remediation.py,sha256=Z4LJQzZPzb7_6tea_XtasDvFYQiEdpkFlyxoCEO1I2k,548
35
- devflow_engine/errors/error_solver_dag.py,sha256=3AwSXowKCvN2qPfmdQpGlP1vZs1484K3ucFMg7gM5Zw,61744
35
+ devflow_engine/errors/error_solver_dag.py,sha256=tpGhyFupAPXimQ7tb3TCndEBH2xzyA73n4EIVjWcPA4,64770
36
36
  devflow_engine/errors/question_classifier.py,sha256=oBJ29hszG--TUna62BQHnNmi6hPwf-wEE8eGLmgS624,9729
37
37
  devflow_engine/errors/repo_quality_judge.py,sha256=LVBaXN6AsID-x8qb-IriQKYY1c9AMMRNo-tWMeiuMaA,9962
38
38
  devflow_engine/errors/runtime_observability.py,sha256=Do93Ah3vxLEocYtC0JpnRIRQN6uNAOkYjBz0pmOqg5g,29719
@@ -382,7 +382,7 @@ devflow_engine/prompts/source_doc_mutation/source_doc_enrichment_coherence/promp
382
382
  devflow_engine/prompts/source_doc_mutation/user_workflows/prompt.md,sha256=2Bv-EkZwzxtPSsDGdw9YuuuzT1c_2R9c6HPSMdP-MD0,406
383
383
  devflow_engine/prompts/source_scope/doctrine/prompt.md,sha256=AJk1gfePTdaBSw5DHvCr7Sigsk2orGaRVNZ3Dj3NdcQ,837
384
384
  devflow_engine/prompts/ui_grounding/doctrine/prompt.md,sha256=0L5y-QjjquPABqxAHZNPkcjyHMZQSDRVncNDQa2app0,409
385
- devflow_engine-1.2.5.dist-info/METADATA,sha256=7Y7iTfjy7KVMpz9VahpEnY-SAPITRsNliQ7kNf3WQ5s,7755
386
- devflow_engine-1.2.5.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
387
- devflow_engine-1.2.5.dist-info/entry_points.txt,sha256=U5Pw4y4v4u4xcRS5DbXfemBg0RKp74kMxcnEoL0MACY,99
388
- devflow_engine-1.2.5.dist-info/RECORD,,
385
+ devflow_engine-1.2.7.dist-info/METADATA,sha256=UyB54O5Rm_-k1Y9Wfge1TPrFOUxI2-dGLvDQjEAwBfY,7755
386
+ devflow_engine-1.2.7.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
387
+ devflow_engine-1.2.7.dist-info/entry_points.txt,sha256=U5Pw4y4v4u4xcRS5DbXfemBg0RKp74kMxcnEoL0MACY,99
388
+ devflow_engine-1.2.7.dist-info/RECORD,,