Skip to content

fix broken actor link#43

Merged
RCFans merged 2 commits into
mainfrom
hotfix/sample-actor-link
Apr 13, 2026
Merged

fix broken actor link#43
RCFans merged 2 commits into
mainfrom
hotfix/sample-actor-link

Conversation

@RCFans

@RCFans RCFans commented Apr 13, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 13, 2026 02:18
@codecov

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to fix a broken actor_ref link in the bundled sap sample artifacts and hardens path validation for reading JSON artifacts in the sample Streamlit scenario planning app.

Changes:

  • Updated actor_ref fields in multiple sample/data/scenarios/sap/** JSON artifacts.
  • Strengthened _read_json_file path-safety checks in sample/app/scenario_planning.py by switching from startswith checks to resolve() + os.path.commonpath().

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
sample/data/scenarios/sap/traces/prior_snapshot.json Updates sample trace actor_ref path.
sample/data/scenarios/sap/traces/planning_query.json Updates sample trace actor_ref path.
sample/data/scenarios/sap/situation.json Updates situation actor_ref (context + source_meta).
sample/data/scenarios/sap/generation/log.json Updates generation log actor_ref path.
sample/app/scenario_planning.py Improves safe path resolution / traversal prevention when reading JSON artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -2,7 +2,7 @@
"pack_id": "sap",
"pack_version": "1.0.0",
"situation_id": "sap_reltio_acquisition",
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json",
"actor_ref": "data/actors/sap/actor_ontology.json",

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actor_ref now points to data/actors/sap/actor_ontology.json, but this repo does not contain a data/actors/ directory (the bundled sample actor ontology lives under sample/data/actors/sap/actor_ontology.json). Update the reference to a path that actually exists for the sample bundle so the link resolves when loading the sample artifacts.

Suggested change
"actor_ref": "data/actors/sap/actor_ontology.json",
"actor_ref": "sample/data/actors/sap/actor_ontology.json",

Copilot uses AI. Check for mistakes.
@@ -1,6 +1,6 @@
{
"situation_id": "sap_reltio_acquisition",
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json",
"actor_ref": "data/actors/sap/actor_ontology.json",

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actor_ref now points to data/actors/sap/actor_ontology.json, but there is no data/actors/ directory in this repo; the sample actor ontology is under sample/data/actors/sap/actor_ontology.json. This reference will still be broken when resolving actor_ref from the bundled sample artifacts.

Suggested change
"actor_ref": "data/actors/sap/actor_ontology.json",
"actor_ref": "sample/data/actors/sap/actor_ontology.json",

Copilot uses AI. Check for mistakes.
@@ -28,7 +28,7 @@
"How effectively Reltio's system will integrate data across SAP and non-SAP applications",
"Whether the acquisition will address the fundamental adoption barriers of BDC"
],
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json"
"actor_ref": "data/actors/sap/actor_ontology.json"

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actor_ref points to data/actors/sap/actor_ontology.json, but the bundled sample actor ontology is at sample/data/actors/sap/actor_ontology.json and data/actors/ does not exist in-repo. Use an in-repo path so the sample situation can be loaded without missing actor context.

Suggested change
"actor_ref": "data/actors/sap/actor_ontology.json"
"actor_ref": "sample/data/actors/sap/actor_ontology.json"

Copilot uses AI. Check for mistakes.
@@ -197,6 +197,6 @@
"generated_at": "2026-04-12T12:23:29.498395",
"pack_id": "sap",
"pack_version": "1.0.0",
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json"
"actor_ref": "data/actors/sap/actor_ontology.json"

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

source_meta.actor_ref now points to data/actors/sap/actor_ontology.json, but that path does not exist in this repo (sample actor ontology is under sample/data/actors/sap/actor_ontology.json). Keeping this consistent with the real file location avoids broken links in downstream viewers/loader utilities.

Suggested change
"actor_ref": "data/actors/sap/actor_ontology.json"
"actor_ref": "sample/data/actors/sap/actor_ontology.json"

Copilot uses AI. Check for mistakes.
@@ -71,7 +71,7 @@
"scenario_planner": {
"actor_style_enhancement": {
"stage": "scenario_enhance_prompt",
"actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json",
"actor_ref": "data/actors/sap/actor_ontology.json",

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This trace log actor_ref points to data/actors/sap/actor_ontology.json, but data/actors/ is not present in this repo (sample actor ontology is under sample/data/actors/sap/actor_ontology.json). Update to an existing path so the trace can be followed from the bundled sample artifacts.

Suggested change
"actor_ref": "data/actors/sap/actor_ontology.json",
"actor_ref": "sample/data/actors/sap/actor_ontology.json",

Copilot uses AI. Check for mistakes.
@RCFans RCFans merged commit 72f2350 into main Apr 13, 2026
11 checks passed
@RCFans RCFans deleted the hotfix/sample-actor-link branch April 13, 2026 03:17
@RCFans RCFans added the invalid This doesn't seem right label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants