Release version 0.1.9 with persona integration#39
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR releases 0.1.9 and extends the deterministic pipeline with persona + status artifacts, improves reason-chain step summaries, updates the situation brief lifecycle/status handling, and refreshes the docs/UI + bundled sample artifacts for the end-to-end “strategic reasoning flow”.
Changes:
- Add persona/status artifact generation + “local-first” skipping behavior to situation analysis (with
--forceoverride). - Normalize/derive non-placeholder reason-chain step summaries (<=100 words) and add unit coverage.
- Update Streamlit apps + README/README.zh + sample artifacts to demonstrate the full flow.
Reviewed changes
Copilot reviewed 39 out of 42 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_situation_service.py | Adds unit coverage for local-first skipping and persona/status ensure behavior. |
| tests/unit/test_reason_chain_summary_normalization.py | New unit test for reason-chain step summary normalization. |
| tests/unit/test_actor_persona.py | Adds test ensuring persona insight falls back when LLM returns empty payload. |
| src/omen/simulation/reason.py | Derives non-placeholder step summaries and truncates to 100 words during normalization. |
| src/omen/scenario/loader.py | Loads generation trace + actor status alongside existing Spec8 flow artifacts. |
| src/omen/ingest/synthesizer/services/situation.py | Adds force param + local-first skip check; ensures persona + status artifacts post-analysis. |
| src/omen/ingest/synthesizer/services/actor.py | Introduces persona/status artifact helpers and “usable content” checks. |
| src/omen/cli/situation.py | Adds --force; updates situation brief completion status after scenario planning. |
| src/omen/cli/case.py | Routes persona analysis to shared generate_persona_artifact helper. |
| src/omen/cli/actor.py | Routes persona analysis to shared generate_persona_artifact helper. |
| src/omen/analysis/actor/insight.py | Adds fallback persona generation + generate_and_save_persona_insight. |
| src/omen/analysis/actor/init.py | Exports generate_and_save_persona_insight. |
| sample/output/sap/result.json | Adds/updates bundled sample deterministic result artifact for the UI/demo. |
| sample/output/sap/explanation.json | Adds/updates bundled sample explanation artifact for the UI/demo. |
| sample/data/scenarios/sap/traces/reason_chain_c.json | Bundled sample reason-chain trace (scenario C). |
| sample/data/scenarios/sap/traces/reason_chain_b.json | Bundled sample reason-chain trace (scenario B). |
| sample/data/scenarios/sap/traces/reason_chain_a.json | Bundled sample reason-chain trace (scenario A). |
| sample/data/scenarios/sap/traces/prior_snapshot.json | Bundled sample prior snapshot trace. |
| sample/data/scenarios/sap/traces/planning_query.json | Bundled sample planning query trace. |
| sample/data/scenarios/sap/traces/actor_derivation.json | Bundled sample actor derivation trace. |
| sample/data/scenarios/sap/situation.md | Bundled sample generated situation brief (now includes “Completed” status line). |
| sample/data/scenarios/sap/situation.json | Bundled sample situation artifact JSON. |
| sample/data/scenarios/sap/scenario_pack.md | Bundled sample scenario pack markdown. |
| sample/data/scenarios/sap/scenario_pack.json | Bundled sample scenario pack JSON. |
| sample/data/scenarios/sap/generation/log.json | Bundled sample situation generation trace. |
| sample/data/actors/sap/strategy_ontology.json | Bundled sample strategy ontology for persona/status demos. |
| sample/data/actors/sap/generation.json | Bundled sample actor generation metadata. |
| sample/data/actors/sap/analyze_status.json | Bundled sample actor status artifact. |
| sample/data/actors/sap/analyze_persona.json | Bundled sample persona artifact. |
| sample/data/actors/sap/actor_ontology.json | Bundled sample actor ontology (input for persona/status). |
| sample/app/scenario_planning.py | Adds/updates sample Streamlit viewer for bundled artifacts. |
| README.zh.md | Expands Chinese quickstart + adds UI screenshots and examples. |
| README.md | Expands English quickstart + adds UI screenshots and examples. |
| pyproject.toml | Bumps project version to 0.1.9. |
| config/templates/situation_brief.md | Updates brief template status section content and stage checklist. |
| config/prompts/base.yaml | Adds summary field guidance + constraint to avoid placeholder summaries. |
| app/strategic_actor.py | Minor UI tweak for consistency score rendering. |
| app/scenario_planning.py | Expands UI to show persona/status, richer tables, and generation trace confidence in the flow diagram. |
| .gitignore | Adjusts ignore rule to ignore root /output/* contents. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| actor_profile = payloads.get("actor_profile") | ||
| actor_status = payloads.get("actor_status") | ||
| persona_payload = payloads.get("persona") or {} | ||
| if actor_profile: | ||
| profile = dict(actor_profile.get("profile") or {}) | ||
| strategic_style = dict(profile.get("strategic_style") or {}) | ||
| action_prefs = list(profile.get("action_preferences") or []) | ||
|
|
There was a problem hiding this comment.
actor_profile loaded from actor_ontology.json appears to follow the actor ontology schema (e.g., top-level actors[] with per-actor profile). This UI code reads actor_profile.get('profile'), which will usually be empty and prevents the "Strategic style" / "Action preferences" panels from rendering. Consider extracting the primary actor from actors (or reusing the same helper used in persona generation) and reading its profile instead.
| assert normalized is not None | ||
| summary = str(normalized["steps"][0].get("summary") or "") | ||
| assert summary | ||
| assert summary != "seed_inference" | ||
| assert len(summary.split()) <= 100 | ||
| assert "processed" in summary.lower() or "produced" in summary.lower() |
There was a problem hiding this comment.
This test asserts the synthesized summary contains specific keywords ("processed" or "produced"), making it brittle to harmless wording changes in _derive_step_summary. To keep the test focused on the contract, consider asserting only that the summary is non-empty, not equal to step_type, and within the word limit (and possibly that it differs from the placeholder after normalization) rather than checking exact vocabulary.
| "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": "/mnt/ssd/projects/opensource/omen/output/actors/sap_reltio_acquisition/actor_ontology.json" |
There was a problem hiding this comment.
The sample actor_ref is an absolute path (e.g., /mnt/ssd/...). This makes the bundled sample artifacts non-portable and can leak contributor-specific filesystem details. Consider using repo-relative paths (or omitting these refs in sample JSON and letting tooling resolve them) so the sample runs on any machine.
| "actor_ref": "/mnt/ssd/projects/opensource/omen/output/actors/sap_reltio_acquisition/actor_ontology.json" | |
| "actor_ref": "output/actors/sap_reltio_acquisition/actor_ontology.json" |
| "strategy_ontology_path": "/mnt/ssd/projects/opensource/omen/output/actors/sap_reltio_acquisition/strategy_ontology.json", | ||
| "actor_ontology_path": "/mnt/ssd/projects/opensource/omen/output/actors/sap_reltio_acquisition/actor_ontology.json", |
There was a problem hiding this comment.
These sample artifact paths are absolute (strategy_ontology_path, actor_ontology_path), which reduces portability of the repository sample data. Consider converting them to relative paths or placeholders so the sample bundle is usable across environments without editing.
| "strategy_ontology_path": "/mnt/ssd/projects/opensource/omen/output/actors/sap_reltio_acquisition/strategy_ontology.json", | |
| "actor_ontology_path": "/mnt/ssd/projects/opensource/omen/output/actors/sap_reltio_acquisition/actor_ontology.json", | |
| "strategy_ontology_path": "output/actors/sap_reltio_acquisition/strategy_ontology.json", | |
| "actor_ontology_path": "output/actors/sap_reltio_acquisition/actor_ontology.json", |
Enhance the pipeline by integrating persona functionality, updating the situation brief status, and adding examples to the README. Include new images for strategic reasoning and introduce tests for reason chain summary normalization.