Skip to content

Merge release-v0.7 into main - #88

Merged
pendingintent merged 11 commits into
mainfrom
release-v0.7
Sep 28, 2026
Merged

pendingintent merged 11 commits into
mainfrom
release-v0.7

Conversation

@pendingintent

Copy link
Copy Markdown
Owner

Summary

  • Documents the MCP server (mcp_server/) and its read/write tools in README.md, so non-Claude-Code contributors can discover the integration (previously only described in CLAUDE.md).
  • Fixes NCIt/BC alignment jobs getting permanently stuck after a server restart: a leftover AlignmentJob row left in a non-terminal status blocked start_job()'s concurrency guard forever, so "Start Alignment Run" silently failed. Adds reconcile_stale_jobs(), run at startup, to fail out any such stale row.

Supersedes #86 (release-v0.6 -> main), which only carried the README doc change — this carries that plus the alignment fix from release-v0.7 in one step.

Test plan

  • pytest --tb=short (full suite, 484 tests) passes
  • isort / black / flake8 clean
  • New TestReconcileStaleJobs coverage in tests/test_alignment_runner.py
  • Verified against the live dev server: deleted the stuck job row, restarted, confirmed /ncit-alignment/status reports the last real completed job instead of the phantom stuck one

pendingintent and others added 4 commits September 10, 2026 08:26
The generated Windows launcher shelled out to `powershell -Command
Start-Process` to delay-open the browser after starting the server. That
pattern - a freshly-written .bat spawning PowerShell - gets quarantined by
some antivirus/Defender heuristics right after install.py creates it,
leaving users with no Start.bat and no indication why (the installer log
still reports success). Replace it with a plain cmd/ping/start sequence
that achieves the same delayed browser-open without invoking PowerShell.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The mcp_server/ integration was only described in CLAUDE.md; add a
README section listing the read and write tools it exposes so
non-Claude-Code contributors can find it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…estart

A leftover AlignmentJob row stuck in running_populate since a prior server
restart tripped start_job()'s concurrency guard, so every click of "Start
Alignment Run" was silently rejected with a 409 while the UI kept polling
the stale job.

- services/alignment_runner.py: add reconcile_stale_jobs(), which fails out
  any leftover non-terminal AlignmentJob row (background threads can't
  survive a process restart, so a non-terminal row left behind is always
  stale).
- app.py: run reconcile_stale_jobs() at startup, before app.run(), so this
  can't recur.
- tests/test_alignment_runner.py: cover non-terminal jobs getting marked
  failed, terminal jobs left untouched, and the no-jobs no-op case.
- README-PROGRESS.md: changelog entry.
- CLAUDE.md: carried-over edit from pi-add-mcp-readme.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@claude claude Bot 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@pendingintent

Copy link
Copy Markdown
Owner Author

@claude review

@claude claude Bot 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.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread app.py
Fix Windows Start.bat quarantined by antivirus
@pendingintent pendingintent self-assigned this Sep 16, 2026
@pendingintent pendingintent added bug Something isn't working documentation Improvements or additions to documentation labels Sep 16, 2026
@pendingintent pendingintent modified the milestone: r Sep 16, 2026
_run_pipeline's except handler set status=failed but never touched
completed_at, while both the success path and reconcile_stale_jobs()
(added earlier on this branch) do set it. That left completed_at as an
unreliable signal for "this job stopped running" — true for a completed
or startup-reconciled job, but silently None for one that actually failed
mid-run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pendingintent and others added 5 commits September 16, 2026 15:58
As a BC/DSS curator, copy an existing BC or Specialization and tweak the
group-level info while keeping its DECs/variables, per issue #83.

Clone pre-fills the existing New BC / New Specialization form from a
source record (group-level fields, DECs/variables) with the ID left
blank, so nothing is saved until the curator edits and hits Save — reuses
the existing create_bc()/save_decs() and specialization create() paths
unchanged. Each cloned DEC's dec_id is blanked so save_decs() regenerates
it under the new bc_id rather than keeping a stale "<old_bc_id>.DEC.N".

BC clone is scoped to the BC + its DECs (not its linked specializations);
specializations are cloned independently via their own action, matching
the issue's treatment of BCs and specializations as parallel requests.

- services/bc_service.py: add build_bc_clone(), returning a transient BC
  + DEC dicts copied from an existing bc_id.
- routes/bc.py: /bc/new?clone_from=<bc_id> renders the New BC form
  pre-filled from the source.
- routes/specializations.py: /specializations/?clone_from=<vlm_group_id>
  pre-fills the (already-collapsible) New Specialization panel from the
  source, without touching its vlm_group_id or the edit-in-place path.
- templates/bc_detail.html: DEC table now renders from the `decs` route
  variable instead of `bc.decs`, so a transient (unsaved) clone object can
  be pre-filled; adds a Clone button and a "cloned from" banner.
- templates/specializations.html: introduces a shared `fs` (edit_spec or
  clone_spec) template variable for prefill, keeping vlm_group_id and the
  published-lock checks scoped to true edit-in-place only; adds a Clone
  row action.
- templates/bc_list.html: adds a Clone row action.
- tests: services/bc_service, routes/bc, routes/specializations coverage
  for build_bc_clone() and both clone_from entry points.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Clone Biomedical Concepts and Dataset Specializations (closes #83)
@pendingintent
pendingintent merged commit 93ff2a6 into main Sep 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

1 participant