OG-CLEWS link framework: apply-patch endpoint and post-run coupled-run hook - #520
Open
marcelolafleur wants to merge 4 commits into
Open
OG-CLEWS link framework: apply-patch endpoint and post-run coupled-run hook#520marcelolafleur wants to merge 4 commits into
marcelolafleur wants to merge 4 commits into
Conversation
…ee-kill, deep status
Collaborator
Author
|
Handoff for the UI work (building on this branch):
Check Two things to know: a coupled run can take a couple of hours, so never wait for it in a request — background it and let the results list update. And the result files live under If anything seems to need more than that — especially importing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the backend seam that couples them through the ogclews-link tool: the OG side can patch a CLEWs case and re-solve it, and a finished CLEWs run can trigger a coupled OG run whose results register back to the case. The UI for this (coupled-run button on the OG setup page) comes in a follow-up PR building on this branch.
What
POST /oglink/applyPatch— turns a link-emitted patch file into a solved caserun of a case copy (the live case is never touched, and a copy name can never overwrite a real case). Parameter codes translate through the case's own genData.json and fail loudly; values apply through the same read-merge/updateDatauses; a generated-datafile line-count guard catches structure changes; the response carries per-change before/after provenance.<case>/oglink/hook.json. After a successful solve it runs the link CLI as a subprocess in the link's own venv (MUIOGO never imports it) and records the OG results under a newoglink-runskey in resData.json. Without the config file (or without the link installed) it is a no-op with one logged line, so CLEWs-only users are unaffected; a hook failure cannot affect the CLEWs run itself.GET /oglink/status(is the link installed;?deep=1also checks registered OG models),GET /oglink/runs?case=,GET/POST /oglink/hookConfig.~/.muiogo/oglink-runs(same rule as og-state in Relocate OG-Core storage so it stops showing up as a CLEWS case #502), overrideMUIOGO_OGLINK_RUNS_DIR.Everything is additive except a 13-line guarded insertion in
DataFileClass.run().Tested
POST /runon PEP_v9 → hook → full coupled OG-PHL solve → results registered in resData.json.cc: @autibet @Adityakushwaha2006 @error9098x