Skip to content

Commit 477ab06

Browse files
committed
fix broken actor link
1 parent eadfbc1 commit 477ab06

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

sample/app/scenario_planning.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,18 @@ def _render_json(path: str, payload: dict[str, Any] | None) -> None:
3737

3838
def _read_json_file(*, base_dir: Path, pack_id: str, filename: str) -> dict[str, Any] | None:
3939
try:
40-
workspace_base = os.path.normpath(str(WORKSPACE_ROOT))
41-
base_path = os.path.normpath(str(base_dir))
42-
if not base_path.startswith(workspace_base):
40+
workspace_base = os.path.normpath(str(WORKSPACE_ROOT.resolve()))
41+
base_path_obj = base_dir if base_dir.is_absolute() else (WORKSPACE_ROOT / base_dir)
42+
base_path = os.path.normpath(str(base_path_obj.resolve()))
43+
if os.path.commonpath([workspace_base, base_path]) != workspace_base:
4344
return None
4445

4546
safe_pack_id = _normalize_pack_id(pack_id)
4647
if not safe_pack_id:
4748
return None
4849

4950
fullpath = os.path.normpath(os.path.join(base_path, safe_pack_id, filename))
50-
if not fullpath.startswith(base_path):
51+
if os.path.commonpath([base_path, fullpath]) != base_path:
5152
return None
5253

5354
resolved_path = Path(fullpath)

sample/data/scenarios/sap/generation/log.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"scenario_planner": {
7272
"actor_style_enhancement": {
7373
"stage": "scenario_enhance_prompt",
74-
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json",
74+
"actor_ref": "data/actors/sap/actor_ontology.json",
7575
"admissible_before": true,
7676
"enhanced": false,
7777
"status": "noop",

sample/data/scenarios/sap/situation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"How effectively Reltio's system will integrate data across SAP and non-SAP applications",
2929
"Whether the acquisition will address the fundamental adoption barriers of BDC"
3030
],
31-
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json"
31+
"actor_ref": "data/actors/sap/actor_ontology.json"
3232
},
3333
"signals": [
3434
{
@@ -197,6 +197,6 @@
197197
"generated_at": "2026-04-12T12:23:29.498395",
198198
"pack_id": "sap",
199199
"pack_version": "1.0.0",
200-
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json"
200+
"actor_ref": "data/actors/sap/actor_ontology.json"
201201
}
202202
}

sample/data/scenarios/sap/traces/planning_query.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"situation_id": "sap_reltio_acquisition",
3-
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json",
3+
"actor_ref": "data/actors/sap/actor_ontology.json",
44
"space_inputs": [
55
{
66
"name": "Enterprise AI adoption shifting from model-first to data-context-first",

sample/data/scenarios/sap/traces/prior_snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"pack_id": "sap",
33
"pack_version": "1.0.0",
44
"situation_id": "sap_reltio_acquisition",
5-
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json",
5+
"actor_ref": "data/actors/sap/actor_ontology.json",
66
"raw_prior_scores": [
77
{
88
"scenario_key": "A",

0 commit comments

Comments
 (0)