Repository navigation
fix(plugins): normalize Crossref abstracts before truncation - #13256
kaijakagi-sys wants to merge 6 commits into
Conversation
Exercise production DOI handler: five tests pass; unchanged source fails eight cases. Local preflight: 14 checks pass (shallow-history ratchet skips). Failure-Class: none
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Reproduce both review findings on prior published head; five new subcases fail before and all seven handler tests pass after. Fourteen selected local checks pass; shallow-history ratchet skips. No live HTTP/deployment test. Failure-Class: none
|
Addressed both review findings in 8054d46: JATS |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Verified against #13242 — this is a tight, correct fix. What I checked, per file:
plugins/omi-crossref-app/main.py—AbstractTextParsercollects character data and inserts newlines only for block-level tags (p,title,sec,div,br,break,li, matched after namespace stripping viatag.rsplit(":", 1)[-1]);clean_abstract()parses before entity decoding so<sample>stays literal text, andunknown_decl()keeps CDATA payloads literal. The only call-site change isabstract = clean_abstract(item.get("abstract"))inget_crossref_work, so the search and author handlers and all other metadata normalization are untouched. The existingabstract[:1200]cap now counts visible text instead of JATS markup.plugins/omi-crossref-app/test_main.py— I ran the suite against both this head and basemainin a clean stdlib-only container: 7/7 pass on the head, while the same cases produce 13 failing subcases on base, so the regression coverage is real (captured public Crossref response for 10.7554/eLife.45374, MathML inline data, escaped literals, unclosed markup, cap ordering, CDATA, provider errors, empty abstracts). Loading the production module with framework/model doubles keeps it hermetic — nice approach.- I also probed beyond the suite: namespaced block tags with attributes, nested
jats:sec/jats:title, uppercase tags, numeric character references, and adversarial floods (50k escaped entities, 100k<break/>elements) — all behave sensibly with linear runtime, so no parser-blowup concern. .github/checks-manifest.yaml— the newcrossref-abstract-testsentry follows the manifest's own conventions: reason string cites #13242, bothlocalandcilanes declared, stdlib-only command, trigger scoped toplugins/omi-crossref-app/**. Nothing in the workflow files or secrets is touched.plugins/omi-crossref-app/README.md— the new section matches the code's actual behavior (plain-text conversion before the 1,200-char limit, paragraph separation, literal escaped brackets, no math layout), and the documentedpython3 plugins/omi-crossref-app/test_main.pyinvocation works from the repo root.
Minor, non-blocking: subscript/superscript content concatenates with adjacent text (x<sub>i</sub><sup>2</sup> → xi2) — fine for a plain-text tool response and intentionally pinned by a test; empty block elements filter out cleanly.
Before merge: no CI checks have reported on this head yet — the new manifest entry should exercise this suite in the ci lane, so let that run confirm. On the reward question from #13242: that's a maintainer decision I can't confirm here. Leaving the merge call to a human maintainer.
This feedback is AI-generated on behalf of the maintainers. A human maintainer should make the final merge decision.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
kodjima33
left a comment
There was a problem hiding this comment.
backend/community fix: confirmed on main clean() leaves raw JATS/XML tags in Crossref abstracts before the 1200-char truncation; new HTMLParser-based clean_abstract correctly strips markup. Linked issue #13242 real, diff scoped, tests added.
Preserve both regression registrations and all upstream changes; plugin code unchanged. Crossref: 7 tests pass. Upstream USGS: 5 tests pass. Exact-base local preflight: 14 checks pass; shallow-history limit remains. No live provider, OAuth or deployment verification.
|
Follow-up on the merge head 9ae0af9: the only new commit since my earlier review is a merge of current main, and it does not touch this PR's content — I re-ran the handler suite against the exact head sources in a clean standard-library-only sandbox: 7/7 pass, including the JATS With @kodjima33's approval already on record and no plugin-content change since it was given, this looks merge-ready from my side — nothing further needed from you. Thanks for keeping the branch current. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Retain upstream regex cleaning, tests and version 1.0.1. Preserve original abstract-only character-data parsing and regression coverage for residual CDATA, escaped literals, boundaries and visible-text truncation. Preserve upstream raw inequality controls through the actual DOI handler. Failure-Class: none
|
The completed Desktop Swift CI job for
For comparison, Calendar #13284 has now hit a similar overall-budget failure in run 34718293316: 2,215s against 1,800s. Its timed-out 74-suite batch passed as two 37-suite halves (33s each); an earlier nonzero 100-suite batch also passed when split. Its desktop tree and Swift workflow likewise match base Could a maintainer advise how this timing failure should be handled for this plugin-only change? I have not changed desktop code or raised its budget. |
|
Re-verified head 1e07f26 after the main merge — the plugin work is still sound, and all three red checks trace to causes outside this diff. What changed since the approved 8054d46, per file:
On the three red checks at 1e07f26, for the maintainer question above:
So the plugin change itself is verified correct and previously approved; the failures are CI timing plus main-side Dart breakage. Whether to re-run, merge on red-but-unrelated required checks, or adjust the Swift budget is a maintainer CI-policy call — @kodjima33 the verification above should give you what you need to decide. Thanks for the patient, well-documented iterations on this. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
… for BasedHardware#13256 Preserve the reviewed plugin files unchanged. Component regression tests, make preflight and explicit PR-body preflight pass locally; hosted mobile and Swift CI remain authoritative.
|
On current head Repo Checks run 34749356321 failed at Detect Changes job 103702899858. The job API reports failure but returns no step details; Formatting and Hygiene were skipped. Log retrieval returned 404, so I cannot establish the cause or identify an author-side correction. Desktop Swift CI is still pending. Could a maintainer inspect this Detect Changes failure and, if appropriate, rerun only that failed job? I have not changed the workflow or retriggered the run. |
|
The earlier Detect Changes blocker is cleared on current head Eight of the nine workflows have succeeded. Desktop Swift CI is still queued, so this is not full CI clearance yet. No rerun of the older failed detector job is needed for this head. |
|
The remaining Desktop Swift CI run has now succeeded on This closes the pending-Swift caveat in my previous update. GitHub reports the unchanged head mergeable. Could a maintainer review the retained abstract-parsing residual for #13242 and make the merge decision, or identify any remaining requirement? |
|
Re-verified final head I re-ran the hermetic handler suite against the exact head sources in a standard-library-only sandbox: 8/8 pass, and upstream With all nine workflows green on this head, I have no remaining automation-side requirement — the merge call for the #13242 residual parsing behavior stays with a human maintainer, per your last note. Thanks for keeping the branch current through three main merges and for the precise CI tracking. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Real follow-on fix to #13525: current main's clean() does html.unescape before regex tag-stripping, mishandling escaped entities/CDATA/paragraph boundaries in Crossref abstracts. New HTMLParser-based clean_abstract() is well-tested and scoped. Backend/community, confidence 5/5.
aryanorastar
left a comment
There was a problem hiding this comment.
Verified on e13a59656454.
Head is CONFLICTING/DIRTY, so this cannot merge even with kodjima APPROVE. Rebase onto current main and keep the diff on .github/checks-manifest.yaml, plugins/omi-crossref-app/README.md, plugins/omi-crossref-app/main.py, plugins/omi-crossref-app/test_main.py.
kodjima size-gate APPROVE is not a maintainer merge. I am not merging until this is MERGEABLE and green.
|
Crossref — Astar, on behalf of @aryanorastar |
|
Keeping this open. Not approving — Astar, on behalf of @aryanorastar |
|
Closing. This is already on main via #13525. Not merged. |
|
Hey @kaijakagi-sys 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Summary
Follow-up for #13242, retaining the upstream #13525 fix and version 1.0.1. The merged regex cleaner fixes basic JATS tags, but the original handler regressions still expose lost paragraph/break boundaries, escaped literal text, CDATA payloads, inline markup and incorrect visible-text truncation. This same-PR merge preserves upstream clean() and test_clean.py unchanged; only abstracts use the original markup-aware parser. Other metadata retains current upstream behavior. No mathematical layout rendering is claimed.
Validation
make preflightandscripts/pr-preflight --lane local --pr-body-file <draft>: all 14 selected local checks pass. The history-dependent failure-class guard ratchet explicitly skips in this shallow checkout; full-history hosted CI remains authoritative.git diff --checkpasses. Hosted CI must confirm the published head.Product invariants affected
none
Failure-Class: none
Reward status
The suggested $50 in #13242 remains unapproved, not funded. Small PR-first contribution under the published discretionary program; merge, sponsor award, official claim and receipt are separate. No assignment, bounty approval or payment claimed.