Skip to content

Integrate Final V2 UML Activity Model Generator and Human–AI Refinement - #106

Closed
chingyachung wants to merge 4 commits into
developfrom
feature/thesis-generator-final
Closed

chingyachung wants to merge 4 commits into
developfrom
feature/thesis-generator-final

Conversation

@chingyachung

Copy link
Copy Markdown
Collaborator

Integrate Final V2 UML Activity Model Generator and Human–AI Refinement

Base: develop
Head: feature/thesis-generator-final

Summary

Integrate the complete Final V2 Generator application with the laboratory develop branch. The application supports three-candidate generation, candidate selection, human editing and saving, synchronization into a new revision, iterative refinement, and revision restore. It uses the Semantic–Deterministic Pipeline with ActivityGraph validation and AI4MDE conversion.

Main changes

  • Add topology and semantic planning, deterministic sketch construction, repair, compilation, conversion, and the required prompts and dependencies.
  • Add candidate and revision persistence, authenticated Generator APIs, and the frontend selection and human-in-the-loop workflow.
  • Protect saved edits: Sync waits for local saves; unresolved PATCH failures block Sync and Restore; Refinement checks saved process content against the synchronized revision before generation and again before import. Layout-only changes are ignored. Unsupported process fields are rejected instead of silently discarded.
  • Compare generated and saved models through the same AI4MDE representation, so generated Decision label/name defaults do not create false conflicts.
  • Add offline backend and frontend regression tests and the Generator production-surface documentation.

Verification and demo evidence

  • Django model and metadata tests: 75 passed.
  • Offline LLM-module pytest: 401 passed, 4 skipped. Live LLM tests require explicit opt-in and an API key.
  • Frontend unit tests: 19 passed; frontend production build passed.
  • git diff --check passed before commits. No paid LLM calls or official-candidate regeneration were performed.
  • The thesis author successfully completed manual E2E testing of three-candidate generation and selection; Human Edit → Save → Sync; AI Refinement; and Revision Restore.
  • Demo evidence follow-up: no recording or screenshot of this final E2E run is currently linked. Provide one if the laboratory requires visual evidence for review.
  • Implementation scope and limitations: docs/PRODUCTION_SURFACE.md.

Review focus

  1. The Semantic–Deterministic Pipeline, validation, and AI4MDE conversion.
  2. Candidate selection and the Save → Sync → Revision → Refinement → Restore lifecycle.
  3. Bearer authentication on Generator write routes and frontend token handling.
  4. Process-field preservation, revision conflict checks, and PATCH failure handling.
  5. The project-wide PostgreSQL image pin in docker-compose.yaml.

Known limitations and architect review

  • Sync rejects incomplete or unsupported manual process structures with 422; for example, deleting a node may leave a branch without a valid closure. This preserves the saved model and does not create a revision.
  • Refinement returns 409 for unsynchronized process edits or fields that cannot safely survive conversion. The saved model is preserved.
  • Independent clients or browser tabs do not have a shared atomic edit-version lock. The local editor guards its own pending and failed saves.
  • Project and System records inherit the laboratory's shared-access model; the Generator does not add per-user ownership. Other laboratory routes still accept cookie-authenticated writes without CSRF checks. The laboratory architect should decide the project authorization and shared CSRF policy before merge.
  • The laboratory's existing tracked environment configuration and any credential exposure in develop history need separate security review and rotation decisions. This branch does not add personal credentials or E2E-only Docker files.
  • docker-compose.yaml pins postgres:15-alpine instead of the floating postgres tag to maintain compatibility with the existing development database volume and avoid an implicit major-version change. The laboratory must confirm its deployment version and actual volume compatibility before merge; this PR does not reset or upgrade a volume.

Thesis provenance

This PR submits the Final V2 application from feature/final-v2-integration (56e82629). The official thesis experiment's 40 cases and 120 candidates were generated with the frozen feature/thesis-ui-isolation implementation (3227af4b), as recorded in its run manifest. This PR does not claim that Final V2 generated those frozen candidates and does not include frozen evaluation outputs.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@chingyachung

Copy link
Copy Markdown
Collaborator Author

Generator Demo

This video demonstrates the main features of the Final V2 Generator, including:

  • Generating three candidate UML Activity Models from a textual process description.
  • Selecting a candidate model.
  • Manually editing and saving the model.
  • Synchronizing manual changes with AI.
  • Refining the model using natural language instructions.
  • Viewing and restoring previous revisions.

The demo shows how users can interact with the generated models and refine them through the Human–AI Interaction workflow.

demo video link: https://drive.google.com/file/d/1nqbaXcSXsHbaK0DeZdVPvdP8Mww23uFc/view?usp=sharing

@chingyachung

Copy link
Copy Markdown
Collaborator Author

Closing this PR because the branch has been renamed to feature/chingya-2026-ai-assisted-activity-diagrams, following Irina's feedback. Since the repository is currently being refactored, I will open a new PR when the team is ready.

@chingyachung
chingyachung deleted the feature/thesis-generator-final branch October 21, 2026 11:45
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.

1 participant