Skip to content

fix: pre-release hardening for 0.8.4#317

Merged
neuromechanist merged 6 commits into
developfrom
feature/release-0.8.4-hardening
Jun 8, 2026
Merged

fix: pre-release hardening for 0.8.4#317
neuromechanist merged 6 commits into
developfrom
feature/release-0.8.4-hardening

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Pre-release hardening for 0.8.4

Addresses the findings from the PR #316 (develop -> main) review before the release merge. All items were pre-existing in develop; none were release blockers, but they are cheap, safe robustness wins.

Changes

  • live_search opt-in: CitationConfig.live_search now defaults to False. Live web paper search added external-API latency (~15s cap) and anonymous OpenAlex queries to every community with a citations block, including prod HED, with no explicit opt-in. Enabled for EEGLAB (its prompt already tells the agent to ask first); HED stays off until its prompt is updated.
  • papers sync error handling: narrowed the broad except in the batch search/citation loops to (OpenCiteError, TimeoutError); any other exception is now logged with a full traceback instead of masquerading as "no results". Per-query/per-DOI _store_papers is isolated so one DB failure cannot abort the batch or desync metadata. Typed _run.
  • feedback API: guard FeedbackEntry() so an invariant-validator drift returns a clean 422 instead of an unhandled 500.
  • widget feedback: postFeedback aborts after 10s instead of hanging; the general-feedback Send button is disabled while the POST is in flight (no duplicate rows on double-click).
  • deps: dropped the redundant direct pyalex dependency (transitive via opencite); refreshed a stale comment.
  • style: ruff-formatted scripts/widget-sri.py (was failing format --check).

Tests

  • New: live_search off-by-default, whitespace-only general comment -> 422.
  • uv run --all-extras pytest on affected suites: 226 passed.
  • ruff check + ruff format --check: clean.

Live web paper search added external-API latency to every community with a
citations block. Default to False so communities opt in explicitly; enable it
for EEGLAB, whose prompt already tells the agent to ask before running it.
Narrow the broad except in the batch search/citation loops to
(OpenCiteError, TimeoutError) for expected API failures; log any other
exception with a full traceback (logger.exception) so a bug no longer
masquerades as a routine 'no results'. Isolate per-query/per-DOI _store_papers
so one DB failure cannot abort the batch or desync metadata. Add type hints to
_run.
pyalex is no longer imported anywhere; opencite pulls it in transitively. Remove
the redundant direct declaration and refresh the stale OpenAlex comment.
FeedbackRequest and FeedbackEntry validate the same invariants independently;
if they ever drift, guard the construction so a bad shape returns a clean 422
instead of an unhandled 500. Add a whitespace-only general-comment rejection test.
postFeedback now aborts after 10s instead of hanging indefinitely, and the
general-feedback Send button is disabled while the POST is in flight so a
double-click cannot store two rows.
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Preview Deployment

Name Link
Preview URL https://feature-release-0.8.4-harden-demo.osc.earth
Branch feature/release-0.8.4-hardening
Commit f3b7e8b

This preview will be updated automatically when you push new commits.

@neuromechanist neuromechanist merged commit 6c873f2 into develop Jun 8, 2026
8 checks passed
@neuromechanist neuromechanist deleted the feature/release-0.8.4-hardening branch June 8, 2026 18:02
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