Skip to content

Fix/v0.5.2#77

Closed
benoitcayladbx wants to merge 68 commits into
masterfrom
fix/v0.5.2
Closed

Fix/v0.5.2#77
benoitcayladbx wants to merge 68 commits into
masterfrom
fix/v0.5.2

Conversation

@benoitcayladbx

Copy link
Copy Markdown
Collaborator

Summary

Linked Issue / milestone

Closes #. Part of M<n>.<phase> in .planning/ROADMAP.md.

Plan

.planning/<slug>/PLAN.md

Type of change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — no behaviour change
  • test — tests only
  • perf — perf improvement
  • ci / build / chore — tooling

Author checklist

  • Conventional Commit PR title (<type>(<scope>): <subject>).
  • changelogs/<today>.log updated with title + context + numbered changes + files + test result.
  • Tests added or modified for every behaviour change.
  • uv run pytest tests/<scope>/ green locally.
  • pre-commit run --all-files clean (or skipped hooks documented).
  • If src/agents/** or any MLflow-traced LLM path changed:
    • SPEC.md present in .planning/<slug>/.
    • tests/eval/datasets/<agent>/dataset.jsonl has ≥20 examples (new) or ≥10 (change).
    • MLflow eval run URI in PR body below.
    • Judge score ≥ baseline + delta, or explicit waiver here.
  • If src/mcp-server/** changed: uv run pytest tests/mcp/ -m mcp green.
  • No gsd-* references re-introduced.

MLflow eval run

Test plan

  • uv run pytest tests/ -m "not e2e and not property and not eval" --cov-fail-under=90
  • Per-package coverage thresholds (scripts/check_coverage.py) green for touched packages.
  • If new MCP tool: uv run pytest tests/mcp/integration/test_tool_schemas.py includes it.

Reviewer hint

See docs/PR_REVIEW_CHECKLIST.md. Numbered items map 1:1 to comments — #3: missing OntoBricksError subclass for new condition is more useful than "fix error handling".

dependabot Bot and others added 30 commits June 13, 2026 10:42
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 6 to 7.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v6...v7)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v5...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ked-desp-DT

Fix/submit for review blocked desp dt
…iew-blocked-desp-DT"

This reverts commit f721fdf, reversing
changes made to 4a4509a.
_BuildPipeline._complete_task() — the single success exit shared by both
the UI Build button (build_kind=session) and the REST endpoint
(build_kind=api) — never called write_version() after completing a build.
Only the scheduled-build path (scheduler._persist_domain_metadata) wrote
the domain_versions.last_build column.  ReviewService.submit() reads that
column; the Consistency-checks panel reads live triple-store state — so
both indicators on the Validation page disagreed and Submit for Review
remained permanently blocked.

Fix: add _persist_last_build_to_registry() called from _complete_task()
after _record_build_run(). Best-effort (exceptions are logged, never
propagated). Also stamps last_build when empty for the API build path.

Backport of the same fix applied to fix/v0.5.1.
_BuildPipeline._complete_task() — the single success exit shared by both
the UI Build button (build_kind=session) and the REST endpoint
(build_kind=api) — never called write_version() after completing a build.
Only the scheduled-build path (scheduler._persist_domain_metadata) wrote
the domain_versions.last_build column.  ReviewService.submit() reads that
column; the Consistency-checks panel reads live triple-store state — so
both indicators on the Validation page disagreed and Submit for Review
remained permanently blocked.

Fix: add _persist_last_build_to_registry() called from _complete_task()
after _record_build_run(). Best-effort (exceptions are logged, never
propagated). Also stamps last_build when empty for the API build path.

Backport of the same fix applied to fix/v0.5.1 and develop.
Both files were present on master but absent from develop (dropped by
the revert of PR #61). Synced back to keep the branches aligned.
…tory

Resolves the visual noise in GitHub's compare view caused by the
merge+revert of PR #61. Net code diff between master and develop
remains the same (version bump, deploy config, one DatabricksAuth
change, v0.6.0 changelogs). Kept develop's 0.6.0 version strings
and deploy config; kept the v0.6.0 changelog file.
Drops the experimental route→plan→clarify→dispatch loop introduced in
feat/Collaborative-Comments-Tasks (agent_task_runner, agent_task_planner,
agent_task_router, agents/registry) before the v0.6 merge.

- Deleted: 8 source files + 3 test files + 2 design docs
- CommentService: removed AI-Agent assignee, kickoff block,
  start_agent_task call, _maybe_resume_agent
- Mapping: removed apply_agent_mappings()
- Frontend: removed all AI-Agent JS state/polling/UI and CSS rules
- Docs: removed AI Agent task assignment section from architecture.md
- Tests: 2132 passed (1 pre-existing lakebase skip)
Feature branch takes priority throughout. Resolved:

- modify/delete (×4): kept CommentService.py, comments-panel.js,
  test_comment_service.py, test_discussion_panel_assets.py — develop
  never had them; they are new additions from this feature.
- Restored 13 feature-branch files (API router, domain collaboration
  JS/CSS, templates, tests, upgrade scripts, changelogs) that were
  staged for deletion because develop's master-merge-back never included
  them.
- Content conflicts (Mapping.py, review-modals.css, ontology-init.js,
  docs/architecture.md, changelog): kept feature branch version in all
  cases.

Tests: 2350 passed, 15 skipped.
The git auto-merge silently took develop's version of 4 files,
stripping all collaboration UI wiring:

- base.html: lost comments-panel.js <script> include
- domain.html: lost domain-collaboration.css, mytasks-section,
  discussions-section includes, and domain-collaboration.js script
- menu_config.json: lost the Collaboration group (My Tasks + Discussions)
- routers/internal/__init__.py: lost comments_router registration

Restored all 4 files from the pre-merge feature commit (c2416cc).
Tests: 2350 passed, 15 skipped.
Documents the silent auto-merge data-loss pattern discovered during
PR #67 conflict resolution: git resolved base.html, domain.html,
menu_config.json, and __init__.py without conflict markers while
discarding the feature branch's collaboration UI wiring.

Six rules added: feature-branch priority, auto-merge risk, diff
checklist for the 4 most-at-risk files, restoration procedure,
test gate, and commit message guidance.
…logy-map.js

The auto-merge silently dropped the openOntologyDiscussion() function
(~10 lines) from ontology-map.js. The function was defined at the pre-merge
tip (c2416cc:1528) but absent in develop, and the merge result landed
between the two versions without it.

The Information-page Discussion button called it directly via onclick=
with no guard, causing an uncaught ReferenceError on click.
The earlier conflict resolution auto-merged 50+ frontend files and silently
stripped collaborative feature content from every template and JS file.
Restored all affected files from the pre-merge feature tip (c2416cc):

Templates (25): all ontology, mapping, and dtwin partials
JS (9): ontology-map.js, domain-review.js, home-tasks.js, mapping-shared.js,
  mapping-entity/relationship-modal.js, query.js, query-sigmagraph.js,
  registry-my-tasks.js
Backend (8): _build_pipeline.py, RegistryService.py, ReviewService.py,
  store/base.py, schema.sql, store.py, test_registry_store.py,
  test_review_service.py

All discussion buttons (ontology×9, mapping×8, dtwin×7) verified present.
openOntologyDiscussion() verified defined at ontology-map.js:1528.
Tests: 2372 passed, 15 skipped, 4 pre-existing psycopg failures.
Exposed openDomainDiscussion() globally from domain-collaboration.js
(delegates to resolveDomainContext + OntoComments.openThread, same
pattern as openThreadFor but callable from onclick).

Added the onto-discuss-btn to:
- _domain_metadata.html (Data Sources) — alongside Reset + Add Data Source
- _domain_documents.html (Document Management) — new header action
Previously the panel only appeared after async context resolution +
data fetch, causing a noticeable blank delay on click.

comments-panel.js:
- Added showLoadingPanel() — opens the offcanvas right away with a
  spinner in the list area; exposed on window.OntoComments.
- openThread() — skips show() if panel is already visible (no flicker).
- openForSelection() — calls showLoadingPanel() first, then resolves
  domain context and fetches comments behind the open panel.

domain-collaboration.js:
- openDomainDiscussion() — calls OntoComments.showLoadingPanel()
  immediately before the async resolveDomainContext() call.
When 'Create task' is opened from a comment thread, a clipboard button
appears next to the title input. Clicking it copies the comment's raw
text (stripped of tags) into the title field, truncated to 200 chars
with a trailing ellipsis (…) if longer.

Implementation:
- threadHtml: stores raw comment text in data-raw-text attribute
- taskFormHtml(heading, withCancel, commentText): renders copy button
  with data-tk-copy-text when commentText is provided
- wireTaskForm: wires copy button → fills [data-tk-title], focuses it
- toggleTask: reads data-raw-text from thread element, passes to form
- TASK_TITLE_MAX = 200 constant
…s-Tasks

feat(collab): collaborative comments, tasks & discussions (domain-wide)
Add a checkbox column to the Attributes table in the Status tab of the
entity and relationship panels. All attributes are included by default;
unchecking marks an attribute as excluded — it is stripped from
attribute_mappings on save and no longer flagged as an unmapped gap.

- Frontend (mapping-design.js): EntityPanelState/RelPanelState gain
  excludedAttributes[]; Status-tab rows become interactive checkboxes
  with strikethrough styling for excluded attrs; save functions write
  excluded_attributes into the mapping object.
- Backend (Mapping.py): build_entity_mapping / build_relationship_mapping
  propagate excluded_attributes; compute_mapping_gaps skips them.
When unchecking (excluding) an attribute, do not delete it from
attributeMappings — the save function already filters exclusions.
On re-check, read attributeMappings to restore the correct icon
(green checkmark if the attribute was mapped, red cross if not).
…appings exist

When ontology classes lack dataProperties (e.g. sync_class_data_properties
was not applied to the stored config), entities with existing attribute_mappings
still show the Attributes table by synthesizing attribute objects from the
mapping keys. Applies to both entity and relationship panels, and to
EntityPanelState/RelPanelState so the Mapping-tab dropdown also works.
Two-layer guard against the LLM inventing attribute_mappings for
columns that have no corresponding ontology data property:

1. Prompt (engine.py): explicit rules — if entity 'attributes' list is
   empty, submit attribute_mappings:{} and select only ID+Label columns.
   Never invent mappings for attributes not in the list.

2. Server-side (mapping.py / tool_submit_entity_mapping): filter
   attribute_mappings against the entity's declared attributes from
   ctx.ontology. If the entity has no attributes, all invented mappings
   are discarded with a warning log. Ensures Invoice/Payment etc.
   (no dataProperties) get a clean SELECT id AS ID, name AS Label query.
Benoit Cayla and others added 23 commits June 21, 2026 17:00
updateMappingCompletionStatus in mapping-information.js now skips
excluded_attributes when computing totalAttributes/mappedAttributes,
matching the Auto-Map page behaviour.

- Attribute gauge percentage and count only cover included attributes.
- Entity/relationship/attribute count spans show "· N excl." when items
  are excluded (same _excl() helper pattern as mapping-autoassign.js).
- Entity detail-list badge shows attrMapped / includedProps.length and
  appends "· N excl." when the entity has excluded attributes.
- isMapped now requires sql_query (stub-only mappings no longer count).

2418/2418 unit tests pass.
The Information page was counting from config→ontology direction without
requiring m.sql_query, which could:
1. Include stub mappings (excluded_attributes only, no SQL) as "mapped"
2. Miss a property if the config m.property URI differed slightly from p.uri

Fix: rewrite to use the same ontology→config direction as Auto-Map, requiring
m.sql_query for both entity and relationship counts:
  assignedRelUris = config.filter(m => m.sql_query).map(m => m.property)
  mappedProperties = activeProperties.filter(p => assignedRelUris.has(p.uri))

2418/2418 unit tests pass.
Add automatic retry with progressive backoff (5s, 10s, 20s) in _get and
_post helpers for 502/503 responses, which occur when the OntoBricks app
is sleeping or starting up on Databricks Apps.
…actions/setup-node-6

Bump actions/setup-node from 5 to 6
…codecov/codecov-action-7

Bump codecov/codecov-action from 6 to 7
…actions/download-artifact-8

Bump actions/download-artifact from 5 to 8
…actions/checkout-7

Bump actions/checkout from 6 to 7
Both _get and _post now retry up to 3 times on 502/503 with back-off
5s → 10s → 20s (~35s total), covering the typical Apps cold-start
window. Each retry is logged at WARNING level. All other status codes
still fail immediately.

Also adds pytest/pytest-asyncio/anyio as dev dependencies to the
mcp-server package so `uv run pytest` works out of the box.
…d-start fix, MCP retry

- Mapping designer: add Exclude all / Include all toggle button (entity & rel panels)
- Mapping reset: call _stampExcludedFlags() so excluded state clears on reset
- Build pipeline: force=True on GlobalConfigService reads to prevent managed_synced
  being silently skipped after a cold-start cache miss
- MCP server: retry with exponential backoff on 502/503 (Databricks App cold-start)
- Docs: user-guide and lakebase-graphdb updated to reflect the above changes
docs(contributors): use full name for Hugues Journeau in contributors table
…exclude-include

Feature/mapping attribute exclude include
UI-only label rename across the entire codebase:
- Top-level nav section "Digital Twin" is now "Knowledge Graph"
- Sigma.js viewer sub-item "Knowledge Graph" is now "Graph Viewer"

Internal code identifiers (digitaltwin, dtwin, DigitalTwin, routes) unchanged.
All 2418 unit tests pass.
…gating

- Add L2 subnav (#obSubnav) with Domain / Ontology / Mapping / KG
  dropdowns, inline breadcrumb, and Save Domain button; hidden until a
  domain is loaded (hasDomain)
- Breadcrumb moved into the L2 subnav row as a flex <li>; no longer a
  standalone <nav>; icons removed, italic 0.65rem style
- Save Domain button relocated from Domain Information page to L2 subnav
  (#menuSaveDomain); click delegation moved to document.body so it fires
  outside #navbarNav
- domainNew() replaced with showNewDomainDialog() popup (name +
  description + LLM endpoint) followed by automatic UC save dialog
- L1 Domain link (#domainL1Link) disabled (.ob-nav-disabled) when no
  domain loaded; L2 tab toggles unlocked by hasDomain, not hasRegistry
- updateMenusForDomainStatus() now driven by hasDomain so all domain
  sub-pages are accessible as soon as a domain is open in session
- New Domain button added to home page All Domains section
- Fix recursive_delete treating a 404 UC directory as an error, causing
  spurious "partially deleted" on domains with no UC files
- Update .cursor/11-frontend-design.mdc with new two-level nav and
  breadcrumb architecture, gating rules, and component catalog entries
…ection

- Add graph analytics pipeline: PageRank, Betweenness, Degree, Closeness,
  Clustering Coefficient via NetworkX; GraphBuilder/GraphMetrics services
- Analytics UI: sidebar section, Chart.js charts (4 metrics), entity-type
  filter, PageRank detail table, metric info modals, clickable chart bars
- AI graph interpreter: full agent lifecycle (SPEC, eval harness, tools),
  tool-enabled LLM with loopback get_entity_details, markdown insight display
- Discussion / Audit Trail: add-to-audit-trail button, markdown rendering in
  audit timeline, Discussion panel button
- Flat / time-series entity-type detection: EntityTypeProfile dataclass,
  single-pass heuristics (predicate diversity, temporal keywords), Data Model
  Health card in Analytics UI, flat_entity_types surfaced to AI prompt
- Refactoring: URIHelpers.extract_local_name, deduplicated JS helpers,
  centralised GraphBuilder literal filtering, tighter error handling
- Docs: user-guide Analytics section, features.md updates
- Add pytestmark = pytest.mark.unit to test_graph_metrics.py (--strict-markers)
- Promote _local() closure to module-level _local_name() in GraphMetrics.py
- Document Data Model Health card in docs/user-guide.md (Analytics section)
- Append code-review entry to changelogs/v0.6.0
feat(mapping): Serialize R2RML in deterministic order
Remove the domain-design group (Ontology + Mapping quick-links) from
menu_config.json; pages remain accessible via top-level navigation.
@benoitcayladbx benoitcayladbx requested a review from a team as a code owner June 23, 2026 15:55
Benoit Cayla added 3 commits June 24, 2026 09:52
- menu_config.json: rename "Validation" menu item label to "Publication"
- _domain_review.html: rename page h4 title to "Domain Publication Workflow"
Add a dark pill style to the Domain nav item whenever a domain is
loaded. Driven by `updateDomainMenuVisibility(hasDomain)` so it
stays in sync with the existing domain-state logic on every page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants